-
Notifications
You must be signed in to change notification settings - Fork 370
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
osv-scanner fails to run code analysis with govulncheck, but running govulncheck directly works #1443
Comments
We have made a fix release for this issue: https://github.com/google/osv-scanner/releases/tag/v1.9.2 |
@hogo6002 Unfortunately issue still persists the same with v1.9.2.
Can we reopen this? |
It looks like we disable CGO specifically in our govulncheck calls as it was not supported. With the latest version of govulncheck it seems to work fine now (C code is ignored I believe), should be a relatively simple fix. |
#1443 This will solve the above issue, but let's not close it until the release is out. The disabling CGO env flag can be removed as it seems like govulncheck will successfully analyse CGO projects, just not actually do analysis on the C parts. The comment about: > This still leaves govulncheck enabled for non C related calls. It is only partially true, as if the C parts are required to compile the application, if CGO is disabled, it cannot compile successfully. We'll need to cherrypick this change into `main` after this is merged.
Thanks for the fix! I've verified versus our problematic code base that this actually solves the issue with CGO. However, I'm noting this was only merged to v1 branch and not main. Main is still broken in this regard. |
Issue
osv-scanner fails to run code analysis with govulncheck, but running govulncheck directly works.
This can be reproduced by scanning https://github.com/metal3-io/baremetal-operator's
release-0.8
branch, wheretest
directory scan is failing.Expected outcome
osv-scanner works, and correctly completes code analysis.
Actual outcome
libvirt-dev
is installed locally, if it matters.-r
is used, or osv-scanner is directly executed intest/
Running govulncheck directly in test (using
--test
or not, makes no difference):The text was updated successfully, but these errors were encountered: