-
Notifications
You must be signed in to change notification settings - Fork 1.8k
auditlog: switch to pghistory (for real) #13587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
auditlog: switch to pghistory (for real) #13587
Conversation
|
Converted back to draft as we need to align the merge/release with Pro. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
Conflicts have been resolved. A maintainer will review the pull request shortly. |
205d9e0 to
a097be5
Compare
dojo/settings/settings.dist.py
Outdated
| # Insert pghistory HistoryMiddleware before CurrentRequestUserMiddleware | ||
| middleware_list.insert(crum_index, "dojo.middleware.PgHistoryMiddleware") | ||
| # Insert pghistory HistoryMiddleware before CurrentRequestUserMiddleware | ||
| middleware_list.insert(crum_index, "dojo.middleware.PgHistoryMiddleware") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this moved the MIDDLEWARE block?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔴 Risk threshold exceeded.This pull request modifies several sensitive code paths (dojo/filters.py, dojo/middleware.py, and two DB migration scripts dojo/db_migrations/0249_* and 0250_*), which the scanner flagged as sensitive edits that may require configuration of allowed authors or paths in .dryrunsecurity.yaml. None of the findings are marked blocking, but they are flagged at a failing risk threshold and should be reviewed carefully.
🔴 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/middleware.py
| 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/middleware.py
| 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/db_migrations/0249_findingreviewers_findingreviewersevent_and_more.py
| 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/db_migrations/0250_pghistory_backfill.py
| 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/filters.py
| 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.
In #13169 we introducted
django-pghistoryas an alternative auditlog solution. The goal has always been to move todjango-pghistory, which is what this PR does now that we have had some time to test it.This PR:
DD_AUDITLOG_TYPEdjango-auditlogdjango-auditlogI tried removing the
django-auditlogas a dependency, but this has some complications. We may have to postpone this a bit to not have everything in one release.