-
Notifications
You must be signed in to change notification settings - Fork 188
fix: Missing VEX status mappings for resolved_with_pedigree and false_positive #2813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to resolving the addition of a GitHub workflow, you will need to include a DCO signoff before this change can be approved.
61aa4aa to
56a00d1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening up this PR! Looks great with some minor comment!
| Status: generated.VexStatusFixed, | ||
| VexJustification: generated.VexJustificationNotProvided, | ||
| Statement: "", | ||
| StatusNotes: "Vulnerability has been remediated with evidence provided in component pedigree", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be missing something but it seems like the status note inclusion may be missing in the parser_cyclonedx change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm understanding correctly, the StatusNotes extraction is already handled in parser_cyclonedx.go lines 582-592. I think the code extracts StatusNotes from vulnerability.Analysis.Detail for analysis states, including resolved_with_pedigree and false_positive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Irene, ah sorry i didn't realize this was in the "Details" field in the test, i thought that was a derivation of the status notes from the ENUM.
Along that line of thinking I am thinking if it would be possible to add status notes here about the enum if "Details" is empty? So that we don't lose that bit of information if it is not already captured within Details?..
i.e. if Details is empty we can include StatusNotes as "CDX state: false_positive", or "CDX state: resolved_with_pedigree" since the bit would be lost otherwise?
wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thats a good idea! I've added your suggestion to the code.
…positive Signed-off-by: Irena Liu <irena.liu@verkada.com>
…uses Signed-off-by: Irena Liu <irena.liu@verkada.com>
30618c6 to
a7f86b8
Compare
Signed-off-by: Irena Liu <irena.liu@verkada.com>
0201225 to
644fe18
Compare
Description of the PR
This PR addresses issue 2812, adding support for two missing CycloneDX 1.6 VEX (Vulnerability Exploitability eXchange) status values:
resolved_with_pedigreeandfalse_positive. These statuses were introduced in CycloneDX 1.5+ but were not previously handled by the GUAC parser, causing ingestion failures with the error "unknown vulnerability status".GUAC currently fails to ingest CycloneDX 1.6 SBOMs containing the following VEX statuses:
resolved_with_pedigree- Indicates the vulnerability has been remediated with evidence provided in component pedigreefalse_positive- Indicates the vulnerability was falsely identified or associated with the componentUnit Tests
New test cases pass:
Test_cyclonedxParser/valid_CycloneDX_VEX_document_with_resolved_with_pedigree_statusTest_cyclonedxParser/valid_CycloneDX_VEX_document_with_false_positive_statusgo test ./pkg/ingestor/parser/cyclonedx/... -vPR Checklist
-sflag togit commit.make generatehas been runmake generatehas been runmake generatehas been runcollectsubprotobuf has been changed,make protohas been run