Skip to content

move MAX_ZIP_* to settings#14730

Open
fopina wants to merge 1 commit intoDefectDojo:devfrom
fopina:settings/max_zip
Open

move MAX_ZIP_* to settings#14730
fopina wants to merge 1 commit intoDefectDojo:devfrom
fopina:settings/max_zip

Conversation

@fopina
Copy link
Copy Markdown
Contributor

@fopina fopina commented Apr 22, 2026

Release 2.56.0 introduce safe zip loading enforcing limits on zip file number and individual file size.

However those were put into constants in tools/utils.py

This PR moves those constants to settings (also configurable by env) for users to adjust to their requirements and risk acceptance.

Note: one of our Fortify reports has >130k "members" 💣

@github-actions github-actions Bot added docker settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR unittests parser helm labels Apr 22, 2026
@dryrunsecurity
Copy link
Copy Markdown

DryRun Security

This pull request introduces a critical potential cross-site scripting (XSS) issue in dojo/tools/anchore_grype/parser.py by concatenating unescaped external strings (vuln_datasource, vuln_urls[], rel_datasource, rel_urls[]) into finding_references using f-strings; if those values come from untrusted inputs and are later rendered into HTML/JS, they can enable XSS. The finding is marked risky but non-blocking, so sanitize or escape external data before rendering to mitigate.

🔴 Potential Cross-Site Scripting in dojo/tools/anchore_grype/parser.py (drs_fb04a2d6)
Vulnerability Potential Cross-Site Scripting
Description The parser concatenates external strings (vuln_datasource, vuln_urls[], rel_datasource, rel_urls[]) directly into a finding_references string using f-strings without any escaping or sanitization. If those values originate from untrusted input (scanner output, advisories, or user-supplied data) and are later rendered into an HTML/JS context without appropriate escaping, this creates a path for XSS.

finding_references += f"**Vulnerability Datasource:** {vuln_datasource}\n"
if vuln_urls:
if len(vuln_urls) == 1:
if vuln_urls[0] != vuln_datasource:

We've notified @mtesauro.


Comment to provide feedback on these findings.

Report false positive: @dryrunsecurity fp [FINDING ID] [FEEDBACK]
Report low-impact: @dryrunsecurity nit [FINDING ID] [FEEDBACK]

Example: @dryrunsecurity fp drs_90eda195 This code is not user-facing

All finding details can be found in the DryRun Security Dashboard.

@fopina fopina changed the base branch from master to dev April 22, 2026 13:48
@fopina
Copy link
Copy Markdown
Contributor Author

fopina commented Apr 22, 2026

☝️ I guess dry run started before I fixed the target branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docker helm parser settings_changes Needs changes to settings.py based on changes in settings.dist.py included in this PR unittests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant