Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(trufflehog): add link field and deduplicate issues based on it #10118

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dojo/settings/settings.dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ def saml2_attrib_map_format(dict):
'KubeHunter Scan': ['title', 'description'],
'kube-bench Scan': ['title', 'vuln_id_from_tool', 'description'],
'Threagile risks report': ['title', 'cwe', "severity"],
'Trufflehog Scan': ['title', 'description', 'line'],
'Trufflehog Scan': ['url'],
'Humble Json Importer': ['title'],
'MSDefender Parser': ['title', 'description'],
'HCLAppScan XML': ['title', 'description'],
Expand Down Expand Up @@ -1319,7 +1319,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']
Expand Down
2 changes: 1 addition & 1 deletion dojo/tools/trufflehog/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def get_findings_v3(self, data, test):
references="N/A",
file_path=file,
line=line_number, # setting it to a fake value to activate deduplication
url="N/A",
url=link,
dynamic_finding=False,
static_finding=True,
nb_occurences=1
Expand Down
Loading