Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Ruff: Add and autofix PLR173 rules #11988

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

Merged
merged 2 commits into from
Mar 25, 2025
Merged

Conversation

manuel-sommer
Copy link
Contributor

No description provided.

Copy link

dryrunsecurity bot commented Mar 11, 2025

DryRun Security Summary

Minor code refactoring was performed across multiple files, replacing manual comparisons with Python's built-in functions, with a potential indirect security risk from removing certain Pylint code quality rules.

Expand for full summary
  1. Summary of Changes: Minor code refactoring across multiple files, replacing manual comparisons with Python's built-in max() and min() functions in various utility methods.

  2. Security Findings:

  • Potential Indirect Security Risk in ruff.toml: Removal of Pylint rules "PLR1733" and "PLR1736" might reduce code quality checks around exception handling, which could have subtle security implications
  • No direct security vulnerabilities were found in the other patches to dojo/tools/blackduck_component_risk/parser.py, dojo/utils.py, and tests/base_test_class.py

Code Analysis

We ran 7 analyzers against 4 files and 1 analyzer had findings. 6 analyzers had no findings.

Analyzer Findings
Configured Codepaths Analyzer 1 finding

Overall Riskiness

🔴 Risk threshold exceeded.

We've notified @mtesauro, @grendel513.

View PR in the DryRun Dashboard.

@manuel-sommer
Copy link
Contributor Author

Weird that this fails. Could you retrigger the pipeline @mtesauro ?

@manuel-sommer
Copy link
Contributor Author

I don't understand why this fails. Could you give me input here @kiblik ?

@manuel-sommer
Copy link
Contributor Author

Hi @kiblik, could you also give me a hint for this failed pipeline?

@kiblik
Copy link
Contributor

kiblik commented Mar 11, 2025

Hi @kiblik, could you also give me a hint for this failed pipeline?

Are you able to run tests/product_test.py locally? As soon as it fails, you should have an ...html file in your dir, when you open it, you might see a page with an error message.

@manuel-sommer manuel-sommer marked this pull request as ready for review March 16, 2025 18:55
@manuel-sommer manuel-sommer requested a review from kiblik March 16, 2025 18:56
Copy link
Contributor

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

1 similar comment
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.

@manuel-sommer
Copy link
Contributor Author

Could you retrigger the pipeline please @mtesauro ?

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 cb09a3e into DefectDojo:dev Mar 25, 2025
103 of 131 checks passed
@manuel-sommer manuel-sommer deleted the ruff_plr173 branch March 25, 2025 21:44
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.

6 participants