Hash-verify the Go toolchain in the release workflow (closes #105) #132

Merged
clawbot merged 1 commits from issue-105-verify-go-toolchain-hash into next 2026-09-21 19:48:53 +02:00
Collaborator

What changed

.gitea/workflows/release.yml installed Go with actions/setup-go. That pins the action by commit sha but not the Go tarball it fetches at runtime, so the compiler that produces the published binaries was the one external input in the release path verified against no value in this repo — the gap #105 records, against REPO_POLICIES.md's "all external references pinned by hash, no exceptions".

New script/install-go, modelled on script/install-goreleaser, downloads the exact go.dev archive for go.mod's go directive and refuses it unless its sha256 matches a value committed in the script. The workflow calls it in place of setup-go; it puts .tool/go/bin on PATH for the goreleaser step.

What to trip over

  • The version is not duplicated: go.mod's go directive is the source, and install-go fails loudly when its committed GO_VERSION disagrees. Bumping Go is one reviewed change to go.mod, the checksum, and the Dockerfile golang digest.
  • GOTOOLCHAIN: local on the release step keeps the verified toolchain from auto-switching to one named by a future toolchain directive. This also settles the review's note that the old step comment conflated go and toolchain.
  • Linux only, matching the release runner; an unsupported OS or arch fails loudly rather than falling back.

Disclosure (judgement call): kept scope to the release path — install-go is not wired into script/bootstrap, since local dev and snapshot builds use the developer's own Go.

Model: opus-4-8

## What changed `.gitea/workflows/release.yml` installed Go with `actions/setup-go`. That pins the action by commit sha but not the Go tarball it fetches at runtime, so the compiler that produces the published binaries was the one external input in the release path verified against no value in this repo — the gap https://git.eeqj.de/sneak/vaultik/issues/105 records, against `REPO_POLICIES.md`'s "all external references pinned by hash, no exceptions". New `script/install-go`, modelled on `script/install-goreleaser`, downloads the exact `go.dev` archive for `go.mod`'s `go` directive and refuses it unless its sha256 matches a value committed in the script. The workflow calls it in place of `setup-go`; it puts `.tool/go/bin` on `PATH` for the goreleaser step. ## What to trip over - The version is not duplicated: `go.mod`'s `go` directive is the source, and `install-go` fails loudly when its committed `GO_VERSION` disagrees. Bumping Go is one reviewed change to `go.mod`, the checksum, and the `Dockerfile` `golang` digest. - `GOTOOLCHAIN: local` on the release step keeps the verified toolchain from auto-switching to one named by a future `toolchain` directive. This also settles the review's note that the old step comment conflated `go` and `toolchain`. - Linux only, matching the release runner; an unsupported OS or arch fails loudly rather than falling back. Disclosure (judgement call): kept scope to the release path — `install-go` is not wired into `script/bootstrap`, since local dev and snapshot builds use the developer's own Go. Model: opus-4-8
clawbot added this to the 1.0.0 milestone 2026-09-21 09:46:11 +02:00
clawbot added the needs-review label 2026-09-21 09:46:11 +02:00
clawbot self-assigned this 2026-09-21 09:46:12 +02:00
Author
Collaborator

FAIL

  • TODO.md, "Completed Steps" section: the branch does not merge cleanly onto the current base. next is at d2a0510 (Trigger CI on next, not only main (closes #122)), which added a new entry at the top of "Completed Steps"; this PR adds its own entry at the same spot, so the two collide and Gitea reports the PR unmergeable. A reviewed PR that cannot be squash-merged is not landable.
    Acceptable: rebase the branch onto current origin/next, keep both changelog entries (drop the conflict markers), and push. Nothing else in the change needs to move.

Model: opus-4-8

FAIL - `TODO.md`, "Completed Steps" section: the branch does not merge cleanly onto the current base. `next` is at d2a0510 (`Trigger CI on next, not only main (closes #122)`), which added a new entry at the top of "Completed Steps"; this PR adds its own entry at the same spot, so the two collide and Gitea reports the PR unmergeable. A reviewed PR that cannot be squash-merged is not landable. Acceptable: rebase the branch onto current `origin/next`, keep both changelog entries (drop the conflict markers), and push. Nothing else in the change needs to move. Model: opus-4-8
clawbot added needs-rework and removed needs-review labels 2026-09-21 15:03:27 +02:00
clawbot force-pushed issue-105-verify-go-toolchain-hash from d809990832 to f3dc6e78a7 2026-09-21 19:01:28 +02:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-09-21 19:01:39 +02:00
Author
Collaborator

Rebased onto current next and resolved the only conflict, in TODO.md Completed Steps, by keeping both entries (issue #122 and this issue). No other change. make fmt was clean and the authoritative make check passed.

model: claude-opus-4-8

Rebased onto current `next` and resolved the only conflict, in `TODO.md` **Completed Steps**, by keeping both entries (issue #122 and this issue). No other change. `make fmt` was clean and the authoritative `make check` passed. model: claude-opus-4-8
Author
Collaborator

FAIL

  • script/install-go, the comment above the SHA256_LINUX_AMD64 / SHA256_LINUX_ARM64 constants: the hash pin names the version ("Go 1.26.1") but carries no date. REPO_POLICIES.md requires the comment above a hash-pinned reference to give the version and the date (YYYY-MM-DD); the sibling this script is modelled on, script/install-goreleaser, complies (goreleaser v2.17.1, 2026-08-05), and this one does not. The dated comment is how a reader knows when the checksum was captured and verified, and the two install scripts should read the same. Acceptable: add the ISO date the checksums were taken from go.dev to that comment, in install-goreleaser's format.

Model: opus-4-8

FAIL - `script/install-go`, the comment above the `SHA256_LINUX_AMD64` / `SHA256_LINUX_ARM64` constants: the hash pin names the version ("Go 1.26.1") but carries no date. `REPO_POLICIES.md` requires the comment above a hash-pinned reference to give the version **and** the date (`YYYY-MM-DD`); the sibling this script is modelled on, `script/install-goreleaser`, complies (`goreleaser v2.17.1, 2026-08-05`), and this one does not. The dated comment is how a reader knows when the checksum was captured and verified, and the two install scripts should read the same. Acceptable: add the ISO date the checksums were taken from `go.dev` to that comment, in `install-goreleaser`'s format. Model: opus-4-8
clawbot added needs-rework and removed needs-review labels 2026-09-21 19:14:37 +02:00
clawbot added 1 commit 2026-09-21 19:28:30 +02:00
The release workflow installed Go via actions/setup-go, which pins the
action but not the toolchain tarball it downloads at runtime -- the
compiler that produces the published binaries was the last external
input in the release path verified against nothing in the repo, against
REPO_POLICIES.md's hash-pin rule.

New script/install-go, modelled on script/install-goreleaser, downloads
the exact go.dev archive for go.mod's `go` directive and refuses it
unless its sha256 matches a value committed in the script. release.yml
calls it instead of setup-go and sets GOTOOLCHAIN=local so that exact
compiler builds the release. The version is not duplicated: go.mod owns
it and install-go fails when its committed GO_VERSION disagrees, so
bumping Go edits go.mod, the checksum, and the Dockerfile golang digest
together.

Model: opus-4-8
clawbot force-pushed issue-105-verify-go-toolchain-hash from f3dc6e78a7 to 1e7b0c3b5a 2026-09-21 19:28:30 +02:00 Compare
clawbot added needs-review and removed needs-rework labels 2026-09-21 19:28:42 +02:00
Author
Collaborator

Added the verification date to the script/install-go checksum comment (Go 1.26.1, 2026-09-21), matching script/install-goreleaser's format. Re-fetched Go 1.26.1's published sha256 values from go.dev today and confirmed both equal the pinned values. This is the only hash-pinned reference the PR adds that carries checksums (the change drops the dated actions/setup-go pin), so nothing else needed a date. Nothing else changed. Rebased onto current origin/next, make fmt clean, authoritative make check passed.

PR: #132 (closes #105)

Model: opus-4-8

Added the verification date to the `script/install-go` checksum comment (`Go 1.26.1, 2026-09-21`), matching `script/install-goreleaser`'s format. Re-fetched Go 1.26.1's published sha256 values from go.dev today and confirmed both equal the pinned values. This is the only hash-pinned reference the PR adds that carries checksums (the change drops the dated `actions/setup-go` pin), so nothing else needed a date. Nothing else changed. Rebased onto current `origin/next`, `make fmt` clean, authoritative `make check` passed. PR: https://git.eeqj.de/sneak/vaultik/pulls/132 (closes https://git.eeqj.de/sneak/vaultik/issues/105) Model: opus-4-8
Author
Collaborator

PASS

model: claude-opus-4-8

PASS model: claude-opus-4-8
clawbot merged commit 75a10d3a22 into next 2026-09-21 19:48:53 +02:00
clawbot deleted branch issue-105-verify-go-toolchain-hash 2026-09-21 19:48:53 +02:00
Sign in to join this conversation.