Repository navigation
ci(release): sign releases with a GitHub artifact attestation - #8
Merged
Merged
Conversation
Tag releases now attest the raw binaries and ZIP archives in a signing job that runs no repository code, publish the bundle as plugin.sigstore.json, and verify every asset against it before publishing. The workflow_dispatch path is gone because its signature would carry refs/heads/main, and the tag must now equal manifest.json version. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The approved community catalog lists a release signed by this workflow only when its commit is on the default branch. Checking that before the build stops a release the catalog would refuse from being published. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Releases of this plugin are not signed. Silo servers verify a Sigstore bundle when the catalog lists one, and the approved community catalog accepts a signature made by a workflow in this repository run from the release tag. The plugin cannot use the shared Silo release workflow because it builds with
make dist, a prepared Tailscale module, and reproducible ZIP archives.The
workflow_dispatchpath also creates and pushes the tag inside the job. A run started that way hasrefs/heads/mainas its OIDC ref, so a signature from it would not match the tag and the catalog would refuse the release.Related issue: N/A (maintainer-directed)
Approach
release.ymlnow runs only on a pushedv*tag and has four jobs, with top-levelpermissions: {}:contents: read): checks that the tag equalsmanifest.jsonversion, runsmake distand the existing asset preparation unchanged, and returnschecksums.txtas a job output. Go caching is off so a signed build never uses cache entries other runs wrote.id-token: write,attestations: write): checks nothing out, downloads nothing, and runs no repository code. It checks the subject list and attests it withactions/attest-build-provenance(v4.2.2, the shared workflow's pin) usingsubject-checksums, then returns the bundle as a job output.contents: write): downloads the assets, checks them against the build job's checksums, writesplugin.sigstore.json, and runsgh attestation verifyon every asset with this workflow's identity at the tag,--source-ref refs/tags/<tag>and--deny-self-hosted-runners. It then publishes with the existing release action and generated notes.The subjects are the raw binaries and the ZIP archives, which is exactly the list in
checksums.txt. The catalog needs only the binaries, but the archives are published assets that people can download, and attesting them costs nothing and lets anyone verify any download with one command. The contents and format ofchecksums.txtare unchanged.The development guide gains a Releases section covering how to cut a release and how to verify a download. The README's manual install step points to it.
Validation
make dist VERSION=0.2.2locally and ran the extracted workflow steps against its output. The tag check acceptedv0.2.2and refusedv0.2.3, aworkflow_dispatchrun on main, and a branch push. The newchecksums.txtis byte-identical to the old workflow's. The subject check refused an extra line. The release check passed on the real files and refused a tampered binary and an extra file. Withghstubbed out, the verify step built the expected arguments for all six assets.gh attestation verifyflag set against a release signed by the shared Silo workflow. It passed with that workflow's identity and failed with a different one.Risks
The next release must be cut by pushing a tag, on a commit that is on
main, whose version matchesmanifest.json. The approved community catalog accepts this workflow as the plugin's signer only once the plugin's approval entry names it (signer_workflow). There is no manual dispatch any more. The first signed release is the real test of the attest and verify steps. If verification fails, nothing is published. Because the workflow runs from the tagged commit, a fix to it ships with the next version and tag.Checklist
AI Disclosure
🤖 Generated with Claude Code