devsecops-engine-tools 1.19.1__py3-none-any.whl → 1.19.3__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.

@@ -58,6 +58,7 @@ class GetExclusions:
58
58
  **exclusion,
59
59
  )
60
60
  for exclusion in config[scope][key]
61
+ if exclusion.get("id", None)
61
62
  ]
62
63
  )
63
64
  return exclusions
@@ -6,6 +6,9 @@ from devsecops_engine_tools.engine_core.src.domain.model.threshold import Thresh
6
6
  from devsecops_engine_tools.engine_core.src.domain.model.level_vulnerability import (
7
7
  LevelVulnerability,
8
8
  )
9
+ from devsecops_engine_tools.engine_core.src.domain.model.level_compliance import (
10
+ LevelCompliance,
11
+ )
9
12
 
10
13
 
11
14
  class Utils:
@@ -20,21 +23,23 @@ class Utils:
20
23
  return base64_token
21
24
 
22
25
  def update_threshold(self, threshold: Threshold, exclusions_data, pipeline_name):
23
- def set_vulnerability(level):
24
- threshold.vulnerability = LevelVulnerability(level)
26
+ def set_threshold(new_threshold):
27
+ threshold.vulnerability = LevelVulnerability(new_threshold.get("VULNERABILITY"))
28
+ threshold.compliance = LevelCompliance(new_threshold.get("COMPLIANCE")) if new_threshold.get("COMPLIANCE") else threshold.compliance
29
+ threshold.cve = new_threshold.get("CVE") if new_threshold.get("CVE") is not None else threshold.cve
25
30
  return threshold
26
31
 
27
32
  threshold_pipeline = exclusions_data.get(pipeline_name, {}).get("THRESHOLD", {})
28
33
  if threshold_pipeline:
29
- return set_vulnerability(threshold_pipeline.get("VULNERABILITY"))
34
+ return set_threshold(threshold_pipeline)
30
35
 
31
36
  search_patterns = exclusions_data.get("BY_PATTERN_SEARCH", {})
32
37
 
33
38
  match_pattern = next(
34
- (v["THRESHOLD"]["VULNERABILITY"]
39
+ (v["THRESHOLD"]
35
40
  for pattern, v in search_patterns.items()
36
41
  if re.match(pattern, pipeline_name, re.IGNORECASE)),
37
42
  None
38
43
  )
39
44
 
40
- return set_vulnerability(match_pattern) if match_pattern else threshold
45
+ return set_threshold(match_pattern) if match_pattern else threshold
@@ -1 +1 @@
1
- version = '1.19.1'
1
+ version = '1.19.3'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: devsecops-engine-tools
3
- Version: 1.19.1
3
+ Version: 1.19.3
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=N-uK6ltfPSdnwwDBqc5avozkoKIv9C7v0MSfghHhWmg,19
2
+ devsecops_engine_tools/version.py,sha256=0CyU1ge95zilH9Z3DyJB5zoA8u0EeA7zFmaASehVjeg,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
@@ -75,7 +75,7 @@ devsecops_engine_tools/engine_risk/src/domain/model/gateways/add_epss_gateway.py
75
75
  devsecops_engine_tools/engine_risk/src/domain/usecases/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
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
- devsecops_engine_tools/engine_risk/src/domain/usecases/get_exclusions.py,sha256=o4vMpmgt5q1BsaWpGZWdCHPVs1CFyj-P3TrgOSEBcqM,2327
78
+ devsecops_engine_tools/engine_risk/src/domain/usecases/get_exclusions.py,sha256=7_qbPOoTa5up9zymGQ9ancqR_J7JhMyOXDWqjq_Pdh0,2380
79
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
@@ -306,9 +306,9 @@ devsecops_engine_tools/engine_utilities/utils/logger_info.py,sha256=4Mz8Bwlm9Mku
306
306
  devsecops_engine_tools/engine_utilities/utils/name_conversion.py,sha256=ADJrRGaxYSDe0ZRh6VHRf53H4sXPcb-vNP_i81PUn3I,307
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
- devsecops_engine_tools/engine_utilities/utils/utils.py,sha256=7oWFS_Nv1NVeRuJmqQzj5yV-GEkGKNhBnGpbFaSMvmI,1406
310
- devsecops_engine_tools-1.19.1.dist-info/METADATA,sha256=RKmRv3yLtYS5kj7OQ4EuNTGRiVmwh4jim3U8CAFvJ-Q,10895
311
- devsecops_engine_tools-1.19.1.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
312
- devsecops_engine_tools-1.19.1.dist-info/entry_points.txt,sha256=MHCTFFs9bdNKo6YcWCcBW2_8X6yTisgLOlmVx-V8Rxc,276
313
- devsecops_engine_tools-1.19.1.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
314
- devsecops_engine_tools-1.19.1.dist-info/RECORD,,
309
+ devsecops_engine_tools/engine_utilities/utils/utils.py,sha256=79nXjjRjR64xvXmQzJqFpDj5xByrqQbc6OnowHqBEz4,1756
310
+ devsecops_engine_tools-1.19.3.dist-info/METADATA,sha256=utmGKLo-BoyDHmtdPij7Wo9TEmBOKlqduX4GquNXFyc,10895
311
+ devsecops_engine_tools-1.19.3.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
312
+ devsecops_engine_tools-1.19.3.dist-info/entry_points.txt,sha256=MHCTFFs9bdNKo6YcWCcBW2_8X6yTisgLOlmVx-V8Rxc,276
313
+ devsecops_engine_tools-1.19.3.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
314
+ devsecops_engine_tools-1.19.3.dist-info/RECORD,,