From 759dfe723c60b8edb798e85a982a8da28d136977 Mon Sep 17 00:00:00 2001 From: Nikolai Emil Damm Date: Wed, 11 Nov 2026 05:24:35 +0100 Subject: [PATCH] fix(security): require Go 1.26.11 for GO-2026-6859 Co-Authored-By: Claude Opus 5.5 --- AGENTS.md | 2 +- go.mod | 2 +- scripts/go-floor.test.sh | 29 ++++++++++++++++------------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index b4964bf..1e04986 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -30,7 +30,7 @@ version pin here. - `scripts/rename-placeholders.sh` — one-shot onboarding: repoints the module path (`go.mod`, Go imports, README badges) to a new project's path, leaving the upstream **Use this template** links intact. - `scripts/rename-placeholders.test.sh` — end-to-end test for the onboarding script: runs it against a throwaway copy, then asserts the module repoint, the badge rewrite, the upstream-link preservation, no stray temp files, and that the renamed scaffold builds/tests. Run with `sh scripts/rename-placeholders.test.sh`; CI runs it via `validate-scaffold.yaml`. - `scripts/validate-agent-shims.test.sh` — hermetic structural check that both tool-specific shims contain exactly `@AGENTS.md` plus one newline. Run with `sh scripts/validate-agent-shims.test.sh`; CI runs it via `validate-scaffold.yaml`. -- `scripts/go-floor.test.sh` — hermetic ratchet that `go.mod`'s `go` directive stays at or above `1.26.10` (the lowest supported 1.26 patch that clears GO-2026-6809), also rejecting affected `1.27.0`–`1.27.2` directives. Run with `sh scripts/go-floor.test.sh`; CI runs it via `validate-scaffold.yaml`. Its `--self-test` mode checks the real ratchet's acceptance and rejection boundaries and existing template-only sync exclusion in a disposable repository, without adding scaffolding files to existing generated projects. +- `scripts/go-floor.test.sh` — hermetic ratchet that `go.mod`'s `go` directive stays at or above `1.26.11` (the lowest supported 1.26 patch that clears GO-2026-6809 and GO-2026-6859), also rejecting affected `1.27.0`–`1.27.3` directives. Run with `sh scripts/go-floor.test.sh`; CI runs it via `validate-scaffold.yaml`. Its `--self-test` mode checks the real ratchet's acceptance and rejection boundaries and existing template-only sync exclusion in a disposable repository, without adding scaffolding files to existing generated projects. ## Validation diff --git a/go.mod b/go.mod index ced07be..48f5c72 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/devantler-tech/go-template -go 1.26.10 +go 1.26.11 require github.com/open-feature/go-sdk v1.20.0 diff --git a/scripts/go-floor.test.sh b/scripts/go-floor.test.sh index fe1048b..58a5981 100755 --- a/scripts/go-floor.test.sh +++ b/scripts/go-floor.test.sh @@ -1,7 +1,8 @@ #!/usr/bin/env sh # Hermetic ratchet: go.mod's language version must stay at or above the -# security floor that independently clears GO-2026-6809 (crypto/x509). -# Later safe releases pass; the advisory also excludes 1.27.0–1.27.2. No network. +# security floor that independently clears GO-2026-6809 (crypto/x509) and +# GO-2026-6859 (net/http). +# Later safe releases pass; the advisories also exclude 1.27.0–1.27.3. No network. set -eu root=$(git rev-parse --show-toplevel) @@ -32,17 +33,17 @@ if [ "${1:-}" = --self-test ]; then check 1.25.13 fail check 1.26.0 fail check 1.26.9 fail - check 1.26.10 pass + check 1.26.10 fail check 1.26.11 pass check 1.27.0 fail check 1.27.1 fail check 1.27.2 fail - check 1.27.3 pass + check 1.27.3 fail check 1.27.4 pass check 1.28.0 pass - check '1.26.10 // patched minimum' pass - check '1.26.10 extra' fail - check 1.26.10.99 fail + check '1.26.11 // patched minimum' pass + check '1.26.11 extra' fail + check 1.26.11.99 fail check '' fail check devel fail mkdir "$work/bin" @@ -67,11 +68,13 @@ GO fi } check_toolchain go1.26.9 fail - check_toolchain go1.26.10 pass + check_toolchain go1.26.10 fail + check_toolchain go1.26.11 pass check_toolchain go1.27.0 fail check_toolchain go1.27.1 fail check_toolchain go1.27.2 fail - check_toolchain go1.27.3 pass + check_toolchain go1.27.3 fail + check_toolchain go1.27.4 pass check_toolchain go1.28.0 pass check_toolchain devel fail check_toolchain '' fail @@ -79,7 +82,7 @@ GO printf 'FAIL: template-only regression harness must be excluded from sync\n' >&2 exit 1 } - printf 'PASS: 16 directive and 9 selected-toolchain controls, plus sync exclusion\n' + printf 'PASS: 16 directive and 11 selected-toolchain controls, plus sync exclusion\n' exit 0 fi mode=${1:-directive} @@ -91,7 +94,7 @@ esac mod="${root}/go.mod" floor_major=1 floor_minor=26 -floor_patch=10 +floor_patch=11 if [ ! -f "$mod" ]; then echo "FAIL: go.mod missing" >&2 @@ -163,8 +166,8 @@ case "${major}${minor}${patch}" in esac ok=0 -if [ "$major" -eq 1 ] && [ "$minor" -eq 27 ] && [ "$patch" -lt 3 ]; then - echo "FAIL: Go $version_source ${go_line} is affected by GO-2026-6809; select a patched supported toolchain" >&2 +if [ "$major" -eq 1 ] && [ "$minor" -eq 27 ] && [ "$patch" -lt 4 ]; then + echo "FAIL: Go $version_source ${go_line} is affected by GO-2026-6809 or GO-2026-6859; select a patched supported toolchain" >&2 exit 1 fi if [ "$major" -gt "$floor_major" ]; then