-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix create notification for group of findings #10433
Fix create notification for group of findings #10433
Conversation
Hi there 👋, @DryRunSecurity here, below is a summary of our analysis and findings.
Note 🔴 Risk threshold exceeded. Adding a reviewer if one is configured in notification list: @mtesauro @grendel513 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 focus on improving the handling of JIRA webhook events in the DefectDojo application. The key changes include:
From an application security perspective, the code appears to handle the incoming JIRA webhook events securely. It checks the request content type, ensures the JIRA integration is enabled, and verifies the webhook secret (if configured) before processing the request. This helps prevent unauthorized access and potential abuse of the webhook functionality. Additionally, the code handles exceptions and errors gracefully, logging relevant information and returning appropriate HTTP responses, which can improve debugging and monitoring. Files Changed:
Powered by DryRun Security |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
Description
DefectDojo fails to process comments when closing a Jira issue associated with a group of findings, if the issue is closed with a comment. The error occurs because
jissue.finding
is not set when the Jira issue is associated with a group of findings. However, it is passed as a parameter to thecreate_notification
function, which then fails when trying to get the product from it.The proposed fix is to pass the first finding from the group, if it exists. This finding can be used as a parameter for the
create_notification
function, as the function uses it to retrieve notification parameters from the product configuration associated with the finding. Since all findings in the same group share the same product, using the first finding should work.Additionally, I have updated the
findings
variable. It was previously created as a list with aQueryset
, which is already an iterable object, so it does not need to be inside a list.Test results
I don't believe there are tests for this
Documentation
This is a minor bug fix that shouldn't need any documentation updates
Checklist
This checklist is for your information.
dev
.dev
.bugfix
branch.Extra information
The following example demonstrates the error that occurs when closing a Jira issue associated with a group of findings, if the issue is closed with a comment: