-
Notifications
You must be signed in to change notification settings - Fork 1.8k
JIRA helper: respect simple/full risk acceptance on webhook processiing #12594
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
JIRA helper: respect simple/full risk acceptance on webhook processiing #12594
Conversation
|
This pull request introduces a potential information disclosure vulnerability through debug logging in the Jira link helper, where sensitive identifiers like
Information disclosure via debug logging in
|
| Vulnerability | Information disclosure via debug logging |
|---|---|
| Description | The patch introduces new logger.debug statements that include jira_issue.jira_key. While debug logs are generally not a high risk, if debug logging is inadvertently enabled in production, sensitive internal identifiers or system details can be exposed. This falls under information disclosure. |
django-DefectDojo/dojo/jira_link/helper.py
Lines 1674 to 1697 in a6166b2
| jira_instance = get_jira_instance(finding) | |
| if resolved: | |
| if jira_instance and resolution_name in jira_instance.accepted_resolutions and (finding.test.engagement.product.enable_simple_risk_acceptance or finding.test.engagement.enable_full_risk_acceptance): | |
| if not finding.risk_accepted: | |
| logger.debug(f"Marking related finding of {jira_issue.jira_key} as accepted.") | |
| finding.risk_accepted = True | |
| finding.active = False | |
| finding.mitigated = None | |
| finding.is_mitigated = False | |
| finding.false_p = False | |
| if finding.test.engagement.product.enable_full_risk_acceptance: | |
| logger.debug(f"Creating risk acceptance for finding linked to {jira_issue.jira_key}.") | |
| ra = Risk_Acceptance.objects.create( | |
| accepted_by=assignee_name, | |
| owner=finding.reporter, | |
| decision_details=f"Risk Acceptance automatically created from JIRA issue {jira_issue.jira_key} with resolution {resolution_name}", | |
| ) | |
| finding.test.engagement.risk_acceptance.add(ra) | |
| ra_helper.add_findings_to_risk_acceptance(User.objects.get_or_create(username="JIRA")[0], ra, [finding]) | |
| status_changed = True | |
| elif jira_instance and resolution_name in jira_instance.false_positive_resolutions: | |
| if not finding.false_p: |
All finding details can be found in the DryRun Security Dashboard.
mtesauro
left a comment
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
I noticed that Findings that were "Risk Accepted" in JIRA did not set the
finding.risk_acceptedfield. Also a fullRisk_Acceptancewas created even if that feature was disabled for the product. This PR corrects this.This code is executed when a webhook is coming from JIRA or when the management command
jira_status_reconciliationis run.