Skip to content

Fix Contrast parser collapsing findings with the same rule name#14714

Open
Jino-T wants to merge 1 commit intoDefectDojo:bugfixfrom
Jino-T:contrast-parser-update
Open

Fix Contrast parser collapsing findings with the same rule name#14714
Jino-T wants to merge 1 commit intoDefectDojo:bugfixfrom
Jino-T:contrast-parser-update

Conversation

@Jino-T
Copy link
Copy Markdown
Contributor

@Jino-T Jino-T commented Apr 20, 2026

[sc-12973]

Summary

  • The dupe_key in the Contrast parser was hashed from vuln_id_from_tool (Rule Name), causing all findings of the same rule type (e.g. ldap-injection) to be collapsed into a single finding
  • Changed the dupe_key to hash unique_id_from_tool (Vulnerability ID) instead, since each Contrast Vulnerability ID uniquely identifies a distinct finding instance
  • The existing merge/aggregation block is retained as a safety net for the edge case of duplicate Vulnerability IDs in a report

Test plan

  • test_ldap_multiple_findings — verifies that 3 findings with the same Rule Name but different Vulnerability IDs are returned as 3 distinct findings (regression test for the bug)
  • test_duplicate_vuln_id_is_merged — verifies the merge safety net still works when a Vulnerability ID appears twice in a report
  • test_example_report and test_example2_report — existing tests updated to reflect correct post-fix finding counts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant