ci: add build provenance for npm, go binaries, and the ghcr image - #308
Conversation
- publish-npm.yml: --provenance on both publish steps (dev + release), signed via the existing OIDC id-token (public repo + npm>=11.5.1). - release.yml: attest the goreleaser binaries (subject-checksums on checksums.txt) + the multi-arch GHCR image manifest digest, storing the image attestation in GHCR (push-to-registry). The digest-resolve step guards with `set -euo pipefail` + a non-empty check. - publish-dev.yml: attest the rolling :dev image digest (dev binaries aren't distributed). Adds id-token + attestations write perms. - Docs: verification guidance (SECURITY.md supply-chain, README container section, deployment.md registry/releases, clients/ts/README) for the image + release archives + npm badge — not `go install` (builds from source). CHANGELOG [Unreleased] entry + corrected the stale "provenance deferred until public" note. Pinned actions/attest-build-provenance@v2.4.0. Attest/publish steps run only on push-to-main (dev) and v*/sdk-v* tags (release) — validated post-merge; goreleaser-validate covers config parse. Public repo makes Sigstore attestations free. Refs #149. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
Cache: Disabled due to Reviews > Disable Cache setting 📝 WalkthroughSummary by CodeRabbitRelease Notes
WalkthroughThis PR adds Sigstore build-provenance attestations across all release artifacts: dev container images, release binaries, and npm packages. Workflow permissions are expanded to enable attestation signing and publishing; new steps resolve image digests and call ChangesSupply Chain Provenance & Verification
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Suggested reviewers
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
📚 Docs preview is live → https://7c954382-wavehouse-docs.wave-rf.workers.dev
|
The supply-chain bullet said SHA-pinning is "enforced by the repository ruleset" — but it's the `sha_pinning_required` Actions permission setting, not a ruleset rule (neither the branch nor tag ruleset has an action-pinning rule). Corrected the wording. Flagged by the PR-A pre-push review as out-of-scope (it shipped in #308); folding the one-liner in here rather than opening a separate PR. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fix-up for the `/pm-triage` skill — two changes. ## 1. `board.sh` runs under bash 3.2 (the actual bug) `scripts/board.sh` used `declare -A PRIO/STATUS` (associative arrays), which require **bash ≥4**. The routine invokes plain `bash` = `/bin/bash` 3.2 on macOS, so every board write (`file` / `set-priority` / `set-status`) died with `P0: unbound variable` and was being worked around ad-hoc by re-running under `/opt/local/bin/bash`. Replaced the two maps with `case`-based `_prio_id` / `_status_id` lookup functions, so the script runs **natively under stock /bin/bash 3.2** — no re-exec, no MacPorts/Homebrew dependency, works for teammates too. As a bonus, `set-priority` / `set-status` now validate their value arg (fail-closed, precise message) *before* the network lookup; previously the value was unguarded (would crash under `set -u` on bash 4, or silently send an empty option-id). - All 9 option IDs preserved byte-for-byte. - Clean under `/bin/bash` 3.2 **and** bash 5.2; `shellcheck` clean. - Bad-key paths reject (exit 2) without touching `gh`. ## 2. `SKILL.md` — reconcile merged PRs in the status sweep Adds an explicit step to the status-sweep mode: reconcile **merged** PRs against still-open tracking issues, matching by content (not `Closes #`), and tick completed checklist boxes (leaving partial-progress boxes alone). Codifies the lesson from the #308→#268 miss. ## Test plan - `bash -n` + `shellcheck` clean on both bash versions. - Unit-tested the `case` lookups + bad-key rejection under `/bin/bash` 3.2. - `make ci` green. Resolves the "Tooling (blocks board writes under the routine)" item in the pm-triage `pending.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
Now that the repo is public, ship signed Sigstore build-provenance attestations for every released artifact:
npm publish --provenanceon both thedevand tagged SDK channels (via the existing OIDCid-token, no new secret).actions/attest-build-provenanceover goreleaser'sdist/checksums.txt(covers the release archives).release.yml) and the rolling:devimage (publish-dev.yml), stored in-registry (push-to-registry: true).Plus verification docs so consumers can use it —
gh attestation verifyfor the image + release archives, the npm provenance badge /npm audit signaturesfor the SDK — covering the distributed binaries/image, notgo install(which builds from source).Changes
publish-npm.yml,release.yml,publish-dev.yml— the attestation wiring. Action SHA-pinned (@v2.4.0);id-token/attestationsperms scoped to the publish jobs; digest-resolve hardened withset -euo pipefail+ a non-empty guard.SECURITY.md,README.md,docs/src/content/docs/deployment.md,clients/ts/README.md— verification guidance.CHANGELOG.md—[Unreleased]entry + corrected the stale "provenance deferred until public" note.Testing / validation
actionlintclean;make cigreen; both pre-push reviewers (pre-push-reviewer,docs-reviewer) → ship_it.main(dev) andv*/sdk-v*tags (release), so they're validated post-merge —goreleaser-validatecovers the config parse on PRs. The image digest is resolved viadocker buildx imagetools inspect(buildx is already set up in both workflows).Refs #149.
🤖 Generated with Claude Code