Repository navigation
ci: a release was neither signed nor reproducible - #76
Merged
jamesconwaydev merged 1 commit intoNov 18, 2026
Merged
Conversation
There was no release workflow. A v* tag now starts one that checks the tag's SSH signature against .github/allowed_signers taken from main, packages the crate twice from fresh checkouts and fails unless the two are the same byte for byte, attests the .crate, and publishes it with its SHA256SUMS and the provenance bundle. A manual run builds without the tag check or publishing. scripts/package-twice.sh is that build, for CI and for anyone checking a release; a reproducible job in ci.yml runs it on every change. The html5lib-tests submodule is excluded from the package, since with it checked out the crate held 140 files instead of 91 and hashed differently. SECURITY.md says how to verify the tag, the attestation and a rebuild.
jamesconwaydev
approved these changes
Nov 18, 2026
jamesconwaydev
left a comment
Collaborator
There was a problem hiding this comment.
This is careful work, thank you. Checking the tag against allowed_signers from main rather than from the tagged commit, and catching the submodule leaking into the package, are both things I'd have missed.
On the tag ruleset: agreed. I'm adding a creation rule to the v* ruleset so only admins can create release tags, on top of the deletion and update rules it already has.
This was referenced Nov 18, 2026
Closed
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
There was no release workflow, so nothing was signed or attested, and nothing showed a release could be rebuilt bit for bit. Silver asks for signed releases, and gold for reproducible builds.
Fixes #57
Change
As agreed on #57.
release.yml, on av*tag:tag:git tag -vagainst.github/allowed_signerstaken frommain, not from the tagged commit. Someone who can push a tag could also change the file the tag is checked with. The tag is fetched again by name, so the annotated tag, not a lightweight ref, is what's verified.build:scripts/package-twice.sh, which packages the crate twice from fresh checkouts and fails unless both are identical.publish:actions/attest-build-provenanceon the.crate;gh release create --verify-tagwith the crate,SHA256SUMSand the provenance bundle.A manual run skips the tag check and publishing, to try a release first. Permissions are
contents: readeverywhere exceptpublish, which getscontents: write,id-token: writeandattestations: write. Every action is pinned by commit..github/allowed_signers: your key, withnamespaces="git"so it's trusted for git signatures only. I checked it againsthttps://github.com/jamesconwaydev.keysand your account's SSH signing keys.scripts/package-twice.sh: the build, for CI and for anyone checking a release. It uses worktrees, so it works in a shallow clone. The first checks out with umask 022 and the second with 077, so checkout modes can't leak into the package.crates/parsec/Cargo.toml:exclude = ["tests/html5lib-tests"]. With the submodule checked out,cargo packagetook all 49 of its files, 140 in all instead of 91, so a rebuild in an ordinary checkout hashed differently from the release. The manifests aren't synced from Netweir (sync-from-netweir.sh: "the manifests are Parsec's own").ci.yml: areproduciblejob runs the script and also packages from its own checkout, which has the submodules. All three must match, so a change that would break a rebuild fails on the pull request.SECURITY.md: "Verifying a release": the tag (git tag -v), the attestation (gh attestation verify --signer-workflow …/release.yml), and a rebuild with the script.Tests
What moves the hash. The
.cratecame out byte-identical from two separate clones, and also with:SOURCE_DATE_EPOCH;Only the submodule changed it, which the
excludefixes:cargo package --listwith and without it is now the same 91 files.The script in a shallow clone: a
git clone --depth 1gives the same hash as a full clone.The tag check, against a throwaway key:
Lint and tests:
actionlintpasses on both workflows,shellcheckon the script,scripts/check-headers.shpasses, andcargo fmt,clippy -D warningsandcargo test --workspacepass locally.Not tried: the
publishjob itself, which only runs on a real tag. A manual run ofreleaseon the branch would exercisebuild.For the repository settings, which this can't do: a tag ruleset limiting who can create
v*tags. The workflow at the tagged commit is what runs, so the signature check is only as strong as who can push a tag.Checklist
cargo fmt,cargo clippy -- -D warningsandcargo testpass locallycrates/parsec/src, its tests, examples, scripts or fuzz targets were made in Netweir first (see CONTRIBUTING.md). n/a: only the manifest, which is Parsec's own.