Skip to content

Conversation

@manuel-sommer
Copy link
Contributor

To enable admins to forward useres e.g. to a Service Desk

@github-actions github-actions bot added the settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR label Nov 3, 2025
@manuel-sommer manuel-sommer marked this pull request as draft November 3, 2025 10:49
@manuel-sommer manuel-sommer force-pushed the make_social_auth_exception_configurable branch from 22d3969 to 8a715dd Compare November 3, 2025 16:29
@manuel-sommer manuel-sommer marked this pull request as ready for review November 3, 2025 16:53
@manuel-sommer manuel-sommer marked this pull request as draft November 4, 2025 10:07
@manuel-sommer
Copy link
Contributor Author

Waiting for #13608 to get merged.

@manuel-sommer manuel-sommer marked this pull request as ready for review November 5, 2025 10:00
@dryrunsecurity
Copy link

dryrunsecurity bot commented Nov 5, 2025

DryRun Security

🔴 Risk threshold exceeded.

This pull request modifies dojo/middleware.py (multiple sensitive edits detected) and updates dojo/settings/settings.dist.py where distinct social-auth error messages could allow user enumeration via differing "AuthForbidden" vs "AuthFailed" responses. The middleware changes touch a sensitive path and should be reviewed against .dryrunsecurity.yaml configuration, and the settings change should be hardened to avoid information disclosure.

🔴 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/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/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.
Information Disclosure via Distinct Error Messages in dojo/settings/settings.dist.py
Vulnerability Information Disclosure via Distinct Error Messages
Description The system provides distinct error messages for different social authentication failure states. Specifically, the 'AuthForbidden' message ('You are not authorized to log in via this method.') implies that a user account exists but is not permitted to use social login, while the 'AuthFailed' message ('Social login failed.') is more generic. This distinction allows an attacker to enumerate valid user accounts by observing which error message is returned for a given login attempt.

DD_SOCIAL_AUTH_EXCEPTION_MESSAGE_AUTH_FORBIDDEN=(str, "You are not authorized to log in via this method. Please contact support or use the standard login."),
DD_SOCIAL_AUTH_EXCEPTION_MESSAGE_NONE_TYPE=(str, "An unexpected error occurred during social login. Please use the standard login."),
DD_SOCIAL_AUTH_EXCEPTION_MESSAGE_AUTH_TOKEN_ERROR=(str, "Social login failed due to an invalid or expired token. Please try again or use the standard login."),
DD_SAML2_ENABLED=(bool, False),

We've notified @mtesauro.


All finding details can be found in the DryRun Security Dashboard.

Copy link
Member

@valentijnscholten valentijnscholten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a benefit of using a dict? I'm asking because we don't do that in other places and it makes the code look a bit verbose 😀

@valentijnscholten valentijnscholten added this to the 2.52.1 milestone Nov 6, 2025
@manuel-sommer
Copy link
Contributor Author

done @valentijnscholten please review again

@mtesauro mtesauro merged commit 2b54bbb into DefectDojo:bugfix Nov 10, 2025
150 checks passed
@manuel-sommer manuel-sommer deleted the make_social_auth_exception_configurable branch November 10, 2025 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants