Skip to content

Conversation

@valentijnscholten
Copy link
Member

Fixes #10249

Description

When uploading a CycloneDX report to DefectDojo, an error was thrown when the vulnerability description field was missing. The CycloneDX specification does not mandate the description field to be present, but DefectDojo requires it in the database.

Root Cause

The _manage_vulnerability_xml() function (used for CycloneDX 1.4+) did not set a default value for missing descriptions, while manage_vulnerability_legacy() (used for CycloneDX 1.0) already had this fix applied in version 2.31.0.

Solution

Added a default description when both description and detail fields are missing, similar to the legacy function. The default description includes the vulnerability ID and severity.

Testing

  • Verified the fix handles missing descriptions correctly
  • No linting errors introduced
  • Follows the same pattern as the legacy function

Copy link
Contributor

@mtesauro mtesauro left a comment

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 3e15654 into DefectDojo:bugfix Dec 29, 2025
149 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Import of CycloneDX Scan fails if vulnerability description is missing

5 participants