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

Ruff: add and fix Q (except Q000) #10094

Merged
merged 8 commits into from
Jul 2, 2024
Merged

Conversation

kiblik
Copy link
Contributor

@kiblik kiblik commented May 2, 2024

Copy link

dryrunsecurity bot commented May 2, 2024

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

DryRun Security Status Findings
Server-Side Request Forgery Analyzer 0 findings
Configured Codepaths Analyzer 0 findings
IDOR Analyzer 0 findings
Sensitive Files Analyzer 1 finding
SQL Injection Analyzer 0 findings
Authn/Authz Analyzer 9 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 code changes in this pull request address various updates and improvements to the Defect Dojo application, with a focus on enhancing the security and reliability of the application. The changes span multiple files and components, including updates to the permissions system, filtering capabilities, JIRA integration, and the handling of findings and survey responses.

The changes demonstrate a strong emphasis on security best practices, such as implementing comprehensive permissions checks, validating user input, and improving the handling of sensitive data. Additionally, the changes include performance optimizations, error handling improvements, and updates to the documentation and test suite, all of which contribute to the overall security and maintainability of the application.

Files Changed:

  1. dojo/api_v2/permissions.py: The changes introduce a robust permissions system that covers a wide range of actions and objects, ensuring that users can only perform authorized actions. The implementation of object-level permissions, auto-create permissions, and superuser permissions are positive security enhancements.

  2. dojo/filters.py: The changes expand the filtering capabilities of the application, allowing security teams to more effectively search and analyze findings based on various attributes, such as EPSS score, vulnerability ID, and risk acceptance status. These improvements can help improve the overall security posture of the application.

  3. dojo/importers/base_importer.py: The changes in the sanitize_severity function ensure that the severity of findings is properly validated and sanitized before being processed, which is an important security practice.

  4. dojo/models.py: The changes include updates to the password complexity requirements, JIRA custom field mapping, and the handling of engagement auto-close and finding SLA's, all of which have security implications that should be carefully reviewed.

  5. dojo/user/validators.py: The changes to the password validation rules, including the addition of a special character requirement, are positive security enhancements that help improve the overall security of user accounts.

  6. unittests/test_finding_model.py: The changes in this file focus on improving the handling of user-provided input and the generation of HTML links, which helps prevent potential security vulnerabilities, such as cross-site scripting (XSS) attacks.

Overall, the code changes in this pull request demonstrate a strong focus on application security and the implementation of best practices to enhance the security and reliability of the Defect Dojo application.

Powered by DryRun Security

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@kiblik kiblik force-pushed the ruff_non0q branch 2 times, most recently from 3c4c866 to 79b4866 Compare May 18, 2024 07:33
@github-actions github-actions bot added the apiv2 label May 18, 2024
Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Contributor

github-actions bot commented Jun 3, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

github-actions bot commented Jun 3, 2024

Conflicts have been resolved. A maintainer will review the pull request shortly.

Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Contributor

Conflicts have been resolved. A maintainer will review the pull request shortly.

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
Copy link
Contributor

mtesauro commented Jul 2, 2024

@kiblik We're ready to merge this once the merge conflict is sorted out. 👍

@kiblik kiblik closed this Jul 2, 2024
@kiblik kiblik reopened this Jul 2, 2024
@kiblik kiblik closed this Jul 2, 2024
@kiblik kiblik reopened this Jul 2, 2024
@mtesauro
Copy link
Contributor

mtesauro commented Jul 2, 2024

Going to go ahead and merge this since it's a MySQL test that is failing.

@mtesauro mtesauro merged commit 6fdd46d into DefectDojo:dev Jul 2, 2024
236 of 240 checks passed
@kiblik kiblik deleted the ruff_non0q branch July 3, 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.

5 participants