Ruff: Add PLC1901 to dojo/models#13178
Merged
valentijnscholten merged 2 commits intoDefectDojo:devfrom Sep 19, 2025
Merged
Conversation
🔴 Risk threshold exceeded.This pull request modifies dojo/models.py and triggered sensitive-file edit warnings (these paths and allowed authors can be configured in .dryrunsecurity.yaml). It also changes the clean() method to convert empty strings for protocol, userinfo, path, query, and fragment to None, which may cause TypeError in downstream code that expects strings.
🔴 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/models.py
| Vulnerability | Configured Codepaths Edit |
|---|---|
| Description | Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml. |
Potential Type Confusion (None vs. Empty String) in dojo/models.py
| Vulnerability | Potential Type Confusion (None vs. Empty String) |
|---|---|
| Description | The clean method now explicitly converts empty string values for protocol, userinfo, path, query, and fragment to None. This change in type from an empty string to None can lead to TypeError exceptions in downstream code that expects a string and does not handle None values, potentially causing a denial of service. |
django-DefectDojo/dojo/models.py
Lines 1826 to 1841 in 4783658
We've notified @mtesauro.
All finding details can be found in the DryRun Security Dashboard.
Maffooch
approved these changes
Sep 17, 2025
Jino-T
approved these changes
Sep 17, 2025
paulOsinski
approved these changes
Sep 19, 2025
blakeaowens
approved these changes
Sep 19, 2025
Maffooch
pushed a commit
to valentijnscholten/django-DefectDojo
that referenced
this pull request
Feb 16, 2026
* Ruff: Add PLC1901 to dojo/models * update
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.
No description provided.