reimport: match findings in batches#13889
Merged
valentijnscholten merged 28 commits intoDefectDojo:devfrom Dec 19, 2025
Merged
Conversation
Contributor
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Contributor
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
🔴 Risk threshold exceeded.This pull request modifies sensitive codepaths (dojo/finding/deduplication.py and dojo/importers/default_reimporter.py) and the scanner flagged those edits as sensitive; you can configure allowed authors and sensitive paths in .dryrunsecurity.yaml to adjust risk handling.
🔴 Configured Codepaths Edit in
|
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/importers/default_reimporter.py
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
🔴 Configured Codepaths Edit in dojo/importers/default_reimporter.py
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
We've notified @mtesauro.
All finding details can be found in the DryRun Security Dashboard.
Maffooch
approved these changes
Dec 17, 2025
dogboat
approved these changes
Dec 19, 2025
Jino-T
approved these changes
Dec 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reimport processes all findings in the report. For each finding it tries to find a match in the existing findings already present in the Test. This matching used to be done a a per finding basis. So 1000 findings results in a 1000 database queries. This PR batches this based on the code we also use for deduplication. Candidates for matches are retrieved in batches for a 1000 incoming findings at once. This also allows for prefetching vulnerability_ids, endpoints and endpoin statuses. This makes reimport a lot more effecient.
An improvement of ~77.7% on reimport of identical reports:
If the report being reimported has some new or mitigated findings, of course there will still be some time used to process these changes making the real world gains a little lower.
The PR also includes some other optimizations/fixes:
cvewas not stored during reimportThis PR affects Pro.