-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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): Use UUID as BomRef for packages with empty purl #5448
fix(sbom): Use UUID as BomRef for packages with empty purl #5448
Conversation
I thought about this case for a long time. Lines 368 to 371 in 26b4959
But perhaps we need to skip these dependencies when parsing Go files in @knqyf263 wdyt? |
} else if p.Type != "" { | ||
root.PackageURL = &p | ||
} | ||
if p != nil { |
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.
nit: Is there any reason to make it an independent if-statement rather than else if
?
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.
I don't see point of using else if
, because we return error when err != nil
.
And independent if
seems to me more readable.
Description
After #5190 we don't create purl for
Golang
dependencies with replace to local directory.But we still create CycloneDX component, but
BomRef
andpurl
for these packages are incorrect.See more in #5434
We should skip wrong
purl
and useUUID
forBomRef
for these components.Related Issues
Related PRs
Checklist