GitHub Secrets Detection Report Parser#13286
Merged
valentijnscholten merged 7 commits intoDefectDojo:bugfixfrom Oct 2, 2025
Merged
GitHub Secrets Detection Report Parser#13286valentijnscholten merged 7 commits intoDefectDojo:bugfixfrom
valentijnscholten merged 7 commits intoDefectDojo:bugfixfrom
Conversation
|
This pull request introduces a markdown/HTML injection risk in GithubSecretsDetectionReportParser: it builds Finding.description by concatenating unsanitized fields from the input JSON (e.g., html_url, secret_type_display_name, resolution_comment), which could allow stored XSS or content injection in DefectDojo when malicious markup or javascript is provided. The vuln is located in dojo/tools/github_secrets_detection_report/parser.py (lines 112–115) and should be mitigated by sanitizing or escaping user-supplied values before rendering.
Markdown/HTML Injection in Finding Description in
|
| Vulnerability | Markdown/HTML Injection in Finding Description |
|---|---|
| Description | The GithubSecretsDetectionReportParser constructs the description for a Finding object by directly incorporating values from the input JSON report, such as html_url, secret_type_display_name, and resolution_comment. These values are not sanitized before being concatenated into the description string. If an attacker provides a crafted JSON report containing malicious Markdown or HTML within these fields, it could lead to Stored Cross-Site Scripting (XSS) or content injection when the Finding.description is rendered in the DefectDojo UI. For example, a malicious html_url could be javascript:alert(document.domain). |
django-DefectDojo/dojo/tools/github_secrets_detection_report/parser.py
Lines 112 to 115 in 8d45cad
All finding details can be found in the DryRun Security Dashboard.
valentijnscholten
requested changes
Sep 30, 2025
Maffooch
approved these changes
Oct 1, 2025
valentijnscholten
approved these changes
Oct 2, 2025
dogboat
approved these changes
Oct 2, 2025
Maffooch
pushed a commit
to valentijnscholten/django-DefectDojo
that referenced
this pull request
Feb 16, 2026
* Add GitHub secrets detection parser and tests * Ruff fixes * Add docs and dedupe algo * Rm severity from hash_code --------- Co-authored-by: valentijnscholten <valentijnscholten@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Hello again! This PR adds a new parser for GitHub secrets detection uploads.
Test results
Added unit tests for new parser. Results:
Ref links: