Skip to content
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

Merged
merged 1 commit into from
Feb 10, 2025
Merged

🐛 Fix namespace for Red Hat PURLs #5199

merged 1 commit into from
Feb 10, 2025

Conversation

czunker
Copy link
Contributor

@czunker czunker commented Feb 10, 2025

No description provided.

@czunker
Copy link
Contributor Author

czunker commented Feb 10, 2025

This is how they are formatted in OSV: https://security.access.redhat.com/data/osv/RHBA-2024:6680.json

Copy link
Contributor

github-actions bot commented Feb 10, 2025

Test Results

3 287 tests   3 283 ✅  1m 39s ⏱️
  385 suites      4 💤
   29 files        0 ❌

Results for commit e5a9299.

♻️ This comment has been updated with latest results.

@czunker czunker force-pushed the czunker/redhat_purls branch from 70a188c to 140f074 Compare February 10, 2025 12:49
providers/os/resources/purl/purl.go Outdated Show resolved Hide resolved
@@ -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
Copy link
Member

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?

Copy link
Contributor Author

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.

@czunker czunker force-pushed the czunker/redhat_purls branch from 140f074 to 51c261c Compare February 10, 2025 13:14
@czunker czunker force-pushed the czunker/redhat_purls branch from 51c261c to e5a9299 Compare February 10, 2025 13:30
@czunker czunker marked this pull request as ready for review February 10, 2025 13:37
@czunker czunker merged commit 48deba6 into main Feb 10, 2025
17 checks passed
@czunker czunker deleted the czunker/redhat_purls branch February 10, 2025 14:15
@github-actions github-actions bot locked and limited conversation to collaborators Feb 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants