-
Notifications
You must be signed in to change notification settings - Fork 18k
x/vuln: govulncheck ./... takes ~36mins #54940
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 |
govulncheck performs a call graph analysis on the source code, so that is expected to take more time than analyzing module or package import paths. However, 30+ mins sounds way too much. Based on go.mod, is this https://github.com/lightstep/lightstep-tracer-go? If not, any other info you can share that would help us diagnose or reproduce the issue? |
The go.mod attached is from the lightstep private mono-repo. What else can I gather for you? |
Do you know how much and why |
Without it, snyk was often timing out. I think their explanation was they were checking the commonly required packages thousands of times. The downside was that they could not identify exactly which module included a vulnerable package. |
Could it be that the project is just really big together with all of its depedencies? One measure that could help diagnose it is to see how many functions are linked by the program. |
@zpavlinovic While we are at it, is there any other debug diagnostics we could add? Like # of packages? # Lines? Time spent in each major phase? That may allow us to narrow this down a bit without revealing much private info. |
@timothy-king We could provide a patch that surfaces these numbers or even a verbose mode for A simpler thing that we could start with is to measure the average time taken for gopackages command over several runs:
|
Hi, all! Recently, I had a similar problem scanning ingress-nginx. It took around 17 minutes to complete. go install golang.org/x/vuln/cmd/govulncheck@latest Yesterday (September 30th), I updated to the latest version at 23 PM UTC and it is running in under a second since. Not sure if I can provide any other relevant info, but this problem is possibly fixed. I did not change my environment or other packages that could cause this time to reduce |
@jaehnri Thanks for sharing this! There was a performance update for analyzing binaries, perhaps that helped in your case. |
@mattcobb did updating making a difference for you? |
Closing. (feel free to reopen if the issue is still present) |
For our go.mod, govulncheck takes about 36mins. Is that to be expected? Would like to put this in a pull request pipeline, but that amount of time is too long.
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?
% date
Wed Sep 7 07:40:34 PDT 2022
% govulncheck ./... &> govulncheck.out
% date
Wed Sep 7 08:16:19 PDT 2022
What did you expect to see?
Expected a much shorter run time. Snyk test/monitor by example takes ~20secs or so (--prune-duplicate-dependencies is our default though). Attached is go.mod (as go.mod.txt) and go.sum (as go.sum.txt) if that helps.
What did you see instead?
It took about 36mins to get the results.
go.mod.txt
go.sum.txt
govulncheck.out.txt
The text was updated successfully, but these errors were encountered: