Summary of What Needs to be Done:
backend/secuscan/finding_intelligence.py contains the build_scan_diff function which computes a diff between current and previous scan findings. The existing test files do not cover this function. It identifies newly added findings, removed findings (present in previous but not current), and unchanged findings.
Changes that Need to be Made:
Add tests to an appropriate existing test file covering:
- build_scan_diff returns correct added, removed, unchanged sets for two finding lists
- Empty current and previous lists returns empty diff
- Findings identified by their signature (issue_signature)
- Only findings with the same signature are matched between lists
- Added findings are those in current but not previous
- Removed findings are those in previous but not current
- Unchanged findings appear in both lists with same signature
Impact that it would Provide:
- Coverage: adds tests for a function that has no test coverage
- Reliability: build_scan_diff is used for reporting scan deltas to users
- Complements existing finding intelligence tests
Note: This task is being handled by tmdeveloper007 — please assign to that account when picking it up.
Summary of What Needs to be Done:
backend/secuscan/finding_intelligence.py contains the build_scan_diff function which computes a diff between current and previous scan findings. The existing test files do not cover this function. It identifies newly added findings, removed findings (present in previous but not current), and unchanged findings.
Changes that Need to be Made:
Add tests to an appropriate existing test file covering:
Impact that it would Provide:
Note: This task is being handled by tmdeveloper007 — please assign to that account when picking it up.