Skip to content

🐛 fix close_old_findings through service field in several parsers #14640#14687

Open
manuel-sommer wants to merge 11 commits intoDefectDojo:devfrom
manuel-sommer:issue_14640_closeoldfindings
Open

🐛 fix close_old_findings through service field in several parsers #14640#14687
manuel-sommer wants to merge 11 commits intoDefectDojo:devfrom
manuel-sommer:issue_14640_closeoldfindings

Conversation

@manuel-sommer
Copy link
Copy Markdown
Contributor

@manuel-sommer manuel-sommer commented Apr 15, 2026

@github-actions github-actions bot added the docs label Apr 15, 2026
@manuel-sommer manuel-sommer marked this pull request as ready for review April 15, 2026 07:56
@github-actions github-actions bot added the New Migration Adding a new migration file. Take care when merging. label Apr 15, 2026
@manuel-sommer
Copy link
Copy Markdown
Contributor Author

@valentijnscholten please take a look here

@dryrunsecurity
Copy link
Copy Markdown

dryrunsecurity bot commented Apr 15, 2026

DryRun Security

This pull request includes a sensitive edit to the file dojo/db_migrations/0264_clear_service_for_affected_parsers.py that matches configured codepaths rules (see .dryrunsecurity.yaml) and is flagged as an error under the risk threshold; the finding is non-blocking but should be reviewed for allowed authors and path sensitivity.

🔴 Configured Codepaths Edit in dojo/db_migrations/0264_clear_service_for_affected_parsers.py (drs_5c37af90)
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.


Comment to provide feedback on these findings.

Report false positive: @dryrunsecurity fp [FINDING ID] [FEEDBACK]
Report low-impact: @dryrunsecurity nit [FINDING ID] [FEEDBACK]

Example: @dryrunsecurity fp drs_90eda195 This code is not user-facing

All finding details can be found in the DryRun Security Dashboard.

@manuel-sommer manuel-sommer changed the title 🐛 fix close_old_findings field in several parsers #14640 🐛 fix close_old_findings through service field in several parsers #14640 Apr 15, 2026
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a service was supplied to these test types at import time, does that value override the value set by the parser? If so, could this migration potentially erase service fields that are from the user?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a question beyond my knowledge. Maybe @valentijnscholten has an opinion on this.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The importers overwrite any fields set by the parsers:

if self.service is not None:
unsaved_finding.service = self.service

if self.service is not None:
unsaved_finding.service = self.service

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it seems like this migration would erase data intentionally set by users...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a possibility to distinguish between the two ways?

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

Labels

docs New Migration Adding a new migration file. Take care when merging. parser unittests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants