devsecops-engine-tools 1.105.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.

@@ -76,6 +76,9 @@ class TrufflehogRun(ToolGateway):
76
76
  enable_custom_rules = config_tool[tool]["ENABLE_CUSTOM_RULES"]
77
77
  if enable_custom_rules:
78
78
  Utils().configurate_external_checks(tool, config_tool, secret_tool, secret_external_checks, path)
79
+ exclude_detectors = config_tool[tool]["EXCLUDE_DETECTORS"]
80
+ if exclude_detectors:
81
+ exclude_detectors = ",".join(exclude_detectors)
79
82
 
80
83
  with concurrent.futures.ThreadPoolExecutor(max_workers=config_tool[tool]["NUMBER_THREADS"]) as executor:
81
84
  results = executor.map(
@@ -87,7 +90,8 @@ class TrufflehogRun(ToolGateway):
87
90
  [repository_name] * len(include_paths),
88
91
  [enable_custom_rules] * len(include_paths),
89
92
  [agent_os] * len(include_paths),
90
- [folder_path] * len(include_paths)
93
+ [folder_path] * len(include_paths),
94
+ [exclude_detectors] * len(include_paths)
91
95
  )
92
96
  findings, file_findings = self.create_file(self.decode_output(results), path, config_tool, tool)
93
97
  return findings, file_findings
@@ -124,7 +128,8 @@ class TrufflehogRun(ToolGateway):
124
128
  repository_name,
125
129
  enable_custom_rules,
126
130
  agent_os,
127
- folder_path
131
+ folder_path,
132
+ exclude_detectors
128
133
  ):
129
134
  path_folder = folder_path if folder_path is not None else f"{path}/{repository_name}"
130
135
  command = f"{trufflehog_command} filesystem {path_folder} --include-paths {include_path} --exclude-paths {exclude_path} --no-verification --no-update --json"
@@ -133,6 +138,9 @@ class TrufflehogRun(ToolGateway):
133
138
  f"--config {path}/rules/trufflehog/custom-rules.yaml --no-verification --no-update --json" if "Linux" or "Darwin" in agent_os else
134
139
  "--no-verification --no-update --json")
135
140
 
141
+ if exclude_detectors:
142
+ command = f"{command} --exclude-detectors {exclude_detectors}"
143
+
136
144
  result = subprocess.run(command, capture_output=True, shell=True, text=True, encoding='utf-8')
137
145
  return result.stdout.strip()
138
146
 
@@ -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.105.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.105.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=SEPteiAKmXH-B5JojzcRHDChVmeoqG-X532Ga0_GU2U,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
@@ -200,7 +200,7 @@ devsecops_engine_tools/engine_sast/engine_secret/src/infrastructure/driven_adapt
200
200
  devsecops_engine_tools/engine_sast/engine_secret/src/infrastructure/driven_adapters/gitleaks/gitleaks_tool.py,sha256=HTrbIronNbasyALapm0j3ZEaJCs7X7CRPS6uE_xPAMc,6049
201
201
  devsecops_engine_tools/engine_sast/engine_secret/src/infrastructure/driven_adapters/trufflehog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
202
202
  devsecops_engine_tools/engine_sast/engine_secret/src/infrastructure/driven_adapters/trufflehog/trufflehog_deserealizator.py,sha256=mrSqPrkMiikxQ_uY-rF2I8QvicsOMdMBzTC8CTV3Wk8,2392
203
- devsecops_engine_tools/engine_sast/engine_secret/src/infrastructure/driven_adapters/trufflehog/trufflehog_run.py,sha256=azMbd25Yvkil9xh6dWcBFBL1tFse1yr_-2zn8sBUYeU,8176
203
+ devsecops_engine_tools/engine_sast/engine_secret/src/infrastructure/driven_adapters/trufflehog/trufflehog_run.py,sha256=23nTGgwFn_-fNKXJEy2iTV1gIFPE_VdQWX_d8XVEeus,8544
204
204
  devsecops_engine_tools/engine_sast/engine_secret/src/infrastructure/entry_points/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
205
205
  devsecops_engine_tools/engine_sast/engine_secret/src/infrastructure/entry_points/entry_point_tool.py,sha256=61OnP4ehmzh-tRbACgZsB4IJi6J6HT9E6KCOcuhvnRw,1185
206
206
  devsecops_engine_tools/engine_sca/__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.105.0.dist-info/METADATA,sha256=f4p6nZe_WDm7hrJZrf6rcIEQoyKlG71rZKP76z0a-Y4,3233
387
- devsecops_engine_tools-1.105.0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
388
- devsecops_engine_tools-1.105.0.dist-info/entry_points.txt,sha256=OWAww5aBsGeMv0kWhSgVNB0ySKKpYuJd4dly0ikFPkc,283
389
- devsecops_engine_tools-1.105.0.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
390
- devsecops_engine_tools-1.105.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,,