Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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

Expand Down
29 changes: 16 additions & 13 deletions scripts/go-floor.test.sh
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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"
Expand All @@ -67,19 +68,21 @@ 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
grep -Fx 'scripts/go-floor.test.sh' "$root/.templatesyncignore" >/dev/null || {
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}
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading