Repository navigation
feat: minisign verification, redact package, fuzzing and demo - #18
Merged
Merged
Conversation
Values, Patterns and Marker move from secret to the new redact package, which uses the standard library only. logx now imports redact, so a tool that logs no longer compiles in go-keyring and dbus. secret.Redact, secret.RedactPatterns and secret.Redacted stay as deprecated forwards. Patterns took quadratic time: the YAML properties after each label were searched for in all of the text that followed it. The pattern is now anchored, which makes 100 KB of repeated labels about 100 times faster. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An Updater with a Verifier also downloads the signature of the checksums file and installs nothing unless it verifies. Minisign verifies minisign signatures (pre-hashed and legacy) and trusts several keys for rotation. Verifier and SkipChecksum together are refused. golang.org/x/crypto is added for BLAKE2b. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A list at the root started with two spaces of indentation. It now starts at the first column, as yq and kubectl write it. Snapshot tests of YAML output in downstream tools need new expectations. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Fuzz targets cover redaction, style specifications, iCalendar folding and escaping, truncation, single-line text, version ordering, archive extraction, minisign verification and checksums. Coverage of secret rises from 86% to 98%, of selfupdate from 91% to 98%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rendering and views of the list move to files of their own, and so do the prompt and the reading of a secret. No behavior changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ntation The verifier was only tested against a signer written from the same reading of the minisign format. A key and signature made by aead.dev/minisign now guard against a shared misreading. The fixture is kept byte for byte on every platform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows the old executable is moved aside before the new one takes its place, so a directory at the executable's path was carried off and the update reported success. ReplaceExecutable now refuses a path that is not a regular file on every platform. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 does this change?
Updaterwith aVerifierinstalls nothing unless the checksums file carries a valid signature.NewMinisign(keys...)verifies minisign signatures (pre-hashed and legacy), trusts several keys for rotation, and requires the signed trusted comment. The package docs show the GoReleasersignsentry.Values,PatternsandMarkermove out ofsecretand use the standard library only, sologxno longer pulls in go-keyring and dbus.secret.Redact,secret.RedactPatternsandsecret.Redactedstay as deprecated forwards.redact.Patternstook quadratic time (about 3.5 s for 100 KB of repeated labels), which could freeze a--verboserun that logs a large response. One regex is now anchored, which makes it about 100 times faster. The fuzzer found this.Theme.Hashedreturns the zero style where the theme isPlain, soth := theme.Active().For(w)covers name colors too.ParseStyle, iCalendar folding and escaping, truncation,PlainLine, version ordering, archive extraction, minisign verification and checksums.make fuzzruns them all.secretgoes from 86% to 98%,selfupdatefrom 91% to 98%. Only tests are added.examples/demo(make demo ARGS=pick).pick/list.goandsecret/resolve.goare split into smaller files. No behavior changes.Breaking change
format.WriteYAMLnow writes a top-level list at the first column (- name: api) instead of indented by two spaces. Snapshot tests of-o yamloutput in downstream tools will need new expectations. No other API breaks.New dependency
golang.org/x/crypto(BLAKE2b, for pre-hashed minisign signatures). Onlyselfupdateimports it.Interoperability
Besides the signer written from the minisign spec, the verifier is tested against a key and a pre-hashed signature made by aead.dev/minisign, an independent implementation (
selfupdate/testdata/minisign). The output of theminisignbinary itself has not been checked; legacy signatures are covered by the spec-based signer only.Checklist
make checkpasses (vet, lint, race tests, locale tests, cross-compile, tidy)breaking-change(there is no such label in this repository yet)🤖 Generated with Claude Code