Skip to content

Preserve raw CycloneDX VEX analysis on parsed findings - #15382

Open
Jino-T wants to merge 1 commit into
DefectDojo:bugfixfrom
Jino-T:sc-13255-preserve-cyclonedx-vex-analysis
Open

Preserve raw CycloneDX VEX analysis on parsed findings#15382
Jino-T wants to merge 1 commit into
DefectDojo:bugfixfrom
Jino-T:sc-13255-preserve-cyclonedx-vex-analysis

Conversation

@Jino-T

@Jino-T Jino-T commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

The CycloneDX JSON parser collapses each vulnerabilities[].analysis block into Dojo status booleans (is_mitigated / false_p) and drops justification and response entirely. This attaches the raw analysis dict to the in-memory finding as finding.unsaved_vex so downstream consumers can round-trip the full VEX data (state / justification / response / detail).

Why

VEX (Vulnerability Exploitability eXchange) analysis carries more than a mitigated/false-positive flag — the justification and response arrays are meaningful and standardized in CycloneDX 1.7. Preserving the original block lets a consumer re-export a schema-valid VEX document instead of reconstructing a lossy approximation from Dojo status.

Behavior

unsaved_vex is an inert in-memory attribute — the parser doesn't persist it and nothing in OSS reads it, so existing behavior is completely unchanged. It follows the same unsaved_* convention the importers already use for unsaved_vulnerability_ids, unsaved_endpoints, etc.: a place for parsed-but-not-yet-persisted data that post-save consumers can pick up.

Change

A single line in dojo/tools/cyclonedx/json_parser.py, set right after the existing analysis handling:

finding.unsaved_vex = analysis

No schema, model, or migration changes.

The CycloneDX parser collapses vulnerabilities[].analysis into status
booleans (is_mitigated/false_p) and drops justification and response
entirely. Attach the raw analysis dict to the in-memory finding as
`unsaved_vex` so downstream consumers can round-trip the full VEX data
(state/justification/response/detail). It is an inert attribute for
callers that don't read it, so OSS behavior is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant