Skip to content

API: Allow filtering users on last_login/date_joined#12640

Merged
mtesauro merged 1 commit intoDefectDojo:bugfixfrom
valentijnscholten:user-api-filter-dates
Jun 20, 2025
Merged

API: Allow filtering users on last_login/date_joined#12640
mtesauro merged 1 commit intoDefectDojo:bugfixfrom
valentijnscholten:user-api-filter-dates

Conversation

@valentijnscholten
Copy link
Copy Markdown
Member

Allow filtering on last_login and date_joined to help users manage user via the API. Inspired by #12611

@dryrunsecurity
Copy link
Copy Markdown

DryRun Security

This pull request contains a potential security concern in the ApiUserFilter where sensitive user metadata could be exposed, though the current implementation has some access controls in place through the UsersViewSet permissions.

Sensitive User Information Exposure in dojo/filters.py
Vulnerability Sensitive User Information Exposure
Description The ApiUserFilter exposes multiple sensitive user fields like is_active, is_superuser, last_login, and date_joined. While the UsersViewSet is restricted to superusers via permission_classes, the filter itself allows detailed querying of user attributes. This could potentially leak sensitive user metadata if access controls are not strictly maintained.

Test_Import_Finding_Action,
Test_Type,
TextQuestion,
User,
Vulnerability_Id,
)
from dojo.product.queries import get_authorized_products


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

@Maffooch Maffooch requested review from dogboat and hblankenship June 20, 2025 14:54
Copy link
Copy Markdown
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

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

Approved

@mtesauro mtesauro merged commit 1ba222c into DefectDojo:bugfix Jun 20, 2025
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants