-
Notifications
You must be signed in to change notification settings - Fork 24
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 namespace for Red Hat PURLs #5199
Conversation
This is how they are formatted in OSV: https://security.access.redhat.com/data/osv/RHBA-2024:6680.json |
Test Results3 287 tests 3 283 ✅ 1m 39s ⏱️ Results for commit e5a9299. ♻️ This comment has been updated with latest results. |
70a188c
to
140f074
Compare
@@ -80,8 +80,15 @@ func NewPackageURL(pf *inventory.Platform, t Type, name, version string, modifie | |||
// and if the distro is set via labels, set it as a namespace | |||
if pf.Labels != nil && pf.Labels[detector.LabelDistroID] != "" { | |||
purl.Namespace = pf.Labels[detector.LabelDistroID] | |||
} else if pf.Name != "" { | |||
// Fallback to the platform name if the distro-id is not set | |||
purl.Namespace = pf.Name |
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.
why do we need that?
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 changed this, so that we only rely on the platform name for the namespace.
140f074
to
51c261c
Compare
Signed-off-by: Christian Zunker <[email protected]>
51c261c
to
e5a9299
Compare
No description provided.