devsecops-engine-tools 1.106.1__py3-none-any.whl → 1.108.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.
- devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/cdxgen/cdxgen.py +14 -6
- devsecops_engine_tools/engine_sast/engine_secret/src/infrastructure/driven_adapters/trufflehog/trufflehog_run.py +11 -3
- devsecops_engine_tools/version.py +1 -1
- {devsecops_engine_tools-1.106.1.dist-info → devsecops_engine_tools-1.108.0.dist-info}/METADATA +1 -1
- {devsecops_engine_tools-1.106.1.dist-info → devsecops_engine_tools-1.108.0.dist-info}/RECORD +8 -8
- {devsecops_engine_tools-1.106.1.dist-info → devsecops_engine_tools-1.108.0.dist-info}/WHEEL +0 -0
- {devsecops_engine_tools-1.106.1.dist-info → devsecops_engine_tools-1.108.0.dist-info}/entry_points.txt +0 -0
- {devsecops_engine_tools-1.106.1.dist-info → devsecops_engine_tools-1.108.0.dist-info}/top_level.txt +0 -0
|
@@ -27,7 +27,8 @@ class CdxGen(SbomManagerGateway):
|
|
|
27
27
|
try:
|
|
28
28
|
cdxgen_version = config["CDXGEN"]["CDXGEN_VERSION"]
|
|
29
29
|
slim = "-slim" if config["CDXGEN"]["SLIM_BINARY"] else ""
|
|
30
|
-
exclude_types = config["CDXGEN"].get("EXCLUDE_TYPES",
|
|
30
|
+
exclude_types = config["CDXGEN"].get("EXCLUDE_TYPES", [])
|
|
31
|
+
exclude_paths = config["CDXGEN"].get("EXCLUDE_PATHS", [])
|
|
31
32
|
recurse = config["CDXGEN"].get("RECURSE", True)
|
|
32
33
|
debug_pipelines = config["CDXGEN"].get("DEBUG_PIPELINES", [])
|
|
33
34
|
|
|
@@ -61,13 +62,13 @@ class CdxGen(SbomManagerGateway):
|
|
|
61
62
|
logger.warning(f"{os_platform} is not supported.")
|
|
62
63
|
return None
|
|
63
64
|
|
|
64
|
-
result_sbom = self._run_cdxgen(command_prefix, artifact, service_name, exclude_types, recurse, enable_debug)
|
|
65
|
+
result_sbom = self._run_cdxgen(command_prefix, artifact, service_name, exclude_types, exclude_paths, recurse, enable_debug)
|
|
65
66
|
return get_list_component(result_sbom, config["CDXGEN"]["OUTPUT_FORMAT"])
|
|
66
67
|
except Exception as e:
|
|
67
68
|
logger.error(f"Error generating SBOM: {e}")
|
|
68
69
|
return None
|
|
69
70
|
|
|
70
|
-
def _run_cdxgen(self, command_prefix, artifact, service_name, exclude_types, recurse, enable_debug=False):
|
|
71
|
+
def _run_cdxgen(self, command_prefix, artifact, service_name, exclude_types, exclude_paths, recurse, enable_debug=False):
|
|
71
72
|
result_file = f"{service_name}_SBOM.json"
|
|
72
73
|
command = [
|
|
73
74
|
command_prefix,
|
|
@@ -77,9 +78,16 @@ class CdxGen(SbomManagerGateway):
|
|
|
77
78
|
]
|
|
78
79
|
|
|
79
80
|
if exclude_types:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
for ex in exclude_types:
|
|
82
|
+
command.extend(
|
|
83
|
+
["--exclude-type", ex]
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
if exclude_paths:
|
|
87
|
+
for ex in exclude_paths:
|
|
88
|
+
command.extend(
|
|
89
|
+
["--exclude", ex]
|
|
90
|
+
)
|
|
83
91
|
|
|
84
92
|
if not recurse:
|
|
85
93
|
command.append(
|
|
@@ -79,6 +79,8 @@ class TrufflehogRun(ToolGateway):
|
|
|
79
79
|
exclude_detectors = config_tool[tool]["EXCLUDE_DETECTORS"]
|
|
80
80
|
if exclude_detectors:
|
|
81
81
|
exclude_detectors = ",".join(exclude_detectors)
|
|
82
|
+
filter_entropy = config_tool[tool].get("FILTER_ENTROPY")
|
|
83
|
+
|
|
82
84
|
|
|
83
85
|
with concurrent.futures.ThreadPoolExecutor(max_workers=config_tool[tool]["NUMBER_THREADS"]) as executor:
|
|
84
86
|
results = executor.map(
|
|
@@ -91,7 +93,8 @@ class TrufflehogRun(ToolGateway):
|
|
|
91
93
|
[enable_custom_rules] * len(include_paths),
|
|
92
94
|
[agent_os] * len(include_paths),
|
|
93
95
|
[folder_path] * len(include_paths),
|
|
94
|
-
[exclude_detectors] * len(include_paths)
|
|
96
|
+
[exclude_detectors] * len(include_paths),
|
|
97
|
+
[filter_entropy] * len(include_paths)
|
|
95
98
|
)
|
|
96
99
|
findings, file_findings = self.create_file(self.decode_output(results), path, config_tool, tool)
|
|
97
100
|
return findings, file_findings
|
|
@@ -129,18 +132,23 @@ class TrufflehogRun(ToolGateway):
|
|
|
129
132
|
enable_custom_rules,
|
|
130
133
|
agent_os,
|
|
131
134
|
folder_path,
|
|
132
|
-
exclude_detectors
|
|
135
|
+
exclude_detectors,
|
|
136
|
+
filter_entropy
|
|
133
137
|
):
|
|
134
138
|
path_folder = folder_path if folder_path is not None else f"{path}/{repository_name}"
|
|
135
139
|
command = f"{trufflehog_command} filesystem {path_folder} --include-paths {include_path} --exclude-paths {exclude_path} --no-verification --no-update --json"
|
|
140
|
+
|
|
136
141
|
if enable_custom_rules:
|
|
137
142
|
command = command.replace("--no-verification --no-update --json", f"--config {path}//rules//trufflehog//custom-rules.yaml --no-verification --no-update --json" if "Windows" in agent_os else
|
|
138
143
|
f"--config {path}/rules/trufflehog/custom-rules.yaml --no-verification --no-update --json" if "Linux" or "Darwin" in agent_os else
|
|
139
|
-
"--no-verification --no-update --json")
|
|
144
|
+
"--no-verification --no-update --json")
|
|
140
145
|
|
|
141
146
|
if exclude_detectors:
|
|
142
147
|
command = f"{command} --exclude-detectors {exclude_detectors}"
|
|
143
148
|
|
|
149
|
+
if filter_entropy:
|
|
150
|
+
command = f"{command} --filter-entropy={filter_entropy}"
|
|
151
|
+
|
|
144
152
|
result = subprocess.run(command, capture_output=True, shell=True, text=True, encoding='utf-8')
|
|
145
153
|
return result.stdout.strip()
|
|
146
154
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
version = '1.
|
|
1
|
+
version = '1.108.0'
|
{devsecops_engine_tools-1.106.1.dist-info → devsecops_engine_tools-1.108.0.dist-info}/RECORD
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
devsecops_engine_tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
devsecops_engine_tools/version.py,sha256=
|
|
2
|
+
devsecops_engine_tools/version.py,sha256=2xLJEOyAFRaBObPOQ9ahgsePcZmOhV8PVIAkoya9oYA,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
|
|
@@ -38,7 +38,7 @@ devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/aws/secret
|
|
|
38
38
|
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/azure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
39
|
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/azure/azure_devops.py,sha256=-3KUPxlzBoxJarj8ZY8w84UffuedtBnj3z4r9UW7nFQ,6027
|
|
40
40
|
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/cdxgen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
41
|
-
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/cdxgen/cdxgen.py,sha256=
|
|
41
|
+
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/cdxgen/cdxgen.py,sha256=e6LeBm1q5_Wq26-IZ9tG1eyoYOQ409BDr6XEsyKVL2E,5850
|
|
42
42
|
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/defect_dojo/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
43
|
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/defect_dojo/defect_dojo.py,sha256=GXz-xBxptaZsQU8sR9OTcDAvdIygXmiLfmMIWhlC-hs,33105
|
|
44
44
|
devsecops_engine_tools/engine_core/src/infrastructure/driven_adapters/github/__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=
|
|
203
|
+
devsecops_engine_tools/engine_sast/engine_secret/src/infrastructure/driven_adapters/trufflehog/trufflehog_run.py,sha256=mnQBDVbNghJgLIJDmvnn9PGZoOUVeXz7d9_gxm5-8Rg,8805
|
|
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
|
|
@@ -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.
|
|
387
|
-
devsecops_engine_tools-1.
|
|
388
|
-
devsecops_engine_tools-1.
|
|
389
|
-
devsecops_engine_tools-1.
|
|
390
|
-
devsecops_engine_tools-1.
|
|
386
|
+
devsecops_engine_tools-1.108.0.dist-info/METADATA,sha256=07uUw3S0icGRSL9W0WPfDvaEkIvPAQVMfCPS2mVripc,3233
|
|
387
|
+
devsecops_engine_tools-1.108.0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
388
|
+
devsecops_engine_tools-1.108.0.dist-info/entry_points.txt,sha256=OWAww5aBsGeMv0kWhSgVNB0ySKKpYuJd4dly0ikFPkc,283
|
|
389
|
+
devsecops_engine_tools-1.108.0.dist-info/top_level.txt,sha256=ge6y0X_xBAU1aG3EMWFtl9djbVyg5BxuSp2r2Lg6EQU,23
|
|
390
|
+
devsecops_engine_tools-1.108.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{devsecops_engine_tools-1.106.1.dist-info → devsecops_engine_tools-1.108.0.dist-info}/top_level.txt
RENAMED
|
File without changes
|