Skip to content
Merged
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
2 changes: 1 addition & 1 deletion dojo/tools/trufflehog3/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def get_finding_current(self, json_data, test, dupes):
title=title,
test=test,
cwe=798,
description=description,
description=description.replace("\x00", "\uFFFD"),
severity=severity,
mitigation="Secrets and passwords should be stored in a secure vault or secure storage.",
impact="This weakness can lead to the exposure of resources or functionality to unintended actors, possibly providing attackers with sensitive information or even execute arbitrary code.",
Expand Down
21 changes: 21 additions & 0 deletions unittests/scans/trufflehog3/issue_6999.json

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions unittests/tools/test_trufflehog3_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,9 @@ def test_many_vulns_current(self):
self.assertEqual('env-file.txt', finding.file_path)
self.assertEqual(10, finding.line)
self.assertEqual(1, finding.nb_occurences)

def test_issue_6999(self):
test_file = open(sample_path("issue_6999.json"))
parser = TruffleHog3Parser()
findings = parser.get_findings(test_file, Test())
self.assertEqual(len(findings), 1)