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 already corrected rules #11648

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Conversation

kiblik
Copy link
Contributor

@kiblik kiblik commented Jan 25, 2025

Self-descriptive

Copy link

dryrunsecurity bot commented Jan 25, 2025

DryRun Security Summary

The pull request updates the Ruff configuration file to improve code quality and best practices by modifying linting rules, which may indirectly enhance the codebase's security and maintainability.

Expand for full summary

Summary:

This pull request updates the Ruff configuration file, which is a Python linting tool. The changes are primarily focused on updating the list of rules and error codes that Ruff will check for in the codebase. While these changes are mostly aimed at improving code quality and adherence to best practices, rather than directly addressing security vulnerabilities, some of the new rules and adjustments to existing rules may help identify potential security issues, such as incorrect variable naming, missing type annotations, and other coding best practices.

The changes also include the removal of some rules and the addition of several new ignore rules, which may indicate that the team has identified specific cases where certain rules are not applicable or may be too strict for the project. Additionally, the changes to the lint.pylint.max-statements and lint.mccabe.max-complexity settings suggest that the team is trying to balance code complexity and maintainability, which can indirectly improve security by making the codebase easier to understand and audit.

Overall, these changes appear to be focused on improving the general code quality and adherence to best practices, which can have a positive impact on the application's security posture. However, it's important to note that linting tools are not a substitute for comprehensive security testing and review, and the team should continue to prioritize security throughout the development lifecycle.

Files Changed:

  • ruff.toml: This file is the configuration for the Ruff Python linting tool. The changes in this pull request update the list of rules and error codes that Ruff will check for in the codebase, with the addition of several new rules and the removal of some existing rules. The changes also include the addition of several new ignore rules and adjustments to the lint.pylint.max-statements and lint.mccabe.max-complexity settings.

Code Analysis

We ran 9 analyzers against 1 file 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

@kiblik kiblik requested review from cneill and Maffooch January 28, 2025 15:41
@Maffooch Maffooch merged commit 061b20d into DefectDojo:dev Jan 29, 2025
73 checks passed
@kiblik kiblik deleted the ruff_add_safe branch January 29, 2025 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants