Skip to content

Ruff: Add some harmless rules#10718

Merged
mtesauro merged 1 commit intoDefectDojo:devfrom
kiblik:ruff_harmless
Aug 9, 2024
Merged

Ruff: Add some harmless rules#10718
mtesauro merged 1 commit intoDefectDojo:devfrom
kiblik:ruff_harmless

Conversation

@kiblik
Copy link
Copy Markdown
Contributor

@kiblik kiblik commented Aug 7, 2024

Add rules which are already fixed

@dryrunsecurity
Copy link
Copy Markdown

dryrunsecurity Bot commented Aug 7, 2024

DryRun Security Summary

The provided code change updates the ruff.toml configuration file to include additional Ruff-specific rules and standard Flake8 rules, indicating a focus on improving the overall quality and security of the codebase through the use of more comprehensive linting.

Expand for full summary

Summary:

The provided code change is an update to the ruff.toml configuration file, which is a configuration file for the Ruff linter, a Python code linter. The key changes include the addition of several new rule codes to the select list, such as "A003", "A006", "PTH2", and "FAST", which are Ruff-specific rules related to the use of assert statements, relative imports, and the fastapi library. Additionally, the ignore list has been updated to include several standard Flake8 rules, such as "E501", "E722", and "F821".

From an application security perspective, the changes to the select list are particularly interesting as they indicate a focus on improving code quality and security through the use of additional linting rules. The inclusion of rules like "A003" and "A006" can help identify potential issues with the use of assert statements, which can be important for ensuring the reliability and security of the application. Similarly, the "PTH2" rule suggests a focus on improving the way that relative imports are handled, which can be important for maintaining the modularity and maintainability of the codebase.

Files Changed:

  • ruff.toml: This file is the configuration file for the Ruff linter, a Python code linter. The changes include the addition of several new rule codes to the select list, such as "A003", "A006", "PTH2", and "FAST", as well as the addition of several standard Flake8 rules to the ignore list, such as "E501", "E722", and "F821". These changes indicate a focus on improving the overall quality and security of the codebase through the use of additional linting rules and configurations.

Code Analysis

We ran 9 analyzers against 1 file and 0 analyzers had findings. 9 analyzers had no findings.

Riskiness

🟢 Risk threshold not exceeded.

View PR in the DryRun Dashboard.

Copy link
Copy Markdown
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 d851dad into DefectDojo:dev Aug 9, 2024
@kiblik kiblik deleted the ruff_harmless branch August 9, 2024 22:07
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