Skip to content

Tags: Add support for comma separation for multipart forms (import/reimport)#12434

Merged
Maffooch merged 5 commits into
bugfixfrom
mulitpart-tag-format
May 15, 2025
Merged

Tags: Add support for comma separation for multipart forms (import/reimport)#12434
Maffooch merged 5 commits into
bugfixfrom
mulitpart-tag-format

Conversation

@Maffooch

@Maffooch Maffooch commented May 12, 2025

Copy link
Copy Markdown
Contributor

When attempting to attach multiple tags during a reimport through the swagger docs page, the curl request that is generated places all submitted tags in the same form field in a comma separated list. In the recent changes from #1294, commas are not longer allowed. This PR allowed for tag enforcement in lists, but not when a string is passed. Unfortunately correcting the generated curl request is not really feasible, so we must return to approach of splitting all tags from the API by commas.

Slack Context: https://defectdojo-workspace.slack.com/archives/C2P5BA8MN/p1747055360228049
[sc-11116]

@dryrunsecurity

dryrunsecurity Bot commented May 12, 2025

Copy link
Copy Markdown

DryRun Security

This pull request introduces potential tag parsing vulnerabilities in the code that could allow unexpected tag processing and might create security risks during tag validation and import processes.

💭 Unconfirmed Findings (2)
Vulnerability Potential Regex-based Tag Parsing Vulnerability
Description Located in dojo/api_v2/serializers.py, the regex pattern r'(?:"[^"]*"[^\,]+)' could allow unexpected tag parsing by bypassing intended tag restrictions and introducing parsing complexity. This may lead to potential security risks in tag validation.
Vulnerability Potential Tag Parsing Vulnerability
Description Found in unittests/test_tags.py, the new test method indicates the system can handle comma-separated tags during import. This could potentially introduce parsing or sanitization risks if the implementation is not robust, allowing tags like 'bug,security' to be processed in unintended ways.

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

@Maffooch Maffooch changed the title Tags: Add support for comma separation for multipart forms (import/re… Tags: Add support for comma separation for multipart forms (import/reimport) May 12, 2025
@Maffooch Maffooch added this to the 2.46.3 milestone May 12, 2025
Comment thread unittests/test_tags.py Outdated
Co-authored-by: valentijnscholten <valentijnscholten@gmail.com>

@mtesauro mtesauro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@Maffooch Maffooch merged commit 741e239 into bugfix May 15, 2025
79 checks passed
@Maffooch Maffooch deleted the mulitpart-tag-format branch May 15, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants