fix(selfupdate): quiet cosign fallback (no nag), MIR_REQUIRE_COSIGN opt-in#46
Merged
Conversation
Most users don't have cosign installed, so printing "warning: cosign not found; skipping signature check ..." on every self-update made a successful, checksum-verified update look broken. Now the cosign-absent (and unsigned-release) paths are SILENT by default — the per-file SHA256 still guards the download. When cosign IS present and verifies, we emit a positive "✓ verified the release signature" line. And MIR_REQUIRE_COSIGN turns a missing/absent signature into a hard error, so an operator can mandate provenance verification. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Most users don't have cosign installed, so
mir self-updateprinted awarning: cosign not found …on every update — making a successful, checksum-verified update lookbroken. Fair feedback that the tone was wrong.
Change
SHA256 already protects against a corrupted download, so no nag.
✓ verified the release signature (cosign keyless).MIR_REQUIRE_COSIGNopt-in: turns a missing cosign / unsigned release into a harderror, so a security-conscious operator can mandate provenance verification.
After this, the common case is just:
Tests
Updated/added cosign tests: silent-on-absent, strict-mode hard error, unsigned-release
silent, and pass-emits-positive-note. Full suite + vet + gofmt green.
🤖 Generated with Claude Code