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: fix grype pkg:golang/k8s.io/[email protected] does not show cve because namespace not handled #2586

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

goatwu1993
Copy link

@goatwu1993 goatwu1993 commented Apr 9, 2025

not sure what i am doing. but this seems to fix #2580

@goatwu1993 goatwu1993 force-pushed the fix/fix-purl-to-package-doesnot-handle-namespace branch 2 times, most recently from 4becce0 to 31b3c74 Compare April 9, 2025 07:51
@popey
Copy link
Contributor

popey commented Apr 9, 2025

@goatwu1993 thank you for the pull request! 🙏

Please could you sign-off the changes. There's some documentation here about the process.

…cve because namespace not handled

Signed-off-by: goatwu1993 <[email protected]>
@goatwu1993 goatwu1993 force-pushed the fix/fix-purl-to-package-doesnot-handle-namespace branch from 31b3c74 to 4e0dfff Compare April 9, 2025 09:07
// copy to avoid mutating the original purl object
name := purl.Name
if purl.Namespace != "" {
name = fmt.Sprintf("%s/%s", purl.Namespace, purl.Name)
Copy link
Contributor

@wagoodman wagoodman Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is an ecosystem specific decision -- that is, in some cases the namespace should be added (e.g. golang, maven, etc) where as in others it should not (e.g. rpm, deb, etc).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

grype pkg:golang/k8s.io/[email protected] does not show cve
3 participants