bugfix: reimport: close_old_findings must respect service field#12782
Merged
valentijnscholten merged 6 commits intoJul 17, 2025
Merged
Conversation
3 tasks
|
This pull request contains two findings: an insecure default setting that could automatically close old security findings without proper review, and debug logging statements that might expose sensitive database query details if logs are inadvertently made public.
Insecure Default Finding Closure in
|
| Vulnerability | Insecure Default Finding Closure |
|---|---|
| Description | The close_old_findings form field is set with initial=True, which means by default, old findings will be automatically closed when re-importing a scan. This creates a potential security risk where legitimate findings might be inadvertently marked as mitigated without proper review. The default 'true' setting could lead to unintentional hiding of security issues, especially if users are not carefully reviewing the import process. |
django-DefectDojo/dojo/forms.py
Lines 651 to 657 in 3815e58
Sensitive Information Logging in dojo/importers/default_reimporter.py
| Vulnerability | Sensitive Information Logging |
|---|---|
| Description | Debug logging statements expose sensitive internal details about database queries and finding identifiers. The logs reveal database query structures and finding IDs/hash codes, which could provide reconnaissance information to potential attackers if debug logs are accidentally exposed or left enabled in production environments. |
django-DefectDojo/dojo/importers/default_reimporter.py
Lines 162 to 176 in 3815e58
All finding details can be found in the DryRun Security Dashboard.
Maffooch
approved these changes
Jul 16, 2025
blakeaowens
approved these changes
Jul 16, 2025
dogboat
approved these changes
Jul 17, 2025
b54652e
into
DefectDojo:bugfix
162 of 164 checks passed
Maffooch
added a commit
that referenced
this pull request
Jul 22, 2025
As part of #12782 the default value for `close_old_findings` was swapped from `True` to `False`. This PR restores that functionality
Maffooch
added a commit
that referenced
this pull request
Jul 22, 2025
As part of #12782 the default value for `close_old_findings` was swapped from `True` to `False`. This PR restores that functionality
Maffooch
added a commit
that referenced
this pull request
Jul 22, 2025
* Update versions in application files * Reimport: Restore default for `close_old_findings` to `True` (#12837) As part of #12782 the default value for `close_old_findings` was swapped from `True` to `False`. This PR restores that functionality * Update versions in application files --------- Co-authored-by: DefectDojo release bot <dojo-release-bot@users.noreply.github.com> Co-authored-by: Cody Maffucci <46459665+Maffooch@users.noreply.github.com>
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.
Fixes #12754
reimportwas not respecting the value of theservicefield when closing old findings.The problem was proven by a test case and is now fixed by the PR.
For
importthere already was working code and a test case covering this.The PR also tweaks the docs and help texts for the
close_old_findingsrelated flags.The new testcase also asserts that the "reopen" functionality of
reimportrespects theservicefield.