-
Notifications
You must be signed in to change notification settings - Fork 18k
x/exp/vulndb/govulncheck: CVEs are not detected in GOPATH mode #51591
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 @jba @zpavlinovic |
When in I believe the behavior in |
Change https://go.dev/cl/394774 mentions this issue: |
The above CL addresses this in the new govulncheck. The existing one is no longer maintained. |
Change https://go.dev/cl/395241 mentions this issue: |
govulncheck requires module information to find vulnerabilities. But in GOPATH mode, there is no module information. Instead of silently succeeding in that case, govulncheck fails with an error. Also, fix an off-by-one bug that could result in a panic if only the top function in a call stack is in a top package. Fixes golang/go#51591 Cherry-picked: https://go-review.googlesource.com/c/exp/+/394774 Change-Id: I9923c1f03aa0a101de86fe03daaeeefc1d1f5bdf Reviewed-on: https://go-review.googlesource.com/c/vuln/+/395241 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
govulncheck requires module information to find vulnerabilities. But in GOPATH mode, there is no module information. Instead of silently succeeding in that case, govulncheck fails with an error. Also, fix an off-by-one bug that could result in a panic if only the top function in a call stack is in a top package. Fixes golang/go#51591 Cherry-picked: https://go-review.googlesource.com/c/exp/+/394774 Change-Id: I9923c1f03aa0a101de86fe03daaeeefc1d1f5bdf Reviewed-on: https://go-review.googlesource.com/c/vuln/+/395241 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
govulncheck requires module information to find vulnerabilities. But in GOPATH mode, there is no module information. Instead of silently succeeding in that case, govulncheck fails with an error. Also, fix an off-by-one bug that could result in a panic if only the top function in a call stack is in a top package. Fixes golang/go#51591 Cherry-picked: https://go-review.googlesource.com/c/exp/+/394774 Change-Id: I9923c1f03aa0a101de86fe03daaeeefc1d1f5bdf Reviewed-on: https://go-review.googlesource.com/c/vuln/+/395241 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
govulncheck requires module information to find vulnerabilities. But in GOPATH mode, there is no module information. Instead of silently succeeding in that case, govulncheck fails with an error. Also, fix an off-by-one bug that could result in a panic if only the top function in a call stack is in a top package. Fixes golang/go#51591 Cherry-picked: https://go-review.googlesource.com/c/exp/+/394774 Change-Id: I9923c1f03aa0a101de86fe03daaeeefc1d1f5bdf Reviewed-on: https://go-review.googlesource.com/c/vuln/+/395241 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go.mod
main.go
These files are located under $GOPATH/src/cvetest.
I then ran
govulncheck -verbose cvetest
in $GOPATH, and again in $GOPATH/src/cvetest.What did you expect to see?
It should report the same results both times, or it should complain that GOPATH mode is not supported.
What did you see instead?
When run from $GOPATH:
(Note that it claims to have loaded the package.)
When run from $GOPATH/src/cvetest:
The text was updated successfully, but these errors were encountered: