Skip to content

feat(cli): uteke upgrade verifies the cosign keyless signature (#1610) - #1613

Merged
ajianaz merged 2 commits into
developfrom
feat/keyless-upgrade-verification
Oct 30, 2026
Merged

ajianaz merged 2 commits into
developfrom
feat/keyless-upgrade-verification

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator

What

uteke upgrade now verifies the checksums-sha256.txt.bundle the Release workflow already publishes, offline and fail closed, using Sigstore roots compiled into the binary (crates/uteke-cli/trust/): the ECDSA signature over the file, the Fulcio chain to the embedded root, a code-signing non-CA leaf, the identity (this repo's release.yml at exactly the target tag, issued to GitHub Actions), the Rekor signed timestamp inside the certificate's validity, and the entry naming the same file, signature and certificate. Targets below v0.22.1 are refused with no fallback. The minisign scheme is removed: sign-release.sh, its tests, the reminder workflow and script, the public key and the minisign-verify dependency. New dependencies: x509-parser, ring and base64 (already in the tree), rcgen (dev only).

Why

The offline minisign step needed a password that was lost (v0.22.0 is unsigned), and rotating a key breaks installed binaries. The design is in docs/plans/2026-10-30-keyless-upgrade-verification.md; the protected v* tag ruleset it rests on is active. Builds before v0.22.1 cannot verify the new scheme and reinstall once (documented in SECURITY.md and the CHANGELOG).

Testing

  • The real v0.22.0 bundle verifies end to end against the embedded roots; cosign verify-blob agrees.
  • Negative cases against a throwaway PKI: changed file, other key, other tag/workflow/repo/ref, extra or missing identity, non-GitHub issuer, no code-signing EKU, no digitalSignature, CA leaf, log time outside validity, unknown root/intermediate, altered or forged Rekor timestamp, untrusted log, entry for another hash/signature/certificate, malformed bundles; version-floor and fail-closed fetch tests.
  • fmt, clippy -D warnings, cargo test --workspace --locked (one unrelated timing test in uteke-core, graph_rerank latency under 10 ms, failed once under load and passed on rerun), docgen produces no diff. Cora review: no findings.

Verify checksums-sha256.txt.bundle offline against Sigstore roots embedded in the binary (x509-parser, ring): signature, Fulcio chain, workflow identity at exactly the target tag, GitHub Actions issuer, Rekor signed timestamp inside the certificate validity, and entry consistency. Refuse targets below v0.22.1. Remove the minisign scheme, its signing script, reminder workflow and dependency.
("wrong PEM label", {
let mut b = pki.bundle.clone();
b["cert"] = json!(
B64.encode("-----BEGIN PRIVATE KEY-----\nAAAA\n-----END PRIVATE KEY-----\n")
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

The fake PRIVATE KEY block in the test tripped secret scanners. Any label other than CERTIFICATE exercises the same check.
@ajianaz
ajianaz merged commit b04555a into develop Oct 30, 2026
14 checks passed
@ajianaz
ajianaz deleted the feat/keyless-upgrade-verification branch October 30, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants