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

Improving date of discovery filter #10204

Merged
merged 4 commits into from
May 20, 2024
Merged

Improving date of discovery filter #10204

merged 4 commits into from
May 20, 2024

Conversation

hblankenship
Copy link
Contributor

[sc-5885]

Fixed missing filter on Discovery Date. Now able to specify a range with from and to.

Test results

Tested locally and includes a fix for when labels are 'missing' in the report builder html.

Copy link

dryrunsecurity bot commented May 14, 2024

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

DryRun Security Status Findings
Configured Codepaths Analyzer 0 findings
Sensitive Files Analyzer 0 findings
AppSec Analyzer 0 findings
Authn/Authz Analyzer 0 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 focus on improving the handling of placeholder text for input fields and select elements in the dojo/templates/dojo/report_builder.html file. The code now checks if the label element for an input field or select element exists and has valid HTML content before setting the placeholder text. This ensures that the placeholder text is not set if the label is not available.

For select elements with the multiple attribute, the code checks if the label element exists and has valid HTML content before setting the placeholder_text_multiple option for the Chosen.js library. This is a positive change that helps maintain the user experience.

From an application security perspective, these changes do not introduce any obvious security concerns. The code is focused on improving the user experience by setting appropriate placeholder text for form elements, which is a common practice in web application development.

However, it's important to review the overall codebase and ensure that there are no other security vulnerabilities, such as cross-site scripting (XSS), SQL injection, or improper input validation, as these could potentially impact the application's security.

Files Changed:

  1. dojo/templates/dojo/report_builder.html: The changes in this file focus on the handling of placeholder text for input fields and select elements. The code now checks if the label element exists and has valid HTML content before setting the placeholder text, ensuring a better user experience.

  2. dojo/filters.py: This file contains a set of Django filters for various models in the Defect Dojo application, including Finding, Product, Engagement, Endpoint, and others. These filters provide advanced search and filtering capabilities for the application's data, which is an important feature for a security-focused application.

Powered by DryRun Security

@github-actions github-actions bot added the ui label May 14, 2024
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

dojo/filters.py Show resolved Hide resolved
@cneill cneill changed the title Hb filter discovery branch Improving date of discovery filter May 14, 2024
@Maffooch Maffooch merged commit b58ab8e into dev May 20, 2024
126 checks passed
@Maffooch Maffooch deleted the hb-filter-discovery-branch branch May 20, 2024 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants