Repository navigation
release: attest build provenance for the standalone archives - #234
distronode-com wants to merge 1 commit into
Conversation
The release job now runs actions/attest on dist/release/*.tar.gz before
it creates the GitHub Release. That produces SLSA build provenance,
signed through Sigstore with the workflow's identity and stored with the
repository, so anyone can check that an archive came from this workflow
and its release tag with
gh attestation verify calnode_<version>_linux_amd64.tar.gz --repo Calnode/calnode \
--signer-workflow Calnode/calnode/.github/workflows/docker-publish.yml \
--source-ref refs/tags/v<version>
The Sigstore bundle is also copied into dist/release as
calnode_<version>.sigstore.json, so `gh release create ... dist/release/*`
attaches it beside the archives and checksums.txt. On a dry run the name
comes from the branch, with any slash replaced, since a slash would name
a directory.
The release job gains id-token: write (to get the Sigstore signing
certificate) and attestations: write (to store the attestation). It only
runs on version tags and on the dry-run dispatch.
The attestation runs on the dry run too, so the step is exercised before
a real tag depends on it. A dry run's attestation records its branch,
not a release tag, so the --source-ref check does not accept it.
DEPLOY.md's standalone-binary section says how to verify, and the
CHANGELOG has an Added entry.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Release job permissions —
id-token: writeandattestations: writeadded alongsidecontents: write, each with a comment naming its consumer; the release job still only runs onrefs/tags/v*or theworkflow_dispatchdry run. - Attestation step —
actions/attestpinned to the commit forv4.2.2withsubject-path: dist/release/*.tar.gz, placed afterdownload-artifactand before the release is created, so a Sigstore failure aborts the run rather than publishing unsigned artifacts. - Bundle publication — the single
bundle-pathoutput is copied intodist/release/ascalnode_<version>.sigstore.json, which the existinggh release create … dist/release/*glob then attaches;GITHUB_REF_NAME#vplus slash replacement keeps the name valid for a dry-run branch ref. - Docs —
DEPLOY.mddocumentsgh attestation verifywith--repo,--signer-workflowand--source-ref, plus the--bundleoffline variant;CHANGELOG.mdgets an Unreleased/Added entry pointing at the right anchor.
I checked the parts that CI cannot exercise (the release job is skipping on this PR) against upstream sources, and they hold:
1e69f48acb82d1966a394da916b4c1698aa569d6is exactly tagv4.2.2ofactions/attest.bundle-pathresolves to oneattestation.jsonfile even when several subjects are attested ("a single attestation will be created with references to each of the supplied subjects"), so copying a single file is right.artifact-metadata: writeis only required forpush-to-registry; storage-record creation is gated on it, so its absence here is correct.gh's--signer-workflowaccepts a value with no@refand matches a certificate from any ref, so the documented command matches tag-triggered certificates;--source-refmaps to the certificate'sSourceRepositoryRef.- Scorecard's
releasesAreSignedprobe lists.sigstore.jsoninsignatureExtensions(8 per release) whilereleasesHaveProvenanceonly recognises.intoto.jsonl, so "expect about 8" is the right expectation.
The two deliberate trade-offs called out in the description — an attestation outage blocking release creation, and dry-run attestations being accepted by a bare --repo check — are both documented in the workflow comment and DEPLOY.md rather than left implicit, which is the right handling.
deepseek-v4.1-flash | 𝕏
|
Needs a rebase before this can merge. The only conflict is Two things for the resolution:
Why I am asking instead of doing it: maintainer-edit is enabled on this PR, but pushing to I did rebase it locally to check the result before asking. It comes out clean, and the release job keeps Context for the conflict: 0.14.0 shipped after this was opened, and #245 replaced the frontend lockfile. Nothing here is wrong, it is just behind. |

Signed build provenance for the standalone release archives, attached to each release.
Why
Signed-Releases is at 0: none of the recent releases has a signature or provenance file. The archives already ship with
checksums.txt, which proves a download is intact but not where it came from.What changes
In
docker-publish.yml'sreleasejob:actions/attestondist/release/*.tar.gzbefore the release is created. That generates SLSA build provenance, signed through Sigstore with this workflow's identity and stored with the repository. (actions/attest-build-provenanceis now a wrapper aroundactions/attest, which its README recommends for new setups.)dist/release/ascalnode_<version>.sigstore.json, so the existinggh release create ... dist/release/*attaches it next to the archives andchecksums.txt. With the bundle, an archive can be checked from the file as well as through GitHub's attestation API.id-token: write(for the Sigstore signing certificate) andattestations: write(to store the attestation). It already only runs on version tags and on the dry-run dispatch, so nothing else gets these.if:as "Create GitHub Release".DEPLOY.md's standalone-binary section gets a short "how to verify", and CHANGELOG.md an Added entry. The check that ties an archive to this workflow and its release tag is:
--repoon its own accepts anything built by a workflow in this repository, dry runs included; the two extra flags narrow it to release builds. The container image is not attested here; that would be a similar step in thebuildjob withpush-to-registry, and is easy to add later if you want it.Expected Scorecard effect
Scorecard looks at the assets of the last five releases, skipping any that have none. A release with a
.sigstore.jsonasset scores 8 (it reserves 10 for.intoto.jsonlprovenance files), so I expect Signed-Releases to rise with each release cut after this merges, reaching about 8 once the last five releases all carry a bundle. Nothing changes until the next release. This is an expectation.How it was checked
docker-publish.yml. The new action is pinned to a commit SHA with its release as a comment.gh attestation verifyenforces--signer-workflowand--source-refboth through the API and with--bundle: checked against the GitHub CLI's own release attestations, where the matching values pass and a wrong workflow or ref fails.dry_run: true) is the way to see it work before the next tag.Part of a small set of Scorecard changes: #231 (token permissions), #232 (CodeQL) and #233 (pinning); discussion #235 lists the repository settings only a maintainer can change. Each stands on its own and they merge in any order.
🤖 Generated with Claude Code