-
Notifications
You must be signed in to change notification settings - Fork 594
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
Add Golang STD library package given a Golang binary has been discovered compiled with that go binary #1853
Comments
I run syft against the golang:1.18 builder image (results are consistent against the 1.19.x branch) and I found the following two cpes:
I was expecting that the first were related to stdlib vulns and the other one for go sdk tools, but i found that https://nvd.nist.gov/vuln/detail/CVE-2018-7187 points to the first also. So I guess we cannot get rid of Go SDK false positives using this approach 😞 Purl was identified as We are not procesing file locations nor artifact relationship right now, this is only ingested by grype later I was trying a similar approach in my internal tests, but I set type attribute with a custom value, said "go-std", as is it later shown as it in the grype report and it is handy to identify the ones related to stdlibs, but i guess it is more like a hack than a supported feature 😉 |
Is there any update on when this enhancement would done, or what the approach would look like? Would this be a modification to the goBinaryCataloger cataloguer, or would the better approach be to piggy back off the goCompiledVersion included with the packages created by the goModCataloger? |
@Brian-McM closed as of #2195 It is a modification to the goBinaryCataloger as it stands now. The jury is out on the goModCataloger as that is asserting a synthetic package that could potentially exist VS one that is actually linked inside the discovered artifact =) |
Not sure why I didn't see this sooner, but thanks @spiffcs. Just updated syft / grype and it works great! |
What would you like to be added:
Even if an image/dir scan target does not have the Golang sdk installed, syft should still surface a package to represent the Golang standard library/version if a Golang binary is detected which was compiled using said std lib.
A good example of this use case can de demonstrated on syft itself:
The above was discovered by the
go-module-binary-cataloger
Given that we know the
goCompiledVersion
here isgo1.19.5
we can add a package to the SBOM in the form of:Open questions include:
Context: https://anchorecommunity.slack.com/archives/C027JE5M345/p1685448982348869?thread_ts=1685374141.089149&cid=C027JE5M345
Why is this needed:
Allows users using SBOM to detect vulnerabilities like this one which should fire against the go binary itself, but is still valid given a program that was compiled with that binary:
https://nvd.nist.gov/vuln/detail/CVE-2022-23773
The text was updated successfully, but these errors were encountered: