Skip to content

govulncheck source scan fails for plugins on Go 1.27 (govulncheck built with Go 1.26) #827

Description

@arturminchukov

Plugins with go 1.27.0 in go.mod fail the govulncheck source scan with
Error severity govulncheck-scan-failed, blocking validation:

This application uses version go 1.26 of the source-processing packages
but runs version go 1.27 of go list
/usr/local/go/src/math/rand/v2/rand.go:213:17: method must have no type parameters

Cause: the govulncheck binary is built in the golang:1.26-alpine builder
stage, while the Go toolchain used by go list at runtime is 1.27. Go 1.27
stdlib uses generic methods, which the 1.26 go/types packages cannot parse.

Same class of mismatch as #617.

Running govulncheck v1.7.0 built with Go 1.27 locally on the same module
reports "No vulnerabilities found".

Suggested fix: build govulncheck with the same Go version that runs at
runtime (or install it with GOTOOLCHAIN=auto at build time), and keep the
builder and runtime stages in sync.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions