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..301eda0d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -29,7 +29,12 @@ 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 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 value in `.betterleaks.toml` only with a description of what it is. A real secret that reached a commit is revoked,