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

@@ -21,36 +21,40 @@ class TrivyDeserializator(DeseralizatorGateway):
21
21
  with open(image_scanned, "rb") as file:
22
22
  image_object = file.read()
23
23
  json_data = json.loads(image_object)
24
- vulnerabilities_data = json_data.get("Results", [{}])[0].get("Vulnerabilities", [])
25
- vulnerabilities = [
26
- Finding(
27
- id=vul.get("VulnerabilityID", ""),
28
- cvss=str(
29
- next(
30
- (
31
- v["V3Score"]
32
- for v in vul["CVSS"].values()
33
- if "V3Score" in v
34
- ),
35
- None,
36
- )
37
- ),
38
- where=vul.get("PkgName", "")
39
- + ":"
40
- + vul.get("InstalledVersion", ""),
41
- description=vul.get("Description", "").replace("\n", "")[:150],
42
- severity=vul.get("Severity", "").lower(),
43
- identification_date=datetime.now().strftime("%Y-%m-%dT%H:%M:%S%z"),
44
- published_date_cve=self._check_date_format(vul),
45
- module=module,
46
- category=Category.VULNERABILITY,
47
- requirements=vul.get("FixedVersion") or vul.get("Status", ""),
48
- tool="Trivy",
49
- )
50
- for vul in vulnerabilities_data
51
- if vul.get("CVSS") and vul.get("PublishedDate")
52
- ]
53
- list_open_vulnerabilities.extend(vulnerabilities)
24
+ results = json_data.get("Results", [{}])
25
+
26
+ for result in results:
27
+ vulnerabilities_data = result.get("Vulnerabilities", [])
28
+ vulnerabilities = [
29
+ Finding(
30
+ id=vul.get("VulnerabilityID", ""),
31
+ cvss=str(
32
+ next(
33
+ (
34
+ v["V3Score"]
35
+ for v in vul["CVSS"].values()
36
+ if "V3Score" in v
37
+ ),
38
+ None,
39
+ )
40
+ ),
41
+ where=vul.get("PkgName", "")
42
+ + ":"
43
+ + vul.get("InstalledVersion", ""),
44
+ description=vul.get("Description", "").replace("\n", "")[:150],
45
+ severity=vul.get("Severity", "").lower(),
46
+ identification_date=datetime.now().strftime("%Y-%m-%dT%H:%M:%S%z"),
47
+ published_date_cve=self._check_date_format(vul),
48
+ module=module,
49
+ category=Category.VULNERABILITY,
50
+ requirements=vul.get("FixedVersion") or vul.get("Status", ""),
51
+ tool="Trivy",
52
+ )
53
+ for vul in vulnerabilities_data
54
+ if vul.get("CVSS") and vul.get("PublishedDate")
55
+ ]
56
+ list_open_vulnerabilities.extend(vulnerabilities)
57
+
54
58
  return list_open_vulnerabilities
55
59
 
56
60
  def get_container_context_from_results(
@@ -1 +1 @@
1
- version = '1.106.0'
1
+ version = '1.106.1'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: devsecops-engine-tools
3
- Version: 1.106.0
3
+ Version: 1.106.1
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=uNHlwFQzz1Ejya9vk5HWeS31G3xUHugM9uTD5V4C29A,20
2
+ devsecops_engine_tools/version.py,sha256=Jctld65Ex65MjDF7O1lOFzEfkCaSrUw5zv8WSaRGAiI,20
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
@@ -372,7 +372,7 @@ devsecops_engine_tools/engine_utilities/ssh/managment_private_key.py,sha256=Tbe_
372
372
  devsecops_engine_tools/engine_utilities/trivy_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
373
373
  devsecops_engine_tools/engine_utilities/trivy_utils/infrastructure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
374
374
  devsecops_engine_tools/engine_utilities/trivy_utils/infrastructure/driven_adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
375
- devsecops_engine_tools/engine_utilities/trivy_utils/infrastructure/driven_adapters/trivy_deserialize_output.py,sha256=7jiZ3FRKEnWw542ei6g4ZnGkpX8RInWND_dGwJVgbrs,5321
375
+ devsecops_engine_tools/engine_utilities/trivy_utils/infrastructure/driven_adapters/trivy_deserialize_output.py,sha256=Y2X4B9qgNRn1GdRfDHv-rb-v7dNP2Aifmqzq7R3BZFA,5512
376
376
  devsecops_engine_tools/engine_utilities/trivy_utils/infrastructure/driven_adapters/trivy_manager_scan_utils.py,sha256=9bUT0V-EFhdik8aNuGTI2i4OnT1YvFT7s7xu5M5sejM,2888
377
377
  devsecops_engine_tools/engine_utilities/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
378
378
  devsecops_engine_tools/engine_utilities/utils/api_error.py,sha256=yRbad5gNUHh5nALBKkRDi-d98JPmqAhw-QJEGW4psrw,528
@@ -383,8 +383,8 @@ devsecops_engine_tools/engine_utilities/utils/name_conversion.py,sha256=ADJrRGax
383
383
  devsecops_engine_tools/engine_utilities/utils/printers.py,sha256=amYAr9YQfYgR6jK9a2l26z3oovFPQ3FAKmhq6BKhEBA,623
384
384
  devsecops_engine_tools/engine_utilities/utils/session_manager.py,sha256=Z0fdhB3r-dxU0nGSD9zW_B4r2Qol1rUnUCkhFR0U-HQ,487
385
385
  devsecops_engine_tools/engine_utilities/utils/utils.py,sha256=HCjS900TBoNcHrC4LaiP-Kf9frVdtagF130qOUgnO2M,6757
386
- devsecops_engine_tools-1.106.0.dist-info/METADATA,sha256=YRb9FlvrBq26rua87UyyUN-RvTJrDRGTpbMilyx7goo,3233
387
- devsecops_engine_tools-1.106.0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
388
- devsecops_engine_tools-1.106.0.dist-info/entry_points.txt,sha256=OWAww5aBsGeMv0kWhSgVNB0ySKKpYuJd4dly0ikFPkc,283
389
- devsecops_engine_tools-1.106.0.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
390
- devsecops_engine_tools-1.106.0.dist-info/RECORD,,
386
+ devsecops_engine_tools-1.106.1.dist-info/METADATA,sha256=LTcC_WlH3sZfEDN4ilinU659nrWMJuZzn8wvYVi5IAs,3233
387
+ devsecops_engine_tools-1.106.1.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
388
+ devsecops_engine_tools-1.106.1.dist-info/entry_points.txt,sha256=OWAww5aBsGeMv0kWhSgVNB0ySKKpYuJd4dly0ikFPkc,283
389
+ devsecops_engine_tools-1.106.1.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
390
+ devsecops_engine_tools-1.106.1.dist-info/RECORD,,