-
Notifications
You must be signed in to change notification settings - Fork 18k
x/vuln: unexpected publishing latency #66872
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 |
Thanks for reporting this. Yes, govulncheck does not do any type of caching. We don't print anything related to that so as to not confuse the users. They shouldn't even be aware of its (non-)existence. It is hard to tell why you are seeing this. We'll try to dig on the server side for more information. |
…but maybe you could print something about querying a remote server? That would be helpful, not just to establish the correct mental model, but also for many other issues (e.g. slow networking). Thanks for taking a look at the server side. |
Would that just be a message upon successful retrieval of information from the vuln db server? I think that if we decide to add this, then we'd likely hide this under the |
I suggest printing a message when starting the request, not afterwards. That way, if the program hangs, it’s very clear what’s happening: the last line will tell you exactly what it’s trying to do. Hiding this behind a verbose flag sounds reasonable. |
Change https://go.dev/cl/580175 mentions this issue: |
Edit: we'll just also add an additional message when the checking phase starts. |
Change https://go.dev/cl/580216 mentions this issue: |
And also update the documentation. Updates golang/go#66872 Change-Id: I73f0c7e9c1f46b66711b878748bf78571d26f66b Reviewed-on: https://go-review.googlesource.com/c/vuln/+/580175 Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
We looked at the server side and we believe this has something to do with replication and eventual-consistency. We could dig deeper into that, but it is not clear if it is really worth it. |
govulncheck version
% govulncheck -version
Go: go1.22.2
Scanner: govulncheck@v1.0.1
DB: https://vuln.go.dev
DB updated: 2024-04-17 15:34:19 +0000 UTC
No vulnerabilities found.
Share feedback at https://go.dev/s/govulncheck-feedback.
Does this issue reproduce at the latest version of golang.org/x/vuln?
Yes, it’s server-side
Output of
go env
in your module/workspace:What did you do?
I ran govulncheck ./...
What did you see happen?
govulncheck would not print https://pkg.go.dev/vuln/GO-2024-2730, despite my program being affected.
What did you expect to see?
I saw golang/vulndb@cd4d4fe was merged and https://pkg.go.dev/vuln/GO-2024-2730 worked in my browser, so I was surprised to see that it took about 10 more minutes or so for govulncheck to find the vulnerability locally.
At first, I suspected govulncheck was using a locally cached version of the database. I looked for an “update” command but couldn’t find anything. Finally I read the source to see that govulncheck always seems to query the database (but doesn’t print anything about that), and that’s roughly when govulncheck invocations started showing the expected output:
What is the current publishing latency and could it be improved? Is there a cache that should be invalidated or something along these lines?
The text was updated successfully, but these errors were encountered: