ci: ignore golang.org/x/mod sumdb CVEs for the Go tool binaries - #340
Merged
Conversation
nozaq
force-pushed
the
claude/trivy-detection-review-8ln2bn
branch
from
August 19, 2026 22:09
6984638 to
2fc73dc
Compare
nozaq
marked this pull request as ready for review
August 19, 2026 22:17
nozaq
force-pushed
the
claude/trivy-detection-review-8ln2bn
branch
from
August 19, 2026 22:19
2fc73dc to
fe75d67
Compare
CVE-2026-56864 and CVE-2026-56865 are fixed in golang.org/x/mod v0.40.0, which only Terraform 1.15.9 has picked up so far. Both sit in the checksum database client, and none of the binaries links it: gopls links only modfile, module and semver, terraform and tofu only sumdb/dirhash, and terraform-ls no x/mod package at all. Co-Authored-By: Claude <noreply@anthropic.com>
nozaq
force-pushed
the
claude/trivy-detection-review-8ln2bn
branch
from
August 19, 2026 22:20
fe75d67 to
4835c16
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trivy started reporting
CVE-2026-56864andCVE-2026-56865(golang.org/x/mod, HIGH), failing thecheck-imagejobs on #338 and #339:golang.org/x/modusr/local/bin/goplsgolang(all variants)usr/local/bin/terraformterraform(all variants)usr/local/bin/terraform-lsterraform(all variants)usr/local/bin/tofuopentofu(all variants)usr/local/bin/terraformis not among the failures on #338 — that PR bumps Terraform to 1.15.9, which already ships the fixed v0.40.0 — but it does fail at the 1.15.8 currently onmain, so it is covered here too and clears on the next Terraform bump.Why these are acceptable to ignore
Both advisories are scoped to the checksum database client, and neither symbol is linked into any of the four binaries:
golang.org/x/mod/sumdb, symbolClient.Lookupgolang.org/x/mod/sumdb/tlog, symboltileHashReader.ReadHashesInspecting the shipped binaries, the
golang.org/x/modpackages actually linked are:gopls—modfile,module,semver,internal/lazyregexpterraform,tofu—sumdb/dirhashonly (directory and zip hashing, a separate package fromsumdb)terraform-ls— nox/modpackage; the module appears only in the Go build infoTrivy matches on the module version recorded in the Go build info rather than the packages linked, so it reports the whole module. Reaching either symbol additionally requires the process to verify modules against an attacker-controlled
GOSUMDB/GOPROXY, which none of these binaries does.The fix is in
golang.org/x/modv0.40.0. Apart from Terraform, no upstream release carries it yet — the gopls and OpenTofu development branches are on v0.39.0 and the Terraform Language Server one on v0.38.0 — so the entries carry the sameexpired_at: 2026-10-31as the neighbouring ones and will resurface if upstream has not moved by then.The Go toolchain itself is unaffected here:
cmd/gois fixed in Go 1.25.13 / 1.26.6, and #339 bumps thegolangimage to 1.25.14 / 1.26.7.Verification
Ran Trivy v0.73.0 (the version both PRs bump to) against the actual
goplsv0.23.0,terraform1.15.8,terraform-ls0.39.0 andtofu1.12.6 binaries laid out at their image paths: