Repository navigation
chore(go): pin toolchain go1.26.11 for GO-2026-6859 - #251
shockalotti wants to merge 1 commit into
Conversation
main has been red since the guard was added: the `Deterministic claims guard` runs govulncheck, which reports Vulnerability #1: GO-2026-6859 Found in: net/http@go1.26.10 Fixed in: net/http@go1.26.11 go.mod pinned `toolchain go1.26.10`, so the scanner saw the vulnerable stdlib and the "clean security scan" claim failed. Nothing in the tree changed to cause it; the advisory simply landed under our pinned version. Bump the toolchain to the fixed release. The Docker builder already uses golang:1.27.3, so only the module's toolchain was behind. This is deliberately independent of any feature branch: it blocks every PR, and a security bump does not belong buried in an unrelated refactor.
There was a problem hiding this comment.
Important
The go.mod bump fixes the CI gate, but the release image still compiles with an affected Go: Dockerfile:35 pins golang:1.27.3-alpine, which GO-2026-6859 fixes only at 1.27.4.
Reviewed changes
toolchainraised togo1.26.11— one line ingo.mod;go 1.26.0and all dependencies untouched. Confirmed effective: thegovulncheck (clean-security-scan claim)step passes on this PR (run 43103472857), andmain@282e2a7did fail withGO-2026-6859reached throughinternal/handler/booking_handler.go:745.
⚠️ The Docker builder image is still on an affected Go, so shipped binaries keep the vulnerability
The PR body's premise — "The Docker builder already uses golang:1.27.3, so only the module toolchain was behind; no image change is needed" — does not hold for this advisory. GO-2026-6859 is published with two fix points, 0 → 1.26.11 and 1.27.0-0 → 1.27.4, so 1.27.3 is inside the affected range. Since the builder's own toolchain (1.27.3) is newer than go.mod's toolchain go1.26.11, the image build keeps using 1.27.3 and the released container still contains the racy net/http that govulncheck just flagged as reachable from booking creation. The green CI run cannot catch this: audit.yml scans the module toolchain, and docker-publish.yml builds the image on every PR without scanning it.
Technical details
# Docker builder image must move to go1.27.4
## Affected sites
- `Dockerfile:35` — `FROM --platform=$BUILDPLATFORM golang:1.27.3-alpine@sha256:d200d2dd76b03a99b52651fd1325aff7dcd35422c35c01bac56571b0507f3deb AS builder` compiles with Go 1.27.3.
- `go.mod:5` — `toolchain go1.26.11` is only a floor for the module; it does not cap the builder.
- `CHANGELOG.md` `[Unreleased]` — no Security entry for this fix.
## Evidence
- `https://vuln.go.dev/ID/GO-2026-6859.json`: ranges `0 → 1.26.11` and `1.27.0-0 → 1.27.4` (CVE-2026-97054, "HTTP/1 server crash due to MaxBytesReader header race in net/http").
- `main` audit run 43100991848 shows reachability via `internal/handler/booking_handler.go:745` (`http.MaxBytesReader` + `io.ReadAll`); the repo uses `MaxBytesReader` in ~67 handlers.
- `docker-publish.yml` has no image scanner (only SBOM via syft), so a vulnerable builder produces no failing check.
- Prior precedent: CHANGELOG 0.11.0 "Go toolchain 1.26.9, and the Docker image builds with Go 1.27.2. Both close 12 published Go standard-library vulnerabilities…".
## Required outcome
- The builder stage compiles the release binary with a Go version at or above 1.27.4 (or drop to a 1.26.11 builder), so the published image no longer carries GO-2026-6859.
- `CHANGELOG.md` `[Unreleased]` records the fix under `### Security`, naming both the toolchain and the builder image, matching the 0.11.0 entry.
## Suggested approach
- `golang:1.27.4-alpine@sha256:0a5f7fe796599ff487605987432e7619ae45beeb2fba4c2ce0b907879932aebf` — that tag exists on Docker Hub (published 2026-11-10, multi-arch: amd64, arm64, arm, 386, ppc64le, s390x), so tag and digest can move together as the file already does.
## Open questions for the human
- If the builder is deliberately kept a cycle ahead of `go.mod`, 1.27.4 is the correct target rather than 1.26.11; confirm that reading before editing.deepseek-v4.1-flash | 𝕏
|
Closing as a duplicate: main already carries the same fix in 05392a8 ("fix(build): move the Go toolchain to 1.26.11 for GO-2026-6859"), merged while this was open. Verified: origin/main's go.mod now reads Not reopening; #250 will be rebased onto current main instead. |

main is currently red because of this, so this blocks every PR, including #250.
The failure
The
Deterministic claims guardstepgovulncheck (clean-security-scan claim)fails on main at282e2a7with:go.modpinnedtoolchain go1.26.10. Nothing in the tree caused it — the advisory landed under our pinned version, and the guard exists precisely to catch that.The fix
One line. The Docker builder already uses
golang:1.27.3, so only the module toolchain was behind; no image change is needed.go 1.26.0is untouched — this raises the toolchain, not the language floor.Verification
Local
govulncheckcannot reproduce the "before" state: this machine'sgois 1.27.3, which is newer than both pinned versions, so the scanner reports clean either way. I checked that rather than assuming it — running the samegovulncheck ./...against the unfixed branch here also says "affected by 0 vulnerabilities".So CI is the oracle for this one, and it is a good one: main's own run failed on
net/http@go1.26.10, which confirms the toolchain directive is what the scanner reads. The check on this PR is the real before/after.go build ./...passes. If the guard still reports 1.26.10 with only the toolchain bumped, thensetup-gois resolving from thegoline instead and that needs raising too — I'll watch the run and adjust rather than claim it fixed.🤖 Generated with Claude Code