Closed
Conversation
Move all SSO functionality (OAuth2, SAML2, OIDC, remote user auth) into dojo/sso/ so that removing SSO requires only deleting the directory and removing packages from requirements.txt. All hooks in shared files use try/except ImportError guards that gracefully degrade when dojo/sso/ is absent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix import sorting in settings.dist.py - Suppress C408 for dict() kwargs merging pattern - Use Path() instead of os.path in sso/settings.py - Use augmented assignment (+=) for dict key concatenation - Use iterable unpacking instead of list concatenation - Add noqa for intentional non-top-level imports (try/except guards) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
This pull request includes a risky change where the login template inserts request.GET.next directly into href attributes (dojo/sso/templates/dojo/sso_login_buttons.html lines 5–8), which can lead to reflected XSS or open redirect vulnerabilities if the value is not validated or URL-encoded. Recommend validating/normalizing or URL-encoding the next parameter, or otherwise sanitizing/whitelisting allowed redirect targets to mitigate the issue.
🔴 Potential Cross-Site Scripting in
|
| Vulnerability | Potential Cross-Site Scripting |
|---|---|
| Description | The login template includes request.GET.next directly into multiple href attributes (e.g. ?next={{ request.GET.next }}) coming from user-controlled query parameters. If this value is not validated or URL-encoded before insertion it can lead to unsafe output in URLs and potentially enable reflected XSS or open redirect behavior depending on how the value is later used. |
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.
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.
We don't want to waste your time, so if you're unsure whether your hypothetical enhancement meets the criteria for approval, please file an issue to get pre-approval before beginning work on a PR.
Learn more here: https://github.com/DefectDojo/django-DefectDojo/blob/master/readme-docs/CONTRIBUTING.md#submission-pre-approval
Description
Describe the feature / bug fix implemented by this PR.
If this is a new parser, the parser guide may be worth (re)reading.
Test results
Ideally you extend the test suite in
tests/anddojo/unitteststo cover the changed in this PR.Alternatively, describe what you have and haven't tested.
Documentation
Please update any documentation when needed in the documentation folder)
Checklist
This checklist is for your information.
dev.dev.bugfixbranch.Extra information
Please clear everything below when submitting your pull request, it's here purely for your information.
Moderators: Labels currently accepted for PRs:
Contributors: Git Tips
Rebase on dev branch
If the dev branch has changed since you started working on it, please rebase your work after the current dev.
On your working branch
mybranch:In case of conflict:
When everything's fine on your local branch, force push to your
myOriginremote:To cancel everything:
Squashing commits
pickbyfixupon the commits you want squashed outpickbyrewordon the first commit if you want to change the commit messageForce push to your
myOriginremote: