ci/go-floor-and-vuln-gate #194

Merged
clawdie merged 2 commits from ci/go-floor-and-vuln-gate into main 2026-10-18 19:18:59 +02:00
Owner
No description provided.
PR #193 moved the module to go 1.26.0 / toolchain go1.26.9 to clear nine
net/http vulnerabilities, but the CI comment still described a 1.23 floor,
the host-mode runner ships Go 1.24, and nothing re-checked the vulnerability
set.

- check-go.sh reads the language floor from go.mod instead of hardcoding it,
  so the gate cannot drift from the module again.
- check-go.sh gains CHECK_GO_REQUIRE_GOVULNCHECK, mirroring staticcheck: run
  govulncheck when installed, fail when required, skip with a clear message
  otherwise.
- The CI go job sets GOTOOLCHAIN=auto explicitly, asserts the active toolchain
  matches the go.mod toolchain line, installs pinned govulncheck v1.9.0, and
  runs the gate with CHECK_GO_REQUIRE_GOVULNCHECK=1.

CI now needs proxy.golang.org for the toolchain and govulncheck plus
vuln.go.dev for the database; the runner already fetches npm packages.

Verified: sh -n, YAML parse (Prettier), a simulated Go 1.25 run fails with
"Go 1.26 or newer required by go.mod", and the full gate passes with both
CHECK_GO_REQUIRE_STATICCHECK=1 and CHECK_GO_REQUIRE_GOVULNCHECK=1.
fix(ci): pin the CI toolchain and fail closed on a missing go floor
All checks were successful
CI / markdown (pull_request) Successful in 11s
CI / packaging (pull_request) Successful in 1s
CI / python-tests (pull_request) Successful in 17s
CI / go (pull_request) Successful in 35s
leak-guard / guard (pull_request) Successful in 2s
92f48d8a1d
Review found two blockers in the gate:

- GOTOOLCHAIN=auto plus exact GOVERSION equality breaks once a runner ships a
  Go newer than go.mod's toolchain, because auto prefers the newer local
  toolchain. Pin GOTOOLCHAIN=go1.26.9 for reproducible CI and keep the exact
  equality assertion; the pin and the go.mod toolchain line move together.
- The floor parser defaulted to 1.26 when the go directive was missing or
  malformed, which failed open. Parse the toolchain directive (or go directive)
  before invoking go and exit with a clear error when it is missing or
  unparseable. Compare patch versions too, not just major.minor.

Also extend govulncheck to scan the non-host OS build: the workspace has both
FreeBSD- and Linux-specific files, and a host-only scan type-checks one build
configuration. The gate now runs the host scan plus the other supported OS
(linux/amd64 on FreeBSD, freebsd/amd64 on Linux).

Verified: sh -n, YAML parse, missing/malformed/old/patch floor probes all exit
1 with clear messages, the pinned-toolchain assertion passes, and the full gate
passes with both CHECK_GO_REQUIRE_* flags (dual-OS govulncheck, no findings).
clawdie deleted branch ci/go-floor-and-vuln-gate 2026-10-18 19:18:59 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
clawdie/colibri!194
No description provided.