-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Settings SHA: The Removal #11299
base: bugfix
Are you sure you want to change the base?
Settings SHA: The Removal #11299
Conversation
DryRun Security SummaryThe pull request covers various updates and modifications to the Dojo application's unit tests, GitHub Actions workflow, and configuration files, with potential security implications related to the removal of the integrity check for the Expand for full summarySummary: The code changes in this pull request cover various updates and modifications to the Dojo application's unit tests, GitHub Actions workflow, and configuration files. While the changes do not introduce any obvious security vulnerabilities, there are a few areas that should be reviewed from an application security perspective. The removal of the The changes to the GitHub Actions workflow for merging the master branch into the dev and bugfix branches appear to be a standard process for managing version updates and merging changes between branches. However, it's important to ensure that the version numbers are updated correctly and that the upgrade notes are accurate and complete to help users upgrade their systems safely. The changes to the The changes to the Files Changed:
Code AnalysisWe ran
Riskiness🟢 Risk threshold not exceeded. |
Q: If |
@kiblik Taking a step back, I'm curious the benefit you thought came from the current sha256sum of settings.dist.py. To me, it was a signal to users that they shouldn't be editing settings.dist.py but using local_settings.py for their deploy customizations. Your reply focuses more on hash codes so I'm wondering if I missed something about the original intent of adding that sha256sum check. |
Thank you @mtesauro. Good point, I haven't described my story behind it. |
What if we just add this information to the documentation? |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There is already a pretty good entry in the documentation warning about the changing What scares me about moving deduplication settings out of settings.py is that I fear they may not be configurable without rebuilding images. If that were not an issue, and the task was still to move ~85 dedupe settings to the parser level, it makes me wonder: Is all of that work (and potential migration woes/instability on update) worth it to keep an integrity check? |
It is sorta humorous to me that removing the integrity check is causing conflicts around the integrity check 😅 |
It seems like the only way to make this less painful would be to auto-generate the checksum at PR merge and/or release time, rather than asking developers to manage it. This would prevent merge conflicts while preserving the original intent, which I think has some value. Today, auto-generation only happens as part of automated merges, e.g. dev -> master, but it could in principle be extended to all PR merges that affect the settings file. This would require a flag (e.g. |
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.
I'm not sure we need to announce the removal of this check in our release notes, but just wanted to note that we included it in the release notes in the original PR
Hi everybody,
On the other hand, we might totally turn around perspective: Do not build walls but ask the question "Why are people editing these files"? In my opinion, it might be tightly connected to the quality of documentation and the way how it is written. This is not about blaming somebody. I was also participating on it in some way. If Configuration section in docs starts with the words "The main settings are stored in
Hint (for somebody who will implement a validator): >>> from dojo.settings import settings
>>> for key, (key_type, default) in settings.env.scheme.items():
... print(f"Key:{key}\tType:{key_type}\tDefault:{default}")
...
Key:DD_SITE_URL Type:<class 'str'> Default:http://localhost:8080
Key:DD_DEBUG Type:<class 'bool'> Default:False
Key:DD_TEMPLATE_DEBUG Type:<class 'bool'> Default:False
Key:DD_LOG_LEVEL Type:<class 'str'> Default:
Key:DD_DJANGO_METRICS_ENABLED Type:<class 'bool'> Default:False
Key:DD_LOGIN_REDIRECT_URL Type:<class 'str'> Default:/
... |
Following the introduction of the settings.dist.py integrity check, it has made contributing to DefectDojo more challenging. As PRs are merged with settings changes for parsers, vulnerability IDs, and new environment variables, everyone else with similar changes will now have conflicts. At times this could impact many people at once, and even multiple times within a singe PR.
Thought the integrity check is a great idea in enforcing that settings.dist.py not be touched, the tradeoff for ease of development is a turnoff for contributors
[sc-8583]