8000 fix: use namespace with name when purl is ecosystem golang in purl decoder by goatwu1993 · Pull Request #2586 · anchore/grype · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: use namespace with name when purl is ecosystem golang in purl decoder #2586

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

Conversation

goatwu1993
Copy link
Contributor
@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 <goatwu1993@gmail.com>
@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).

@spiffcs
Copy link
Contributor
spiffcs commented May 2, 2025

I'll pull changes from #2636 into this so we can get this across the finish line.

@spiffcs spiffcs changed the title fix: fix grype pkg:golang/k8s.io/ingress-nginx@v1.11.2 does not show cve because namespace not handled fix: use namespace with name when purl is ecosystem golang in purl decoder May 2, 2025
Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
@spiffcs
Copy link
Contributor
spiffcs commented May 2, 2025

@wagoodman since I contributed the other PR and the extra commit on this one can I get your review on this? Feels a little awkward piggy backing on a PR to review code I contributed to 😄

Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
@spiffcs spiffcs enabled auto-merge (squash) May 2, 2025 19:11
@spiffcs spiffcs merged commit 61b263f into anchore:main May 2, 2025
12 checks passed
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/ingress-nginx@v1.11.2 does not show cve
4 participants
0