diff --git a/dojo/settings/settings.dist.py b/dojo/settings/settings.dist.py index 611bad2b65d..f66728cc188 100644 --- a/dojo/settings/settings.dist.py +++ b/dojo/settings/settings.dist.py @@ -1242,6 +1242,7 @@ def saml2_attrib_map_format(dict): 'kube-bench Scan': ['title', 'vuln_id_from_tool', 'description'], 'Threagile risks report': ['title', 'cwe', "severity"], 'Trufflehog Scan': ['title', 'description', 'line'], + 'Trufflehog3 Scan': ['url', 'component_name'], 'Humble Json Importer': ['title'], 'MSDefender Parser': ['title', 'description'], 'HCLAppScan XML': ['title', 'description'], @@ -1319,7 +1320,7 @@ def saml2_attrib_map_format(dict): # List of fields that are known to be usable in hash_code computation) # 'endpoints' is a pseudo field that uses the endpoints (for dynamic scanners) # 'unique_id_from_tool' is often not needed here as it can be used directly in the dedupe algorithm, but it's also possible to use it for hashing -HASHCODE_ALLOWED_FIELDS = ['title', 'cwe', 'vulnerability_ids', 'line', 'file_path', 'payload', 'component_name', 'component_version', 'description', 'endpoints', 'unique_id_from_tool', 'severity', 'vuln_id_from_tool', 'mitigation'] +HASHCODE_ALLOWED_FIELDS = ['title', 'cwe', 'vulnerability_ids', 'line', 'file_path', 'payload', 'component_name', 'component_version', 'description', 'endpoints', 'unique_id_from_tool', 'severity', 'vuln_id_from_tool', 'mitigation', 'url'] # Adding fields to the hash_code calculation regardless of the previous settings HASH_CODE_FIELDS_ALWAYS = ['service'] diff --git a/dojo/tools/trufflehog3/parser.py b/dojo/tools/trufflehog3/parser.py index 3302af93c83..f980712f717 100644 --- a/dojo/tools/trufflehog3/parser.py +++ b/dojo/tools/trufflehog3/parser.py @@ -113,6 +113,7 @@ def get_finding_current(self, json_data, test, dupes): # author = json_data.get('author') commit = json_data.get("commit") date = json_data.get("date") + link = json_data.get("link", "") title = f"{message} found in {file}" @@ -165,5 +166,6 @@ def get_finding_current(self, json_data, test, dupes): dynamic_finding=False, static_finding=True, nb_occurences=1, + url=link ) dupes[dupe_key] = finding