-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix(sbom): cyclonedx advisory should omit null
value
#5041
fix(sbom): cyclonedx advisory should omit null
value
#5041
Conversation
null
value
null
valuenull
value
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.
We already have too many tests for CycloneDX. Can we leverage the existing one?
Or we can add a new test just to validate the CycloneDX schema. |
I think for now we can use existing testcase, and also we have validation in integration tests (i added 1 testcase with vulnerabilities to validate vulnerability fields). I used existing testcase in af908f3 |
Description
Explicitly set
nil
for emptyrefs
slice for Cyclonedx Advisories to avoidThis case happens because we use pointer of not nil
Object
-Type == []cdx.Advisory, Value == nil
.Some simple example - https://go.dev/play/p/M-06dbzzkGB
Related issues
Checklist