Repository navigation
Conversation
|
This pull request contains multiple low-severity findings where user 'svader0' modified sensitive codepaths, including database migrations, middleware, and templates, without being on the allowed authors list. These issues are non-blocking and do not prevent the merge.
Configured Sensitive Codepath Modified by Non-Allowed Author in
|
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/db_migrations/0301_system_settings_read_only_mode.py' matches configured sensitive codepath pattern 'dojo/db_migrations/*.py' and was modified by 'svader0' (commit 1e2caf2) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/middleware.py (drs_31d3a7bd)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/middleware.py' matches configured sensitive codepath pattern 'dojo/middleware.py' and was modified by 'svader0' (commit 8102418) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/celery.py (drs_b952195b)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/celery.py' matches configured sensitive codepath pattern 'dojo/celery.py' and was modified by 'svader0' (commit 7653f3f) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/context_processors.py (drs_e30d21fe)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/context_processors.py' matches configured sensitive codepath pattern 'dojo/context_processors.py' and was modified by 'svader0' (commit 990c052) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/api_v2/exception_handler.py (drs_17be5e0d)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/api_v2/exception_handler.py' matches configured sensitive codepath pattern 'dojo/api_v2/*.py' and was modified by 'svader0' (commit 20ca5ba) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/importers/base_importer.py (drs_cf7a3c5b)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/importers/base_importer.py' matches configured sensitive codepath pattern 'dojo/importers/*.py' and was modified by 'svader0' (commit 20ca5ba) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/importers/default_reimporter.py (drs_3ad2b3a1)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/importers/default_reimporter.py' matches configured sensitive codepath pattern 'dojo/importers/*.py' and was modified by 'svader0' (commit 20ca5ba) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/importers/import_lock.py (drs_f5e01bf7)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/importers/import_lock.py' matches configured sensitive codepath pattern 'dojo/importers/*.py' and was modified by 'svader0' (commit 20ca5ba) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/tasks.py (drs_14ca810d)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/tasks.py' matches configured sensitive codepath pattern 'dojo/tasks.py' and was modified by 'svader0' (commit 20ca5ba) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/templates/dojo/filter_js_snippet.html (drs_9b0c9603)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/templates/dojo/filter_js_snippet.html' matches configured sensitive codepath pattern 'dojo/templates/**/*.html' and was modified by 'svader0' (commit 20ca5ba) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/templates/dojo/findings_list_snippet.html (drs_e9b78bb4)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/templates/dojo/findings_list_snippet.html' matches configured sensitive codepath pattern 'dojo/templates/**/*.html' and was modified by 'svader0' (commit 20ca5ba) who is not in the allowed authors list. |
Configured Sensitive Codepath Modified by Non-Allowed Author in dojo/templates/dojo/view_test.html (drs_2fdcb2a1)
| Vulnerability | Configured Sensitive Codepath Modified by Non-Allowed Author |
|---|---|
| Description | File 'dojo/templates/dojo/view_test.html' matches configured sensitive codepath pattern 'dojo/templates/**/*.html' and was modified by 'svader0' (commit 20ca5ba) who is not in the allowed authors list. |
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.
svader0
force-pushed
the
feat/read-only-mode
branch
from
October 16, 2026 23:07
ae7aa72 to
5911c02
Compare
This branch has not been deployed
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.
Description
This adds a "Read-only mode" checkbox to System Settings. When a superuser turns it on, DefectDojo rejects every change from the UI and the API until a superuser turns it off again. Use it to freeze an instance before a migration or a database copy, so the data stops changing while you copy it.
While it is on:
POST,PUT,PATCHandDELETEis rejected, superusers included. Reads keep working.423 Lockedwith a JSON message. Normal form submits go back to the page they came from with an error message.READ_ONLY_MODE_EXEMPT_URLSsetting.Turn it on in Configuration > System Settings, or with
PATCH /api/v2/system_settings/1/and{"read_only_mode": true}. No restart is needed. The check reads the settings cache each request already fills, so it adds no database queries.Known limits: GET views that write as a side effect, management commands and the Django shell are not blocked. Webhooks get a redirect instead of a
423. htmx actions show only the banner. A few POSTs that only read (report builder,generate_report, Celery purge, banner dismiss) are blocked too.Test results
unittests/test_read_only_mode.py(18 tests): blocked writes, safe methods, every exempt URL, lock and unlock through the API, the redirect target with an open-redirect fallback, a lock change seen by the next request without a signal, zero extra queries, the beat-task skip, and the banner.HostandReferer, SQL toggles, parallel requests across 4 uwsgi processes). None got through.makemigrations --check,spectacular --fail-on-warnand ruff are clean. Checked by hand in the browser: lock on, an edit is rejected and not saved, sign-out and sign-in work, lock off, the edit saves.Documentation
The cutover section of
migrating_from_open_source.mdnow says to turn on read-only mode and wait for running Celery tasks before the final dump. The restore step turns the mode off again in the restored database, because the dump keeps it on.Checklist
dev.devbranch.