-
Notifications
You must be signed in to change notification settings - Fork 18k
x/vuln: fails to run in monorepo with non-go programming language files #54895
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
Comments
CC @golang/vulndb |
I found a workaround. Setting the CGO_ENABLED=0 govulncheck ./...
govulncheck is an experimental tool. Share feedback at https://go.dev/s/govulncheck-feedback.
Scanning for dependencies with known vulnerabilities...
No vulnerabilities found. |
Thanks for bringing this up. Do you have a reproducible example we can work with? |
@zpavlinovic here is a reproduction This is a little harder to reproduce than I was originally thinking. I first tried recreating the problem by creating a simple h, cc, and go files, but I didn't encounter the same problem. Generating cc and go protobuf/grpc sources was able to reproduce the error. I am not sure what is breaking here. |
I can confirm that the message appears for the reproduction module. But I get the same message when running |
Go does recognize C++ files in the sense that it will try to compile them
|
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?
What did you expect to see?
govulncheck ./... govulncheck is an experimental tool. Share feedback at https://go.dev/s/govulncheck-feedback. Scanning for dependencies with known vulnerabilities... No vulnerabilities found.
What did you see instead?
In my monorepo most of the code is separated by language, but some of it isn't (code generated from protobufs live next to the protos used to generate them). When I attempt to run with a more limited scope to only hit my go code dir, I still run into the same issue. go vuln check walks the directory to where those generated sources are, but chokes on the c++ files there. Those c++ files aren't used by any of the go programs.
The text was updated successfully, but these errors were encountered: