From 378f3ef4963484a7525ccef9ea0c0d39f70b0646 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Sat, 5 Dec 2026 05:47:39 +0000 Subject: [PATCH 1/2] Release: build provenance for each CLI archive (attest-build-provenance), verifiable with gh attestation verify (sc-9611) --- .github/workflows/release.yml | 10 ++++++++++ AGENTS.md | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0fd169a7..7c04330d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -67,6 +67,11 @@ jobs: - { target: x86_64-apple-darwin, os: macos-latest } # cross-compiled on Apple Silicon (macos-13 runners are retired) runs-on: ${{ matrix.os }} timeout-minutes: 40 + # id-token and attestations for the build provenance below, and nothing else. + permissions: + contents: read + id-token: write + attestations: write steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 with: @@ -93,6 +98,11 @@ jobs: mkdir "$dir" && cp "target/$TARGET/release/visualci" "$dir/" && cp LICENSE* "$dir/" 2>/dev/null || true tar czf "$dir.tar.gz" "$dir" shasum -a 256 "$dir.tar.gz" > "$dir.tar.gz.sha256" + # A signed record (Sigstore, kept by GitHub) that this archive was built by this workflow from this commit: + # `gh attestation verify visualci-.tar.gz -R DocSpring/visualci` checks a download against it. + - uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2 + with: + subject-path: visualci-*.tar.gz - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: ${{ matrix.target }} diff --git a/AGENTS.md b/AGENTS.md index 572c2d92..c91bd47b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -29,7 +29,11 @@ design is in `docs/design.md`; read it before changing the architecture, and upd reach for a suppression. - **Links are checked** by lychee (`lychee.toml`): CI's `clients` job checks every page, file and `#anchor` the built site links to, offline, so a broken internal link fails the build that makes it. The Audit workflow checks every link - on the live site, outside ones included, each night. Exclude a link in `lychee.toml` only with the reason beside it. Allow a word or turn a lint rule off for a file only in those + on the live site, outside ones included, each night. Exclude a link in `lychee.toml` only with the reason beside it. +- **CLI releases carry build provenance**: release.yml's build job attests each archive + (`actions/attest-build-provenance`), so `gh attestation verify visualci-.tar.gz -R DocSpring/visualci` + proves a download came from this repo's workflow at a given commit. Keep the attestation step when changing how the + archives are built or named. Allow a word or turn a lint rule off for a file only in those files, with the reason beside it. Pin every action by commit SHA with its version in a comment (`pinact run` does it). Ignore a zizmor finding only inline (`# zizmor: ignore[audit]`) with the reason beside it; allow a made-up value in `.betterleaks.toml` only with a description of what it is. A real secret that reached a commit is revoked, From 1dea07982f2320105da0030d4ed77b6726d47a23 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Sat, 5 Dec 2026 06:04:21 +0000 Subject: [PATCH 2/2] Provenance: AGENTS.md says which commit the attestation names (review) --- AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index c91bd47b..301eda0d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -32,7 +32,8 @@ design is in `docs/design.md`; read it before changing the architecture, and upd on the live site, outside ones included, each night. Exclude a link in `lychee.toml` only with the reason beside it. - **CLI releases carry build provenance**: release.yml's build job attests each archive (`actions/attest-build-provenance`), so `gh attestation verify visualci-.tar.gz -R DocSpring/visualci` - proves a download came from this repo's workflow at a given commit. Keep the attestation step when changing how the + proves a download was built by this repo's release workflow. The commit it names is main's tip when the release + started, which can be later than the commit built if someone pushed meanwhile. Keep the attestation step when changing how the archives are built or named. Allow a word or turn a lint rule off for a file only in those files, with the reason beside it. Pin every action by commit SHA with its version in a comment (`pinact run` does it). Ignore a zizmor finding only inline (`# zizmor: ignore[audit]`) with the reason beside it; allow a made-up