-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: use govulncheck in bazel #61494
Comments
This comment was marked as resolved.
This comment was marked as resolved.
I think it's not question, but feature request? |
This is a feature request. Bazel is not currently supported for govulncheck. A big barrier right now is how to translate the bazel libraries to module versions for a bazel build. govulncheck cannot give meaningful output unless given such a mapping so that it to compare against its database.
Given the above, the direct answer to your question today is rewrite the package so that it can be built by (I would recommend reworking the issue a bit so it is obviously in the form of an feature request instead of a question.) |
CC @golang/vulndb |
This comment was marked as spam.
This comment was marked as spam.
@loeffel-io FYI you can use emoji voting 👍 instead of +1. |
Technically, most of the recent go tools, including This allows build tools, such as Bazel or Buck2, to provide package information to the go tools. For Bazel rules_go, a basic package driver is provided via https://github.com/bazelbuild/rules_go/wiki/Editor-and-tool-integration I think the current problem with this is that either
or
So it would be nice if the verbose mode of Once the package loading problem is solved, we could easily instrument With the items above resolved, we could easily run |
The trouble is that vulnerability analysis has to operate at a module level, because that is the unit of versioning and versions are strictly necessary for vulnerability matching. |
@ianthehat I think that's possible. The current driver in rules_go predates the recent advancements under It would be a nontrivial amount of work to fully support all the |
What version of Go are you using (
go version
)?Does this issue reproduce at the latest version of golang.org/x/vuln?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
install govulncheck and run it in bazel workspace.
e.g.
What did you expect to see?
check go vulnerabilities in workspace
What did you see instead?
how can we use govulncheck for bazel go code?
The text was updated successfully, but these errors were encountered: