Skip to content
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

x/vuln/cmd/govulncheck: incorrect error message #57013

Closed
hyangah opened this issue Dec 1, 2022 · 1 comment
Closed

x/vuln/cmd/govulncheck: incorrect error message #57013

hyangah opened this issue Dec 1, 2022 · 1 comment
Assignees
Labels
FrozenDueToAge vulncheck or vulndb Issues for the x/vuln or x/vulndb repo

Comments

@hyangah
Copy link
Contributor

hyangah commented Dec 1, 2022

$ go version
go version go1.19.3 darwin/amd64

$ tree
.
├── go.mod
└── main.go
0 directories, 2 files

$ cat go.mod
module w

go 1.18

$ cat main.go
package main

import "math/big"

func main() { }

What I expect to see

package load error caused by build error (unused import)

What I saw instead

"Your module is missing a go.sum file. Try running go mod tidy."

$ govulncheck .
...
Scanning for dependencies with known vulnerabilities...
govulncheck: no go.sum file

Your module is missing a go.sum file. Try running go mod tidy.
...

govulncheck version

$ go version -m $(which govulncheck)
<path_to>/govulncheck: go1.19.3
	path	golang.org/x/vuln/cmd/govulncheck
	mod	golang.org/x/vuln	v0.0.0-20221122171214-05fb7250142c	h1:Q/cUnXhEEKm8vd19JItKXGfjQl2Tts0p7mR0uXW7LJE=
	dep	golang.org/x/exp	v0.0.0-20220722155223-a9213eeb770e	h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA=
	dep	golang.org/x/mod	v0.6.0	h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I=
	dep	golang.org/x/sys	v0.1.0	h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U=
	dep	golang.org/x/tools	v0.2.1-0.20221108172846-9474ca31d0df	h1:3MIQGcHdkHmYqPNhU+qLUjA5oW4wwWzrSa8zjqZ3gHk=
	build	-compiler=gc
	build	CGO_ENABLED=1
	build	CGO_CFLAGS=
	build	CGO_CPPFLAGS=
	build	CGO_CXXFLAGS=
	build	CGO_LDFLAGS=
	build	GOARCH=amd64
	build	GOOS=darwin
	build	GOAMD64=v1

cc @zpavlinovic @golang/vulndb

@hyangah hyangah added the vulncheck or vulndb Issues for the x/vuln or x/vulndb repo label Dec 1, 2022
@gopherbot gopherbot modified the milestones: Unreleased, vuln/unplanned Dec 1, 2022
@zpavlinovic zpavlinovic self-assigned this Dec 1, 2022
@gopherbot
Copy link
Contributor

Change https://go.dev/cl/456135 mentions this issue: cmd/govulncheck: delete no-go-sum error

softdev050 added a commit to softdev050/Golangvuln that referenced this issue Apr 5, 2023
This error is not necessary as the original error message "missing
go.sum entry ..." is clear enough. Otherwise, the current classification
of this error was wrong and would mask other important errors.

Also cleans up other currently unused errors.

Fixes golang/go#57013

Change-Id: If67ea4423b81bf35103c67d10c7e1eb291470fb3
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/456135
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
sayjun0505 added a commit to sayjun0505/Golangvuln that referenced this issue Apr 8, 2023
This error is not necessary as the original error message "missing
go.sum entry ..." is clear enough. Otherwise, the current classification
of this error was wrong and would mask other important errors.

Also cleans up other currently unused errors.

Fixes golang/go#57013

Change-Id: If67ea4423b81bf35103c67d10c7e1eb291470fb3
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/456135
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
stanislavkononiuk added a commit to stanislavkononiuk/Golangvuln that referenced this issue Jun 26, 2023
This error is not necessary as the original error message "missing
go.sum entry ..." is clear enough. Otherwise, the current classification
of this error was wrong and would mask other important errors.

Also cleans up other currently unused errors.

Fixes golang/go#57013

Change-Id: If67ea4423b81bf35103c67d10c7e1eb291470fb3
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/456135
Run-TryBot: Zvonimir Pavlinovic <zpavlinovic@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Julie Qiu <julieqiu@google.com>
@golang golang locked and limited conversation to collaborators Dec 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge vulncheck or vulndb Issues for the x/vuln or x/vulndb repo
Projects
None yet
Development

No branches or pull requests

3 participants