Repository navigation
feat(release): sign checksums with cosign keyless and verify in install.sh and cora upgrade (#591) - #637
Merged
Conversation
…ll.sh and cora upgrade (#591) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
Merged
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.
What
release.yml(release job): installs cosign (sigstore/cosign-installerv3.10.1 pinned by SHA, cosign v2.6.5), signschecksums-sha256.txtkeyless withcosign sign-blob --yes --bundle, immediately re-verifies it against the workflow identity, then creates the release.checksums-sha256.txt.sigstore.jsonis uploaded with the other assets (files: release-artifacts/*).id-token: writeis added to that job only (alongsidecontents: write).install.sh: after the checksums download, fetches the bundle (same curl limits, 1 MiB cap) and runscosign verify-blobwith identity regexp^https://github.com/codecoradev/cora-code/\.github/workflows/release\.yml@refs/tags/vand issuerhttps://token.actions.githubusercontent.com.cora upgrade: same policy in Rust. It shells out tocosign(no Sigstore crate), with pure functions for URL, identity and policy and aCosignRunnertrait as the process seam.CORA_REQUIRE_SIGNATURE=1makes a missing cosign or bundle fatal. Unknown values are an error, and combining it with the checksum skip env vars is rejected, so a requested verification is never silently dropped.docs/installation.md(manual verify, policy matrix, scope),SECURITY.md, README, CHANGELOG### Security, AGENT.md post-release checklist.scripts/test_install_signature.sh: stub-based decision-matrix test for install.sh.Design note: signing happens in the same job, before the release step. If signing or verification fails, the job stops and no release is created, so there is no half-published release. One signature over the checksums covers all four archives.
Policy matrix (install.sh and
cora upgrade):Why
Checksums come from the same release as the archive, so a compromised release defeats them (#580 follow-up). Keyless signing ties the checksums to this repo's release workflow without any long-lived key to manage.
Testing
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test(3 runs; 1121 lib tests pass).tests/brain_search_processfailed once in one of the three full runs and passed when rerun alone; it does not touch this change.sh -n install.sh;sh scripts/test_install_signature.sh(fake curl/cosign: verified, cosign rejects, cosign missing, bundle 404, REQUIRE=1 variants, HTTP 500, network error, invalid env, cosign flags).release.ymlparsed withyaml.safe_load; actionlint, shellcheck and cosign were not available locally. A keyless signature cannot be produced locally, so the end-to-end path is untested until a real tag.What to check on the next release:
id-tokenerror).checksums-sha256.txt.sigstore.jsonnext tochecksums-sha256.txt.cosign verify-blob(command indocs/installation.md) succeeds against the published files, with cosign 2.x and 3.x.CORA_REQUIRE_SIGNATURE=1 CORA_VERSION=vX.Y.Z sh install.shinstalls; the same without cosign on PATH aborts; without the env var it prints the checksum-only notice.CORA_REQUIRE_SIGNATURE=1 cora upgrade --yesfrom the previous version works (the older binary has no signature check; test it from this release onward).Closes #591
🤖 Generated with Claude Code