Skip to content

Commit 5d5fcf7

Browse files
committed
fix: Add file_path to deduplication key for Anchore Grype parser
Modified dupe_key in parser to include file_path, preventing same CVE found in different binaries from being merged into a single finding Reference: DefectDojo#14573
1 parent af2f7fc commit 5d5fcf7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dojo/tools/anchore_grype/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def get_findings(self, file, test):
185185
if finding_epss_score is None and rel_vuln_id:
186186
finding_epss_score, finding_epss_percentile = self.get_epss_values(vuln_id, vuln_epss)
187187

188-
dupe_key = finding_title
188+
dupe_key = f"{vuln_id}|{artifact_name}|{artifact_version}|{file_path}"
189189
if dupe_key in dupes:
190190
finding = dupes[dupe_key]
191191
finding.nb_occurences += 1

0 commit comments

Comments
 (0)