Skip to content

minor: use django.conf.settings over dojo.settings everywhere#14434

Open
fopina wants to merge 2 commits intoDefectDojo:devfrom
fopina:fork_friendly/settings_module
Open

minor: use django.conf.settings over dojo.settings everywhere#14434
fopina wants to merge 2 commits intoDefectDojo:devfrom
fopina:fork_friendly/settings_module

Conversation

@fopina
Copy link
Contributor

@fopina fopina commented Mar 2, 2026

Description

I was having issues when setting DJANGO_MODULE_SETTINGS to a custom module and noticed dojo.settings was imported directly in some places

  • wsgi.py
    • I can't find anything using this file (only dojo/wsgi.py)
    • typical django project does not have it either - only mainapp/wsgi.py and it is currently here
    • deleted
  • dojo/location/models.py - setting read from dojo.settings instead of django.conf.settings
    • replaced use with django.conf.settings
    • also moved to app.ready() to avoid triggering LazySettings evaluation at model import time
  • widgets.py - also replace dojo.settings direct use

@fopina fopina requested review from Maffooch and mtesauro as code owners March 2, 2026 23:34
@fopina fopina changed the base branch from master to dev March 2, 2026 23:34
@fopina fopina marked this pull request as draft March 3, 2026 07:15
@fopina fopina marked this pull request as ready for review March 3, 2026 09:44
@dryrunsecurity
Copy link

dryrunsecurity bot commented Mar 3, 2026

DryRun Security

🔴 Risk threshold exceeded.

This pull request modifies sensitive files (dojo/apps.py and dojo/reports/widgets.py); the scanner flagged these as configured codepath edits and notes that sensitive paths and allowed authors can be set in .dryrunsecurity.yaml. These findings are marked with a failing risk threshold but are non-blocking.

🔴 Configured Codepaths Edit in dojo/apps.py (drs_102055b1)
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/reports/widgets.py (drs_3a61a761)
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.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant