Closed
Description
govulncheck version
Go: go1.23.0
Scanner: [email protected]
DB: https://vuln.go.dev/
DB updated: 2024-08-19 17:26:34 +0000 UTC
Does this issue reproduce at the latest version of golang.org/x/vuln?
yes, we are seeing this with @latest
go: downloading golang.org/x/vuln v1.1.3
go: downloading golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7
Go: go1.23.0
Scanner: [email protected]
Output of go env
in your module/workspace:
GO111MODULE=''
GOARCH='amd64'
GOBIN='/builds/<companyName>/<programName>/bin'
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/builds/<companyName>/<productName>/.cache/pkg/mod'
GONOPROXY='gitlab.com/<companyName>'
GONOSUMDB='gitlab.com/<companyName>'
GOOS='linux'
GOPATH='/builds/<companyName>/<productName>/.cache'
GOPRIVATE='gitlab.com/<companyName>'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='local'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.23.0'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/root/.config/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/builds/<companyName>/<productName>/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build2454570330=/tmp/go-build -gno-record-gcc-switches'
What did you do?
Simply ran
go install golang.org/x/vuln/cmd/govulncheck@latest ; govulncheck ./...
within a gitlab pipeline
What did you see happen?
running go vulncheck within a container built FROM golang:1.23.0
a scan of our repro fails with the following:
Scanning your code and 1332 packages across 127 dependent modules for known vulnerabilities...
panic: Cannot range over: func(yield func(K, V) bool)
goroutine 19402 [running]:
golang.org/x/tools/go/ssa.(*builder).rangeStmt(0xc022b93df8, 0xc001fbd080, 0xc005f8c8a0, 0x0)
/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2074 +0x774
golang.org/x/tools/go/ssa.(*builder).stmt(0xc022b93df8, 0xc001fbd080, {0x9d35d0?, 0xc005f8c8a0?})
/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2293 +0x205
golang.org/x/tools/go/ssa.(*builder).stmtList(...)
/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:944
golang.org/x/tools/go/ssa.(*builder).stmt(0xc022b93df8, 0xc001fbd080, {0x9d32a0?, 0xc005f99680?})
/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2255 +0xe47
golang.org/x/tools/go/ssa.(*builder).buildFunctionBody(0xc022b93df8, 0xc001fbd080)
/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2369 +0x433
golang.org/x/tools/go/ssa.(*builder).buildFunction(0x7f0b80?, 0xc001fbd080)
/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2304 +0x28
golang.org/x/tools/go/ssa.(*builder).buildCreated(0xc022b93df8)
/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2391 +0x25
golang.org/x/tools/go/ssa.(*Package).build(0xc00435f380)
/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2584 +0xc25
sync.(*Once).doSlow(0x0?, 0x0?)
/usr/local/go/src/sync/once.go:76 +0xb4
sync.(*Once).Do(...)
/usr/local/go/src/sync/once.go:67
golang.org/x/tools/go/ssa.(*Package).Build(...)
/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2455
golang.org/x/tools/go/ssa.(*Program).Build.func1(0x0?)
/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2440 +0x45
created by golang.org/x/tools/go/ssa.(*Program).Build in goroutine 18863
/go/pkg/mod/golang.org/x/[email protected]/go/ssa/builder.go:2439 +0x187
make: *** [Makefile:55: vulncheck-pipeline] Error 2
What did you expect to see?
previous versions of golang did not panic