Repository navigation
ci(release): release workflow with gates on the artifacts — ADR-0053/0054/0055 (M4, M5) - #253
Conversation
…ts (ADR-0053, ADR-0054, ADR-0055) A v* or rehearsal-* tag builds the three release targets, gates the exact bytes, attests them and the SBOM, and creates a draft release. Each job holds only its own permissions, no cache action runs, and every checkout drops its credentials. - precheck (contents: read): the tagged commit must be an ancestor of main. A v* tag must also be annotated and pass the pinned signature check against keys/security.asc and keys/release-keys.txt read from origin/main. - build (contents: read): one job per target on its own architecture (ubuntu-24.04, ubuntu-24.04-arm, macos-26), `cargo build --release --locked -p quantumssh --target <t>`. Then the static-link check, the tarball, and a record of ImageOS, ImageVersion and `rustc -vV`. - sbom (contents: read): cargo-cyclonedx 0.5.9 on its own runner, with `--target all` so one SBOM covers every target. - gates (contents: read): interop.yml is now callable with a release tarball (both Linux targets); macOS interop against an OpenSSH 10.6p1 client built from the tarball pinned by SHA-256, with a check that no tool falls back to the system client; the systemd reference unit on the x86_64 tarball's own binary and unit. Each records the digest of what it ran. - attest (id-token, attestations): fails unless the four gate records match the three built tarballs exactly, then attests the tarballs and the SBOM. It runs no project code. - publish (contents: write): SHA256SUMS and a draft release holding exactly those five assets, with the build environments in the notes. New scripts: scripts/release/check-binary.sh (no NEEDED, no PT_INTERP, --version inside a pinned Alpine; otool on macOS; the tag's version), package.sh (RFC-0017 §3 contents) and pinned-signature-check.sh (ADR-0054 §7 for the current key). keys/release-keys.txt is the pin set. tests/systemd/run_in_docker.sh now drives the reference unit for both CI and the release workflow. The interop gate gains openssh_aes_gcm (ADR-0055 §5), mandatory wherever the client offers [email protected]. The ADRs stay Proposed until a rehearsal tag runs the workflow end to end. Refs #248 Signed-off-by: Gonzalo Fleming <[email protected]>
|
@codex review |
|
/oc |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
PR Review: ci(release): release workflow with gates on the artifacts — ADR-0053/0054/0055 (M4, M5) (#253)Decision: 🟢 Approved Executive summaryThis PR adds the complete tag-triggered release workflow (M4/M5) implementing ADR-0053, ADR-0054, and ADR-0055. The design is sound: every job holds minimal permissions, all actions are pinned by SHA, there is no cache on the release path, and attestation is blocked until all four gate records match the three built tarballs. No CLAUDE.md violations, no logic errors, and no supply-chain risks were found in the diff. No issues found. Checked for bugs and CLAUDE.md compliance. |
* docs(adr): ADR-0053 and ADR-0055 are Accepted Both were implemented in #253. The rehearsal run 41751733656 on rehearsal-0.2.0-1 then passed end to end: three static builds, the SBOM, the four gates on the artifacts, the attestations and the draft. The draft held exactly five assets, the attestations verified under the rehearsal ref and failed under refs/tags/v0.2.0, SHA256SUMS matched a recomputation byte for byte, and the four gate records matched it. The draft and the tag were deleted afterwards (ADR-0053 §4). Refs #248 Signed-off-by: Gonzalo Fleming <[email protected]> * docs(adr): ADR-0057 is Accepted Its Date line said "accepted on merge", and it merged in #250, but the Status line still read Proposed. ADR-0006 already records the part of its wording that ADR-0057 supersedes. Refs #248 Signed-off-by: Gonzalo Fleming <[email protected]> --------- Signed-off-by: Gonzalo Fleming <[email protected]>
Summary
This adds
.github/workflows/release.ymland the gates it runs: milestones M4 and M5 ofdocs/plans/alpha-distribution.md. They land together because ADR-0053 attests nothing until every ADR-0055 gate has passed on the exact bytes, so the workflow is not complete without its gates.A
v*orrehearsal-*tag runs:precheckcontents: readorigin/main. Av*tag must also be annotated and pass the pinned signature check againstkeys/security.ascandkeys/release-keys.txtread fromorigin/main, never from the tag's tree.build×3contents: readcargo build --release --locked -p quantumssh --target <t>onubuntu-24.04,ubuntu-24.04-armandmacos-26, so nothing is cross-compiled. Then come the static-link check, the tarball, and abuild-env-<t>.txtwithImageOS,ImageVersionandrustc -vV.sbomcontents: readcargo-cyclonedx0.5.9 on its own runner, which never holds a tarball.contents: readinterop.ymlon both Linux tarballs; macOS interop against OpenSSH 10.6p1 built from the tarball pinned by SHA-256; the systemd reference unit on thex86_64tarball's own binary and unit. Each records the digest of the tarball it ran.attestcontents: read,id-token: write,attestations: writepublishcontents: writeSHA256SUMSand creates a draft release with exactly those five assets. The notes carry the build environments.No cache action runs, here or in the workflows it calls, and every checkout drops its credentials.
Pieces
scripts/release/check-binary.sh(ADR-0053 §3).NEEDED, noPT_INTERP, and--versionruns inside a pinned Alpine with the binary mounted read-only and no network.otool -Llists only/usr/lib.v*tag, the version must equal the tag's.scripts/release/package.sh(RFC-0017 §3). The binary,LICENSE,README.md,CHANGELOG.md, the systemd unit, andconfig.toml, copied from the TOML block ofdocs/deployment.md§4.scripts/release/pinned-signature-check.sh(ADR-0054 §7). Reads GnuPG status lines. It passes only on aVALIDSIGby the pin set'scurrentkey, with noREVKEYSIG,KEYREVOKED,BADSIG,EXPKEYSIGorEXPSIG. A retired key is refused here, because accepting one needs the published release's window and digest checks; that belongs toverify-download.sh(M7).keys/release-keys.txt. The pin set, with one current key.interop.yml(ADR-0055 §1).workflow_callwithartifactandrunnerinputs. On that path it skips the toolchain, the cache and the build, extracts the tarball and records its digest before running it.workflow_call,github.workflowis the caller's, so the two Linux legs would otherwise cancel each other.persist-credentials: false.openssh_aes_gcm(ADR-0055 §5). It is mandatory wherever the client offers[email protected], and skipped, with a message, otherwise.tests/systemd/run_in_docker.sh. It replaces the inline Docker steps inci.yml, and the release workflow uses it with an extracted tarball.Decisions this PR makes within the ADRs
--target all, so it lists a superset of what any single binary holds, never a subset.cargo-cyclonedxwrites one file per workspace member, and only thequantumsshone is published.gh attestation verify <file>passes for each of them.macos-26. It is the newest versioned arm64 label on 2026-11-03.What stays for later
main. That run will confirm the macOS OpenSSH build on the runner, which auto mode did not let me run here. ADR-0054 also needsscripts/verify-release.sh,verify-download.shand the docs (M7, M8).v*tag ruleset is a repository setting, created after this merges, with the maintainer's OK.Refs #248
Test plan
actionlinton every workflow;shellcheckon every scriptgit verify-tag --raw v0.1.0passes;KEYREVOKED, expired,BADSIG, another key, mixed signers andNO_PUBKEYfail;gpg --verifyexits 0 and the check refuses withREVKEYSIG.rust:1.99.1, arm64):aarch64-unknown-linux-muslbuild isEXECwith no dynamic section and noINTERP, and runs in the pinned Alpine;NEEDEDentries.package.sh: the tarball lists exactly the RFC-0017 §3 files, andconfig.tomlis the §4 example.run_in_docker.shon the extractedaarch64musl tarball:SYSTEMD PASS.shasumlines are mixed withsha256sumlines. It fails on a tampered tarball, a tarball no gate ran, a missing record, an extra tarball and a two-line record.ok: openssh_aes_gcmandINTEROP PASS.openssh-interopin forky, which now runsopenssh_aes_gcmrehearsal-*tag onmain, withgh attestation verifyand the four pins on every asset