Skip to content

Add CycloneDX VEX export and component_purl field to Finding#14888

Closed
cschneider-vertical-relevance wants to merge 1 commit into
DefectDojo:masterfrom
VerticalRelevance:feature/vex-export
Closed

Add CycloneDX VEX export and component_purl field to Finding#14888
cschneider-vertical-relevance wants to merge 1 commit into
DefectDojo:masterfrom
VerticalRelevance:feature/vex-export

Conversation

@cschneider-vertical-relevance
Copy link
Copy Markdown

Adds a component_purl field to the Finding model (with migration) so that PURL data from CycloneDX imports is stored and round-tripped. Introduces a new dojo/vex module with two authenticated API views (GET /api/v2/vex/cyclonedx/product// and .../engagement//) that serialize Dojo triage decisions as CycloneDX 1.4 VEX documents.

⚠️ Pre-Approval check ⚠️

We don't want to waste your time, so if you're unsure whether your hypothetical enhancement meets the criteria for approval, please file an issue to get pre-approval before beginning work on a PR.
Learn more here: https://github.com/DefectDojo/django-DefectDojo/blob/master/readme-docs/CONTRIBUTING.md#submission-pre-approval

Description

Describe the feature / bug fix implemented by this PR.
If this is a new parser, the parser guide may be worth (re)reading.

Test results

Ideally you extend the test suite in tests/ and dojo/unittests to cover the changed in this PR.
Alternatively, describe what you have and haven't tested.

Documentation

Please update any documentation when needed in the documentation folder)

Checklist

This checklist is for your information.

  • Make sure to rebase your PR against the very latest dev.
  • Features/Changes should be submitted against the dev.
  • Bugfixes should be submitted against the bugfix branch.
  • Give a meaningful name to your PR, as it may end up being used in the release notes.
  • Your code is Ruff compliant (see ruff.toml).
  • Your code is python 3.13 compliant.
  • If this is a new feature and not a bug fix, you've included the proper documentation in the docs at https://github.com/DefectDojo/django-DefectDojo/tree/dev/docs as part of this PR.
  • Model changes must include the necessary migrations in the dojo/db_migrations folder.
  • Add applicable tests to the unit tests.
  • Add the proper label to categorize your PR.

Extra information

Please clear everything below when submitting your pull request, it's here purely for your information.

Moderators: Labels currently accepted for PRs:

  • Import Scans (for new scanners/importers)
  • enhancement
  • performance
  • feature
  • bugfix
  • maintenance (a.k.a chores)
  • dependencies
  • New Migration (when the PR introduces a DB migration)
  • settings_changes (when the PR introduces changes or new settings in settings.dist.py)

Contributors: Git Tips

Rebase on dev branch

If the dev branch has changed since you started working on it, please rebase your work after the current dev.

On your working branch mybranch:

git rebase dev mybranch

In case of conflict:

 git mergetool
 git rebase --continue

When everything's fine on your local branch, force push to your myOrigin remote:

git push myOrigin --force-with-lease

To cancel everything:

git rebase --abort

Squashing commits

git rebase -i origin/dev
  • Replace pick by fixup on the commits you want squashed out
  • Replace pick by reword on the first commit if you want to change the commit message
  • Save the file and quit your editor

Force push to your myOrigin remote:

git push myOrigin --force-with-lease

Adds a component_purl field to the Finding model (with migration) so that
PURL data from CycloneDX imports is stored and round-tripped. Introduces a
new dojo/vex module with two authenticated API views
(GET /api/v2/vex/cyclonedx/product/<pk>/ and .../engagement/<pk>/) that
serialize Dojo triage decisions as CycloneDX 1.4 VEX documents.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added New Migration Adding a new migration file. Take care when merging. parser labels May 18, 2026
@dryrunsecurity
Copy link
Copy Markdown

DryRun Security

This pull request includes critical sensitive edits in dojo/urls.py, dojo/models.py, and dojo/db_migrations/0265_finding_component_purl.py, which were flagged as configured codepaths requiring special review.

🔴 Configured Codepaths Edit in dojo/urls.py (drs_25dc94e4)
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/models.py (drs_e7a99f14)
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.
🔴 Configured Codepaths Edit in dojo/db_migrations/0265_finding_component_purl.py (drs_f3d508af)
Vulnerability Configured Codepaths Edit
Description Sensitive edits detected for this file. Sensitive file paths and allowed authors can be configured in .dryrunsecurity.yaml.

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.

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

Labels

New Migration Adding a new migration file. Take care when merging. parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant