devsecops-engine-tools 1.17.1__py3-none-any.whl → 1.18.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of devsecops-engine-tools might be problematic. Click here for more details.

@@ -90,8 +90,8 @@ class PrinterPrettyTable(PrinterTableGateway):
90
90
  if exclusions:
91
91
  headers = [
92
92
  "VM ID",
93
- "Tags",
94
93
  "Services",
94
+ "Tags",
95
95
  "Created Date",
96
96
  "Expired Date",
97
97
  "Reason",
@@ -102,8 +102,8 @@ class PrinterPrettyTable(PrinterTableGateway):
102
102
  for exclusion in exclusions:
103
103
  row_data = [
104
104
  self._check_spaces(exclusion["vm_id"]),
105
- ", ".join(exclusion["tags"]),
106
105
  self._check_spaces(exclusion["service"]),
106
+ ", ".join(exclusion["tags"]),
107
107
  format_date(exclusion["create_date"], "%d%m%Y", "%d/%m/%Y"),
108
108
  (
109
109
  format_date(exclusion["expired_date"], "%d%m%Y", "%d/%m/%Y")
@@ -38,8 +38,8 @@ class HandleFilters:
38
38
  findings_map[key] = new_finding
39
39
  else:
40
40
  existing_finding.service = " ".join(combined_services)
41
- new_finding.vm_id = " ".join(combined_vm_ids)
42
- new_finding.vm_id_url = " ".join(combined_vm_id_urls)
41
+ existing_finding.vm_id = " ".join(combined_vm_ids)
42
+ existing_finding.vm_id_url = " ".join(combined_vm_id_urls)
43
43
  else:
44
44
  findings_map[key] = copy.deepcopy(finding)
45
45
 
@@ -22,6 +22,7 @@ from devsecops_engine_tools.engine_utilities.sonarqube.src.domain.model.gateways
22
22
  from devsecops_engine_tools.engine_core.src.domain.model.input_core import (
23
23
  InputCore
24
24
  )
25
+ import re
25
26
  from devsecops_engine_tools.engine_utilities.utils.logger_info import MyLogger
26
27
  from devsecops_engine_tools.engine_utilities import settings
27
28
 
@@ -186,6 +187,9 @@ class ReportSonar:
186
187
  logger.warning(f"It was not possible to synchronize Sonar and Vulnerability Manager: {e}")
187
188
 
188
189
  input_core.scope_pipeline = project_key
190
+ if re.match(report_config_tool["SCOPE_VALIDATION_REGEX"], source_code_management_uri, re.IGNORECASE):
191
+ input_core.scope_pipeline = pipeline_name
192
+
189
193
  self.vulnerability_management_gateway.send_vulnerability_management(
190
194
  vulnerability_management=vulnerability_manager
191
195
  )
@@ -7,6 +7,7 @@ from devsecops_engine_tools.engine_utilities.utils.printers import (
7
7
  from devsecops_engine_tools.engine_core.src.domain.usecases.metrics_manager import (
8
8
  MetricsManager,
9
9
  )
10
+ import re
10
11
  from devsecops_engine_tools.engine_utilities.utils.logger_info import MyLogger
11
12
  from devsecops_engine_tools.engine_utilities import settings
12
13
 
@@ -16,9 +17,17 @@ def init_report_sonar(vulnerability_management_gateway, secrets_manager_gateway,
16
17
  config_tool = devops_platform_gateway.get_remote_config(
17
18
  args["remote_config_repo"], "/engine_core/ConfigTool.json"
18
19
  )
20
+ report_config_tool = devops_platform_gateway.get_remote_config(
21
+ args["remote_config_repo"], "/report_sonar/ConfigTool.json"
22
+ )
19
23
  Printers.print_logo_tool(config_tool["BANNER"])
20
24
 
21
- if config_tool["REPORT_SONAR"]["ENABLED"] == "true":
25
+ pipeline_name = devops_platform_gateway.get_variable("pipeline_name")
26
+ branch = devops_platform_gateway.get_variable("branch_name")
27
+ is_valid_pipeline = not re.match(report_config_tool["IGNORE_SEARCH_PATTERN"], pipeline_name, re.IGNORECASE)
28
+ is_valid_branch = branch in report_config_tool["TARGET_BRANCHES"]
29
+
30
+ if config_tool["REPORT_SONAR"]["ENABLED"] == "true" and is_valid_pipeline and is_valid_branch:
22
31
  input_core = ReportSonar(
23
32
  vulnerability_management_gateway,
24
33
  secrets_manager_gateway,
@@ -1 +1 @@
1
- version = '1.17.1'
1
+ version = '1.18.0'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: devsecops-engine-tools
3
- Version: 1.17.1
3
+ Version: 1.18.0
4
4
  Summary: Tool for DevSecOps strategy
5
5
  Home-page: https://github.com/bancolombia/devsecops-engine-tools
6
6
  Author: Bancolombia DevSecOps Team
@@ -1,5 +1,5 @@
1
1
  devsecops_engine_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- devsecops_engine_tools/version.py,sha256=0sNIVdGl6teHLyJfh55ulmHcFArD6sztXiZevppt-Do,19
2
+ devsecops_engine_tools/version.py,sha256=Gm5mJa9zQl9Ql4vPxGMUhKbSouRFa5AxoySd-V6MZbI,19
3
3
  devsecops_engine_tools/engine_core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  devsecops_engine_tools/engine_core/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  devsecops_engine_tools/engine_core/src/applications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -40,7 +40,7 @@ devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/defect_doj
40
40
  devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/github/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
41
41
  devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/github/github_actions.py,sha256=pxlgjhX4-Dssn-XHKK8AdCOj6Ry6VcQtoDf5q8CxTks,3731
42
42
  devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/printer_pretty_table/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
- devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/printer_pretty_table/printer_pretty_table.py,sha256=P0oavy_3AMbuRx5kPPiM2_LopVXqHK4Hz4Lb2UNfr-4,5369
43
+ devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/printer_pretty_table/printer_pretty_table.py,sha256=NkXu7JYoCHXIx0HzHl4DhdLGEpocPMIqs2L0ADS-RcI,5369
44
44
  devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/printer_rich_table/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
45
  devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/printer_rich_table/printer_rich_table.py,sha256=LPr3xSv0I7ENEdu1xj8ve5PXzpUohs7hbQvHjDSaUuE,3028
46
46
  devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/runtime_local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -76,7 +76,7 @@ devsecops_engine_tools/engine_risk/src/domain/usecases/__init__.py,sha256=47DEQp
76
76
  devsecops_engine_tools/engine_risk/src/domain/usecases/add_data.py,sha256=4wqDj-q7hJfJscvrbMDcy7tONqxdxl-CSl_TWTRUGKA,402
77
77
  devsecops_engine_tools/engine_risk/src/domain/usecases/break_build.py,sha256=TSZTXR8raKA1906dFl-Cv3J711iGUcBQmx82Jw6mF_M,11847
78
78
  devsecops_engine_tools/engine_risk/src/domain/usecases/get_exclusions.py,sha256=o4vMpmgt5q1BsaWpGZWdCHPVs1CFyj-P3TrgOSEBcqM,2327
79
- devsecops_engine_tools/engine_risk/src/domain/usecases/handle_filters.py,sha256=1yJKPzh64gu67g_pLyr7V8Ahzs3KK8tncigPzKWMX7Q,3533
79
+ devsecops_engine_tools/engine_risk/src/domain/usecases/handle_filters.py,sha256=JmeBtO6CMufjYSRpGQU1kPZoW3PnXwVXnl33LSIU3n8,3543
80
80
  devsecops_engine_tools/engine_risk/src/infrastructure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
81
81
  devsecops_engine_tools/engine_risk/src/infrastructure/driven_adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
82
  devsecops_engine_tools/engine_risk/src/infrastructure/driven_adapters/first_csv/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -287,13 +287,13 @@ devsecops_engine_tools/engine_utilities/sonarqube/src/domain/model/__init__.py,s
287
287
  devsecops_engine_tools/engine_utilities/sonarqube/src/domain/model/gateways/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
288
288
  devsecops_engine_tools/engine_utilities/sonarqube/src/domain/model/gateways/sonar_gateway.py,sha256=PCrGq7NOINAFPvmX-5V5191MGhahsnQeWXUB1-xL4Xw,1279
289
289
  devsecops_engine_tools/engine_utilities/sonarqube/src/domain/usecases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
290
- devsecops_engine_tools/engine_utilities/sonarqube/src/domain/usecases/report_sonar.py,sha256=Ro22sTPYKK2DYIxDEAIMUb6evHWIKPQi8ujcG6AzrWM,8828
290
+ devsecops_engine_tools/engine_utilities/sonarqube/src/domain/usecases/report_sonar.py,sha256=DT70Ke5is5F4XXlMBCJfqrHLOevKgcs6GGHdqhKLGuI,9011
291
291
  devsecops_engine_tools/engine_utilities/sonarqube/src/infrastructure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
292
292
  devsecops_engine_tools/engine_utilities/sonarqube/src/infrastructure/driven_adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
293
293
  devsecops_engine_tools/engine_utilities/sonarqube/src/infrastructure/driven_adapters/sonarqube/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
294
294
  devsecops_engine_tools/engine_utilities/sonarqube/src/infrastructure/driven_adapters/sonarqube/sonarqube_report.py,sha256=eKzxONP3pP4d2MIknC5sGVuxcHzgelt5D0Kun88WBMo,4514
295
295
  devsecops_engine_tools/engine_utilities/sonarqube/src/infrastructure/entry_points/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
296
- devsecops_engine_tools/engine_utilities/sonarqube/src/infrastructure/entry_points/entry_point_report_sonar.py,sha256=uqHo00PCaDq7H4sce1tVKRglYy0dGQMWe9z52imVWhM,1520
296
+ devsecops_engine_tools/engine_utilities/sonarqube/src/infrastructure/entry_points/entry_point_report_sonar.py,sha256=VSv8uGG36HuPv2dL7vpKKLFVQKkbqM3NPMd1f-yTclM,2036
297
297
  devsecops_engine_tools/engine_utilities/sonarqube/src/infrastructure/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
298
298
  devsecops_engine_tools/engine_utilities/sonarqube/src/infrastructure/helpers/utils.py,sha256=SGOWrkzQrvOt9bRhhSfgiMzj1695e1W0B9ox9C1ihQI,294
299
299
  devsecops_engine_tools/engine_utilities/ssh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -307,8 +307,8 @@ devsecops_engine_tools/engine_utilities/utils/name_conversion.py,sha256=ADJrRGax
307
307
  devsecops_engine_tools/engine_utilities/utils/printers.py,sha256=amYAr9YQfYgR6jK9a2l26z3oovFPQ3FAKmhq6BKhEBA,623
308
308
  devsecops_engine_tools/engine_utilities/utils/session_manager.py,sha256=yNtlT-8Legz1sHbGPH8LNYjL-LgDUE0zXG2rYjiab7U,290
309
309
  devsecops_engine_tools/engine_utilities/utils/utils.py,sha256=r_mng-OVWeqQyy6yIFsCeJrvH81VUPI3o1zdJO0JS0I,397
310
- devsecops_engine_tools-1.17.1.dist-info/METADATA,sha256=AsMazqyFZJ1BF1l_CRjCRmIKMMITk17008LevuRWAy4,10895
311
- devsecops_engine_tools-1.17.1.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
312
- devsecops_engine_tools-1.17.1.dist-info/entry_points.txt,sha256=MHCTFFs9bdNKo6YcWCcBW2_8X6yTisgLOlmVx-V8Rxc,276
313
- devsecops_engine_tools-1.17.1.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
314
- devsecops_engine_tools-1.17.1.dist-info/RECORD,,
310
+ devsecops_engine_tools-1.18.0.dist-info/METADATA,sha256=tRY3rnLjeG8eXCUBrkEzqZliJ9mCUTbJyNdLncfxYqM,10895
311
+ devsecops_engine_tools-1.18.0.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
312
+ devsecops_engine_tools-1.18.0.dist-info/entry_points.txt,sha256=MHCTFFs9bdNKo6YcWCcBW2_8X6yTisgLOlmVx-V8Rxc,276
313
+ devsecops_engine_tools-1.18.0.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
314
+ devsecops_engine_tools-1.18.0.dist-info/RECORD,,