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

Add different pro banner for databases over 100k findings and endpoints #11665

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

Maffooch
Copy link
Contributor

When a databases reaches over 100k findings and endpoints, it is suggested that they consider pro

[sc-2978]

@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 Jan 27, 2025
Copy link

DryRun Security Summary

The code changes introduce a new scheduled task "trigger_evaluate_pro_proposition" that runs every 8 hours to update announcement messages based on system findings and endpoints, along with modifications to the existing task functionality in DefectDojo application.

Expand for full summary

Summary:

The code changes in this pull request appear to be focused on adding a new scheduled task to the DefectDojo application and modifying an existing task responsible for updating the announcement message based on the number of findings and endpoints in the system.

The new scheduled task, "trigger_evaluate_pro_proposition", is scheduled to run every 8 hours and is responsible for executing the "dojo.tasks.evaluate_pro_proposition" function. This change does not introduce any obvious security concerns, as scheduled tasks are a common pattern in web applications and are generally not considered a security risk, as long as the tasks themselves do not perform any sensitive or unauthorized operations.

The changes to the "dojo/tasks.py" file introduce a new task called "evaluate_pro_proposition", which is responsible for updating the announcement message based on the number of findings and endpoints in the system. This change also does not appear to introduce any security vulnerabilities, but it's important to ensure that the announcement message is properly sanitized and any user-provided input is properly validated to prevent potential injection attacks (e.g., Cross-Site Scripting (XSS)).

Files Changed:

  1. dojo/settings/settings.dist.py:

    • A new scheduled task called "trigger_evaluate_pro_proposition" has been added, which is scheduled to run every 8 hours and executes the "dojo.tasks.evaluate_pro_proposition" function.
    • This change does not introduce any obvious security concerns, but it's important to review the task to ensure it does not perform any sensitive or unauthorized operations.
  2. dojo/tasks.py:

    • A new task called "evaluate_pro_proposition" has been added, which is responsible for updating the announcement message based on the number of findings and endpoints in the system.
    • The task checks if the CREATE_CLOUD_BANNER setting is enabled, retrieves the existing announcement object, and updates the message if the count of findings and endpoints is greater than or equal to 100,000.
    • This change does not appear to introduce any security vulnerabilities, but it's important to ensure that the announcement message is properly sanitized and any user-provided input is properly validated to prevent potential injection attacks.

Code Analysis

We ran 9 analyzers against 2 files and 0 analyzers had findings. 9 analyzers had no findings.

View PR in the DryRun Dashboard.

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

@Maffooch Maffooch merged commit bd613d1 into DefectDojo:dev Jan 29, 2025
72 checks passed
@Maffooch Maffooch deleted the pro branch January 29, 2025 21:28
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.

5 participants