Parse age_recipients at config load and never echo the entry #187

Merged
clawbot merged 1 commits from issue-153-parse-age-recipients into next 2026-09-22 13:01:01 +02:00
1 Commits
Author SHA1 Message Date
sneak e0e43548b7 Parse age_recipients at config load and never echo the entry (closes #153)
check / check (pull_request) Successful in 2m18s
Config.Validate now parses every age_recipients entry with
age.ParseX25519Recipient, so a bad recipient fails at config load instead
of deep in a backup after the snapshot row and tree walk. On failure the
error names the position (age_recipients[N]) and never the value: a
recipient string can itself be a secret key an operator pasted by mistake,
and age's own error quotes its input. An entry starting with
AGE-SECRET-KEY- (compared case-insensitively) gets a specific message.

The remaining parse sites (blobgen.NewWriter, crypto NewEncryptor and
UpdateRecipients), reachable by callers that skip config.Load, likewise
drop the value and age's wrapped error, naming only the position.

test/config.yaml's placeholder second recipient is replaced with a valid
X25519 key so it still loads.

Model: opus-4-8
2026-09-22 10:41:59 +00:00