-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Re-importing the same report leaves the duplicates in status mitigated #3958
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
It looks like this was fixed via #3753 |
I was under the impression this was fixed, but may not be @valentijnscholten could you please confirm? |
This still happens when an import contains duplicates, i.e. 3 findings getting the same Usually it means the deduplication algorithm is not 100% correct for the scanner, or the parser doesn't do a good job around I think it's quite complicated for a 'good first issue' as one needs to fully understand all the details of import/reimport/hash_code, hope you don't mind me removing that label again. |
this should fix DefectDojo#3958 the aggregation mechanism and deduplication mechanism for checkmarx are now using the same fields it now uses the query id of checkmarx in the hash code to avoid creating multiple issue for each checkmarx "result" we keep the aggregation but now we can no longer find duplicates inside a single report
) this should fix #3958 the aggregation mechanism and deduplication mechanism for checkmarx are now using the same fields it now uses the query id of checkmarx in the hash code to avoid creating multiple issue for each checkmarx "result" we keep the aggregation but now we can no longer find duplicates inside a single report
* return stats for api (re)imports * return stats for api (re)imports * add total * attempt model statistics * remove model statistics * finish + tests * finish + tests * cleanup * remove migration * fix UI import * fix existings tests * Revert "remove migration" This reverts commit 0b7781e. * make import history work around #3958 * fix mocking * fix old tests * rebase migration * fix test after merging dev * support TRACK_IMPORT_HISTORY=False
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
don't think it was fixed |
Any updates on this issue? Still annoying in 2024 |
Bug description
When we import a report which includes itself duplicates, when re-importing the same report, the duplicates get mitigated.
It doesn't seem correct to me. I'd expect to have :
The problem is that when matching the new findings to the existing findings, we always match the new findings to the same single original finding (the one that's not duplicate). Consequently, the duplicates from the original report are flagged as mitigated because no new finding was matched against them.
i think the issue is here (serializers.py and test/views.py)
Intead of working on the first finding that matches, we should work on all of them (might need a bit of tuning in order not to re-save the same findings multiples times...)
Sample data: with checkmarx parser attached
Steps to reproduce
Steps to reproduce the behavior:
Expected behavior
The status after the re-import is the same as after the initial import
Deployment method (select with an
X
)Environment information
Sample scan files (optional)
See attached
checkmarx_duplicate_in_same_report.zip
Screenshots (optional)
Console logs (optional)
Additional context (optional)
I've found this while working on #3753 and the provided report will produce the issue after this is merged. The problem was present before PR 3753 but the test data provided might not replicate it.
The text was updated successfully, but these errors were encountered: