Build with Go 1.26.9 for eleven standard-library advisories

Merged
RO
2mo ago
+2-0

Stacked on #880 ("Bump golang.org/x/net to v0.60.0 for GO-2026-6617"). The required Security check (govulncheck) passes only when both fixes are in, so this PR targets that branch. See "Merge order" below.

Finding

govulncheck reports eleven Go 1.26.7 standard library advisories that the CLI reaches, all fixed in Go 1.26.9:

Trivy doesn't flag these, which is why only govulncheck's Security check stays red after #880.

Fix: a toolchain line, not a higher go line

go 1.26.7

toolchain go1.26.9

Every workflow installs Go with actions/setup-go and go-version-file: go.mod. setup-go uses the toolchain directive when one is present, so CI, govulncheck, CodeQL and the GoReleaser release build all get 1.26.9. A local go older than 1.26.9 switches to it automatically: mise's go = "1.26" at 1.26.8 runs go1.26.9 here, and make check-toolchain still passes.

The precedent (#533, "Bump Go toolchain to 1.26.5") raised the go line instead. That doesn't work today: nixpkgs-unstable has only Go 1.26.8 (1.26.9 is in staging-next), and the flake builds with GOTOOLCHAIN=local. So go 1.26.9 would fail the required Nix flake builds check until nixpkgs catches up. The toolchain line is ignored there, and the Nix build keeps using its locked Go.

Proof

  • govulncheck -tags dev ./... under go1.26.7 with #880 applied: exit 3, the 11 stdlib advisories above.
  • On this branch, under go1.26.9: exit 0. The only thing left is the module-level notice GO-2026-5932 (x/crypto/openpgp is unmaintained). It has no fixed version, the CLI doesn't call it, and govulncheck doesn't fail on it.
  • go mod tidy is a no-op. bin/ci passes locally. make update-nix-hash builds the flake unchanged (nothing to update).

Left for later: the Nix-built binary

The flake's flake.lock pins a nixpkgs carrying Go 1.26.7, so nix build output still links the vulnerable stdlib (that's true on main today too). Once go_1_26 reaches 1.26.9 on nixpkgs-unstable, a follow-up should bump flake.lock and raise the go line to 1.26.9.

Merge order

  1. Merge this PR into deps/x-net-v0.60.0. #880 then holds both commits and goes green.
  2. Rebase-merge #880 into main. That keeps the two commits separate.

Summary by cubic

Fixes eleven X/Go 1.26.7 standard-library advisories that govulncheck flags: vulnerabilities in net/http, net/textproto, crypto/tls, and html/template are fixed in Go 1.26.9.

Uses a toolchain go1.26.9 directive in go.mod instead of raising the go line. CI, govulncheck, CodeQL, and the release build pick up 1.26.9 via actions/setup-go; local go switches automatically. The go line stays at 1.26.7 because nixpkgs-unstable only has Go 1.26.8 and the Nix flake builds with GOTOOLCHAIN=local.

  • govulncheck now exits 0 under Go 1.26.9; the remaining GO-2026-5932 notice is a module-level note with no fix and isn't a scan failure.
  • go mod tidy is a no-op and bin/ci passes locally.
  • The Nix-built binary still links 1.26.7 until nixpkgs bumps go_1_26 to 1.26.9; follow-up should bump flake.lock and raise the go line.

Merge order: merge this into deps/x-net-v0.60.0, then rebase-merge that into main.