Repository navigation
Verify the sind binary, add a wait input, document the release-tied node image - #9
Merged
Merged
Conversation
- Download the binary into a temporary directory and install it into `~/.local/bin` only once it passes verification, so an unverified binary is never run. - For sind v0.10.0 and later, compare the binary's sha256 with the release's `checksums.txt` and verify its build provenance attestation with `gh attestation verify`: signer workflow `release.yml`, source ref of the release tag, GitHub-hosted runners only. - Add the inputs `verify` (default `true`) to skip the attestation check on runners without `gh`, and `token` (default `github.token`) for `gh`. The checksum is checked either way. - sind v0.8.0 and v0.9.0 publish neither, so they install unverified with a notice. - On `latest`, e2e runs `install.sh` again with one byte of the binary changed and expects the checksum and the attestation check to reject it. - README lists `gh` as a requirement and documents the new inputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vjm6Tjihdc6veGRDr47bTw
- New input `wait` (default empty, meaning sind's default): how long `sind create cluster` waits for the nodes and Slurm, e.g. `10m`, or `0` for no limit. sind validates the value. - `create.sh` passes `--wait` on sind releases after v0.10.0, decided from `sind version --json`, and ignores the input with a warning on older ones. - README documents the input, including that the step fails after sind has removed the partly created cluster when the limit expires. - e2e sets `wait: 10m`, covering the warning on older sind and the flag on newer releases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vjm6Tjihdc6veGRDr47bTw
- sind releases after v0.10.0 default to the node image published for that release (`sind-node:vX.Y.Z`), so pinning `version` also pins Slurm, and `version: latest` follows the newest release and its image; v0.10.0 and older default to `latest`. - Name the moving `<YY>.<MM>` and fixed `vX.Y.Z-<YY>.<MM>` tags, note that `pull: true` fetches the current image behind a moving tag, and show the reproducible form next to the matrix example. - Docker must be rootful (not rootless or userns-remap) on unified cgroup v2, which `sind doctor` checks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vjm6Tjihdc6veGRDr47bTw
- Verify the signing certificate's identity with `--cert-identity` (`release.yml@refs/tags/<version>`) instead of `--signer-workflow`. gh before 2.102.0, which GitHub's runners ship today, matches `--signer-workflow` as a prefix and `--source-ref` case-insensitively (GHSA-wjmr-j3rp-mh2g, GHSA-4mq3-hpgx-9cx8); the exact identity pins the workflow and the tag. - Require gh 2.93.0 or later for the attestation check, which fixes a token leak to TUF mirrors (GHSA-8xvp-7hj6-mcj9), and name `verify: false` in the error. - Set `GH_HOST: github.com` for the install step, so a runner configured for GitHub Enterprise Server still reads the attestations from github.com. - README: the minimum gh version, the hosts gh contacts, and the github.com token needed on GitHub Enterprise Server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vjm6Tjihdc6veGRDr47bTw
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates the action for sind's release attestations, the
--waitflag ofsind create clusterand the release-tied default node image. There is one commit per change, plus a hardening fix to the attestation check. sind's newest release is still v0.10.0, so "after v0.10.0" below means the next release (planned as v0.11.0).Behaviour changes
feat: verify the sind binary before installing it, hardened byfix: pin the attestation signer exactly and require gh 2.93.0).install.shnow downloads into a temp dir and installs into~/.local/binonly after the binary passes verification, so no unverified binary is ever run.checksums.txt. This check always runs.verify: true(the new default),gh attestation verifymust pass, with--repo GSI-HPC/sind --cert-identity https://github.com/GSI-HPC/sind/.github/workflows/release.yml@refs/tags/<version> --source-ref refs/tags/<version> --deny-self-hosted-runners.--cert-identityreplaces--signer-workflow. gh before 2.102.0, which the runners ship today (2.101.0), matches--signer-workflowonly as a prefix and compares--source-refcase-insensitively (GHSA-wjmr-j3rp-mh2g, GHSA-4mq3-hpgx-9cx8). The exact identity pins the workflow and the tag together. It assumes sind'srelease.ymlkeeps running on the tag push; if it becomes a reusable workflow, verification fails closed.GH_HOST: github.com.::notice::.MIN_VERSIONstays v0.8.0.::error::that namesverify: false, unless they set it. GitHub-hosted runners have gh, but self-hosted runners may not. Maintainer decision: is this a minor or a major release?verify(default'true'): turns the attestation check off. The checksum is still checked.token(default${{ github.token }}): passed asGH_TOKENto the install step only.wait(default'', meaning sind's default): passed assind create cluster --waiton sind releases after v0.10.0, decided fromsind version --json. Older sind gets a::warning::and the input is ignored. sind validates the value. When the limit expires, sind removes the partly created cluster and the step fails with the existing::error::.ghrequirement (2.93.0 or later), the hosts gh contacts, and the github.com token needed on GitHub Enterprise Server.action.yml.sind-node:vX.Y.Z, so pinningversionalso pins Slurm.<YY>.<MM>and fixedvX.Y.Z-<YY>.<MM>tags, and thatpull: truefetches the current image behind a moving tag.<YY>.<MM>and says that it moves. The reproducible form is shown with avX.Y.Zplaceholder and can become the main example once the next release is out.Test plan
shellcheck scripts/*.shandactionlintare clean.install.shrun locally against stubcurlandgh:verifyon and off), a failed attestation, missinggh, gh 2.92.0, gh 2.45.0, an unparsablegh --version, a missingchecksums.txt, achecksums.txtwithout the asset, and an invalidverifyvalue.0.8.0(unverified), missing or oldghwithverify: false, and a newer release resolved vialatest.create.shrun locally against a stubsindat 0.8.0, 0.9.0, 0.10.0, 0.10.1-next and 0.11.0, with and withoutwait. It warns up to 0.10.0 and passes--wait 10mafter it. An invalid value surfaces as the existing::error::.install.sh.wait: 10m. Every entry shows the warning path for now: sind v0.8.0, and v0.10.0 aslatest.latest(x64 and ARM64, gh 2.101.0), the real attestation check passes with the exact--cert-identityandgithub.tokenunderpermissions: contents: read. The step "Check that a modified binary is rejected" passes: with one byte of the binary changed, the checksum check rejects it withverify: false, and withchecksums.txtrewritten to match, the realgh attestation verifyrejects it.latestpasses the real--wait 10m.🤖 Generated with Claude Code
https://claude.ai/code/session_01Vjm6Tjihdc6veGRDr47bTw