Skip to content
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

feat(user): Show date of user creation #10119

Merged
merged 1 commit into from
May 18, 2024
Merged

Conversation

kiblik
Copy link
Contributor

@kiblik kiblik commented May 6, 2024

I bumped into a situation when we were investigating when the user was created. I found it useful to add it to some of the views. Before it was only in the user's personal profile.
Now, it is in

  • API response
  • List of users
  • It is useable for sorting
  • User's profile (available by admins)

Screenshot 2024-05-06 at 13 44 01
Screenshot 2024-05-06 at 13 43 17
Screenshot 2024-05-06 at 13 42 59
Screenshot 2024-05-06 at 13 38 00

Copy link

dryrunsecurity bot commented May 6, 2024

Hi there 👋, @DryRunSecurity here, below is a summary of our analysis and findings.

DryRun Security Status Findings
AppSec Analyzer 0 findings
Configured Codepaths Analyzer 0 findings
Sensitive Files Analyzer 0 findings
Authn/Authz Analyzer 3 findings
Secrets Analyzer 0 findings

Note

🟢 Risk threshold not exceeded.

Change Summary (click to expand)

The following is a summary of changes in this pull request made by me, your security buddy 🤖.
Note that this summary is auto-generated and not meant to be a definitive list of security issues
but rather a helpful summary from a security perspective.

Summary:

The changes in this pull request are focused on enhancing the user management and filtering functionality of the Defect Dojo application. The key changes include:

  1. Addition of a new date_joined field to the UserSerializer class, which displays the date when a user was created. This is a common and reasonable addition to user metadata.
  2. Updates to the view_user.html and users.html templates to display the "Date Joined" information for users. These changes do not introduce any obvious security concerns, as they are related to displaying user profile information.
  3. Introduction of a comprehensive set of custom Django filters in the filters.py file. These filters provide advanced search and filtering capabilities for various models in the application, such as Findings, Engagements, Products, and more. The filters include features like related model filtering, tag-based filtering, and ordering capabilities.

While the changes do not directly introduce any security vulnerabilities, it is important to ensure that the application's access control mechanisms and permissions are properly implemented to prevent unauthorized access or modification of user data. Additionally, the filtering functionality should be thoroughly tested to ensure that it does not introduce any unintended security issues, such as exposing sensitive information or enabling malicious queries.

Files Changed:

  1. dojo/api_v2/serializers.py: Added a new date_joined field to the UserSerializer class, which will display the date when the user was created.
  2. dojo/templates/dojo/view_user.html: Added a new row to the "Default Information" table to display the "Date Joined" information for the user.
  3. dojo/templates/dojo/users.html: Added a new column to the user table to display the "Date Joined" information for each user.
  4. dojo/filters.py: Introduced a comprehensive set of custom Django filters for various models in the Defect Dojo application, providing advanced search and filtering capabilities.

Powered by DryRun Security

Copy link
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 a8ef36e into DefectDojo:dev May 18, 2024
122 checks passed
@kiblik kiblik deleted the ui_user_created branch May 18, 2024 07:03
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.

None yet

5 participants