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 G1 and G2 #10088

Merged
merged 1 commit into from
Jul 8, 2024
Merged

Ruff: add and fix G1 and G2 #10088

merged 1 commit into from
Jul 8, 2024

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 0 findings
SQL Injection Analyzer 0 findings
Authn/Authz Analyzer 0 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 changes in this pull request cover updates to the Ruff linter configuration file, improvements to the error handling and feedback for the JIRA integration functionality in the dojo/finding/views.py file, and simplifications to the exception handling in the dojo/finding_group/views.py file.

From an application security perspective, the changes do not introduce any obvious security vulnerabilities. The Ruff linter configuration update is focused on enhancing the code quality and style checks, which can indirectly contribute to improving the overall security of the application. The changes to the JIRA integration functionality aim to provide better error handling and feedback to the user, which can help in diagnosing and troubleshooting any issues that may occur during the JIRA integration process.

However, it's important to review the implementation of the JIRA integration functionality to ensure that it follows secure coding practices and does not introduce any vulnerabilities, such as improper handling of sensitive information. Additionally, the error messaging could be further improved to provide more detailed and informative feedback to the users.

Files Changed:

  1. ruff.toml: This file has been updated to add the "G1" and "G2" rules to the select list in the [lint] section, which likely relates to specific linting checks performed by the Ruff linter.
  2. dojo/finding/views.py: The push_to_jira function has been updated to log any exceptions that occur during the JIRA push operation, instead of just logging the error message. It also adds messages to the request to indicate the status of the JIRA push operation.
  3. dojo/finding_group/views.py: The exception handling in the push_to_jira function has been simplified, with the previous detailed logging being replaced by a more concise error message.

Powered by DryRun Security

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.

@kiblik kiblik closed this Jun 22, 2024
@kiblik kiblik reopened this Jun 22, 2024
@mtesauro
Copy link
Contributor

mtesauro commented Jul 1, 2024

@kiblik Got any clue why these tests stated failing on this one? They were passing but now, not so much.

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

kiblik commented Jul 3, 2024

@kiblik Got any clue why these tests stated failing on this one? They were passing but now, not so much.

I suppose it was connected to --shuffle. Now it works.

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 mtesauro merged commit 002a0af into DefectDojo:dev Jul 8, 2024
125 checks passed
@kiblik kiblik deleted the ruff_g branch July 8, 2024 16:52
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