feat(ci): sigstore build provenance on every publish#26
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds GitHub/Sigstore build provenance attestations to the project’s release/publish workflows (CLI, MCP, and Python SDK) and documents how attestations work and how to verify them, aiming to improve OpenSSF Scorecard Signed-Releases.
Changes:
- Add
actions/attest-build-provenance@v3.2.0(SHA pinned) to the CLI, MCP, and Python SDK publish workflows. - Grant
attestations: writepermission alongside existing OIDCid-token: writein publish workflows. - Document the attestation mechanism, required permissions, verification commands, and failure modes in the release process docs.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
docs/ops/release-process.md |
Adds a “Build attestations (Sigstore)” section describing what’s attested and how to verify attestations. |
.github/workflows/publish-cli.yml |
Packs the CLI, creates a provenance attestation for the .tgz, then publishes to npm. |
.github/workflows/publish-mcp.yml |
Packs the MCP, creates a provenance attestation for the .tgz, then publishes to npm. |
.github/workflows/publish-pysdk.yml |
Attests python-sdk/dist/* after build and before uploading/attaching/publishing the Python artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - name: Pack artifact | ||
| run: npm pack | ||
|
|
||
| # pin: v3.2.0 -- actions/attest-build-provenance | ||
| - name: Attest build provenance | ||
| uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f | ||
| with: | ||
| subject-path: 'cli/*.tgz' |
| - name: Pack artifact | ||
| run: npm pack | ||
| # pin: v3.2.0 -- actions/attest-build-provenance | ||
| - name: Attest build provenance | ||
| uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f | ||
| with: | ||
| subject-path: 'mcp/*.tgz' |
| attestation** for the artifact it ships, using | ||
| [`actions/attest-build-provenance@v3`](https://github.com/actions/attest-build-provenance) | ||
| (SHA-pinned). The attestation is a signed statement, recorded in the | ||
| GitHub attestations API and Sigstore's public transparency log, that | ||
| says: "this exact byte-for-byte artifact was built by this exact | ||
| workflow run on this commit". It's how the OpenSSF Scorecard | ||
| `Signed-Releases` check verifies our releases. | ||
|
|
||
| | Workflow | Subject attested | When | | ||
| |---|---|---| | ||
| | `publish-cli.yml` | `cli/*.tgz` (output of `npm pack`) | after pack, before `npm publish` | | ||
| | `publish-mcp.yml` | `mcp/*.tgz` (output of `npm pack`) | after pack, before `npm publish` | | ||
| | `publish-pysdk.yml` | `python-sdk/dist/*` (sdist + wheel) | after `python -m build`, before PyPI upload | | ||
|
|
||
| For the npm packages the attestation is **complementary** to npm's own | ||
| `--provenance` flag — that one is recorded inside the npm registry, the | ||
| Sigstore attestation is recorded on GitHub. Both verify, neither | ||
| replaces the other. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
Knowledge base: Disabled due to 📝 WalkthroughWalkthroughThree package release workflows (CLI, MCP, Python SDK) are enhanced to generate Sigstore build provenance attestations. Workflow permissions add ChangesBuild Provenance Attestations
🎯 2 (Simple) | ⏱️ ~12 minutes
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Summary
Adds
actions/attest-build-provenance@v3.2.0(SHA-pinned) to all three publish workflows so every CLI tarball, MCP tarball, sdist, and wheel ships with a verifiable Sigstore build provenance attestation.npm packproducescli/*.tgz-> attest ->npm publish --access public --provenance(npm's own provenance flag stays as a complementary signal).mcp/*.tgz.python-sdk/dist/*(sdist + wheel) immediately afterpython -m build, beforepypa/gh-action-pypi-publish.Each job now carries
id-token: write(already present) plusattestations: write(new). The action SHA96278af6caaf10aea03fd8d33a09a777ca52d62fisactions/attest-build-provenance@v3.2.0(latest v3 release at time of writing).Goal: OpenSSF Scorecard
Signed-Releases0/10 -> 8+/10.Docs updated in
docs/ops/release-process.mdwith a "Build attestations" section explaining what gets attested, required permissions, and how togh attestation verifya downloaded artifact.Test plan
cli-v*/mcp-v*tag push: confirm a green "Attest build provenance" step in the workflow run, and a new entry underActions -> Attestationsfor the repo.pysdk-v*GitHub Release: confirm wheel + sdist both attested.npm pack @looptech-ai/understand-quickly-cli && gh attestation verify ./*.tgz --owner looptech-aireturns OK.Notes
Summary by CodeRabbit
Release Notes
New Features
Documentation