grafana / grafana/plugin-validator

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

Open Beginner friendly
#827 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
39
Forks
10
Avg merge
9h 43m
Merged PRs (30d)
120

Description

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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the container build definition and compare the Go version in the govulncheck builder stage with the runtime go toolchain used by go list. Reproduce the source scan against a plugin declaring go 1.27, then verify the scan completes without the version-mismatch error and reports the expected vulnerability result.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
build-system, security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.