Skip to content

Build with Go 1.26.9 for eleven standard-library advisories - #881

Merged
robzolkos merged 1 commit into
deps/x-net-v0.60.0from
deps/go-toolchain-1.26.9
Oct 12, 2026
Merged

robzolkos merged 1 commit into
deps/x-net-v0.60.0from
deps/go-toolchain-1.26.9

Conversation

@robzolkos

@robzolkos robzolkos commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

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 Bump golang.org/x/net to v0.60.0 for GO-2026-6617 #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. Bump golang.org/x/net to v0.60.0 for GO-2026-6617 #880 then holds both commits and goes green.
  2. Rebase-merge Bump golang.org/x/net to v0.60.0 for GO-2026-6617 #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.

Written for commit 8b223ba. Summary will update on new commits.

View guided diff Turn on auto-fix

govulncheck reports eleven advisories that the CLI reaches in the Go
1.26.7 standard library (net/http, net/textproto, crypto/tls and
html/template), all fixed in Go 1.26.9: GO-2026-6617, 6613, 6612, 6611,
6610, 6608, 6607, 6605, 6603, 6600 and 6599.

This is a toolchain line, not a higher go line. setup-go reads the
toolchain directive, so every CI and release job builds and scans with
1.26.9, and a local go older than that switches to it. The go line
stays the minimum that builds the module: nixpkgs-unstable has only Go
1.26.8, and the flake builds with GOTOOLCHAIN=local, so go 1.26.9 there
would fail the required Nix flake build until nixpkgs catches up.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

You’re at about 92% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

View guided diff | Turn on auto-fix | Re-trigger cubic

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approved

The focused toolchain directive correctly updates standard CI and release builds while preserving Nix compatibility.

0 open findings

What changed in this PR

Pins Go 1.26.9 to address standard-library advisories while retaining Go 1.26.7 compatibility for Nix builds.

Changes:

  • Adds the toolchain go1.26.9 directive.
  • Leaves the minimum go directive unchanged.

[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

File Description
go.mod Selects Go 1.26.9 without raising the module’s minimum Go version.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@robzolkos
robzolkos merged commit 58e4ae7 into deps/x-net-v0.60.0 Oct 12, 2026
37 checks passed
@robzolkos
robzolkos deleted the deps/go-toolchain-1.26.9 branch October 12, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants