-
Notifications
You must be signed in to change notification settings - Fork 602
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
Seeing "WARN some package(s) are missing CPEs" but it's not clear why #1634
Comments
It looks like the packages with missing CPEs are being generated for golang executables? syft -q -o json cgr.dev/chainguard/go | jq -rc '.artifacts[] | select(.cpes | type == "array" and length == 0) | { purl: .purl, language: .language, name: .name }'
{"purl":"pkg:golang/cmd/addr2line@(devel)","language":"go","name":"cmd/addr2line"}
{"purl":"pkg:golang/cmd/asm@(devel)","language":"go","name":"cmd/asm"}
{"purl":"pkg:golang/cmd/buildid@(devel)","language":"go","name":"cmd/buildid"}
{"purl":"pkg:golang/cmd/cgo@(devel)","language":"go","name":"cmd/cgo"}
{"purl":"pkg:golang/cmd/compile@(devel)","language":"go","name":"cmd/compile"}
{"purl":"pkg:golang/cmd/covdata@(devel)","language":"go","name":"cmd/covdata"}
{"purl":"pkg:golang/cmd/cover@(devel)","language":"go","name":"cmd/cover"}
{"purl":"pkg:golang/cmd/dist@(devel)","language":"go","name":"cmd/dist"}
{"purl":"pkg:golang/cmd/distpack@(devel)","language":"go","name":"cmd/distpack"}
{"purl":"pkg:golang/cmd/doc@(devel)","language":"go","name":"cmd/doc"}
{"purl":"pkg:golang/cmd/fix@(devel)","language":"go","name":"cmd/fix"}
{"purl":"pkg:golang/cmd/go@(devel)","language":"go","name":"cmd/go"}
{"purl":"pkg:golang/cmd/gofmt@(devel)","language":"go","name":"cmd/gofmt"}
{"purl":"pkg:golang/cmd/link@(devel)","language":"go","name":"cmd/link"}
{"purl":"pkg:golang/cmd/nm@(devel)","language":"go","name":"cmd/nm"}
{"purl":"pkg:golang/cmd/objdump@(devel)","language":"go","name":"cmd/objdump"}
{"purl":"pkg:golang/cmd/pack@(devel)","language":"go","name":"cmd/pack"}
{"purl":"pkg:golang/cmd/pprof@(devel)","language":"go","name":"cmd/pprof"}
{"purl":"pkg:golang/cmd/test2json@(devel)","language":"go","name":"cmd/test2json"}
{"purl":"pkg:golang/cmd/trace@(devel)","language":"go","name":"cmd/trace"}
{"purl":"pkg:golang/cmd/vet@(devel)","language":"go","name":"cmd/vet"} @anchore/tools since CPE matching is off by default now for the Go ecosystem, except for stdlib, do you think we should try to make this warning conditional on the package type being from an ecosystem that's going to want CPEs? Or maybe turn this warning off? Default golang matcher config is here: grype/cmd/grype/cli/options/match.go Lines 24 to 31 in a820759
Warning is raised here: https://github.com/anchore/grype/blob/a820759495f373180d3758fd2e95a823d5d5b28d/grype/pkg/package.go#L92C1-L94 |
How to reproduce it (as minimally and precisely as possible):
What you expected to happen:
Not to see the WARN message. It's not clear why this is showing up. If this method of scanning is subpar, I would've assumed Grype would try a better approach by default. I was also confused to see a reference to relying on CPEs, given Grype's awesome progress not to rely on CPEs!
Anything else we need to know?:
Environment:
grype version
:cat /etc/os-release
or similar):The text was updated successfully, but these errors were encountered: