-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/vuln/cmd/govulncheck: report stdlib CVEs #51653
Comments
If you are analyzing an already compiled binary, I would expect it to look at |
Thanks for the suggestions! We have on our agenda to add support for Go standard library vulnerabilities. We don't have an exact timeline when the support will land, but we have been actively working on it. Regarding your own database, there is already functionality for that. You can pass path to your db using
This is a good place to start building you own db. |
Good points, if getting a good default Go version is as easy as using I would still keep the command line flag regardless of the default behavior. My exotic case is the ability to spot vulnerabilities when the development Go version is not the same as the runtime Go version, without having to install multiple Go toolchains nor having to submit the code to a CI system.
I've seen that I can work on this change if you are willing to accept contributions. |
We are currently working on the new version (of UI for) govulncheck that should be up and running in the near future. We will definitely welcome community contributions then. I hope this works for you. |
Sure, I'll wait until then! |
Note: the new version of govulncheck is now in x/vuln/cmd/govulncheck. The previous version is not supported anymore and has been deleted. |
Please see vulndb on how to structure proprietary vulnerability databases, especially stdlib parts. For instance, one can run |
That is awesome. One minor comment: what do you think about adjusting the text "Fixed in: ..." a bit for stdlib packages to use go version string style? Currently reporting like the following:
Instead, something like:
|
The Go Vulnerability Database has a bunch of CVEs associated to the standard library which are not reported by
govulncheck
.Additionally, I would like to have my own database containing std packages and symbols sanctioned from secure applications, such as crypto/rc4.
My proposal is to add a new optional command line flag to
govulncheck
which specifies the Go version that should be vetted, i.e.-go=1.17.3
. When this flag is set,govulncheck
will load all the standard library vulnerabilities and filter them out by the provided Go version. Any std vulnerability finding would be treated and reported as if it were a normal module vulnerability.Example:
Given the following main.go:
Currently
govulncheck
does not report any vulnerability.With this proposal, it would report one when selecting an old Go version:
I leave out of this proposal to decide if the std check should be executed by default or not. AFAIU
govulncheck
would require the complete Go semantic version, which is not provided bygo.mod
, and this additional check would makegovulncheck
run slower.cc @jba
The text was updated successfully, but these errors were encountered: