Repository navigation
fix(secrets): name the stack in every secrets-verify-backup hint - #882
Merged
Merged
Conversation
add-recipient.sh, remove-recipient.sh and bootstrap.sh each act on a chosen stack but printed `make secrets-verify-backup KEY=…` without one, which defaults to observability. A key that is also on the catch-all rule then passes against the wrong file and records its proof there, so SecretsKeyBackupUnproven keeps naming it for the stack actually re-keyed. Found following the hint after the sensitive tier's re-key (#835). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # docs/changelog.md
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
All hints consistently propagate the active stack and align with the Make target’s argument handling.
Review effort: Balanced
Findings: None
What changed in this PR
Ensures backup-key verification records proof against the stack actually modified.
Changes:
- Adds
STACK=${STACK}to verification hints in three secrets scripts. - Documents the corrected operator workflow.
| File | Description |
|---|---|
scripts/add-recipient.sh |
Names the stack in the verification command. |
scripts/remove-recipient.sh |
Names the stack in the recovery hint. |
scripts/bootstrap.sh |
Names the stack in both backup-verification hints. |
docs/changelog.md |
Records the hint correction. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
The gap
add-recipient.sh,remove-recipient.shandbootstrap.sheach act on a stack (STACK, defaulting toobservability), but each printed its verify hint without one:secrets-verify-backupdefaults toobservabilitytoo. The sensitive tier's re-key (#835, #866) added a key that is also on the catch-all rule, so following the hint as printed would have:secrets/observability.sops.yaml,stack="observability",SecretsKeyBackupUnprovennaming the key forsensitive.The fix
Each hint now carries
STACK=${STACK}for the stack the script just acted on. The heredocs are unquoted, so it expands: the same block already printedgit add … secrets/sensitive.sops.yamlcorrectly during the #835 re-key.bash -nand shellcheck are clean on all three, and docs and markdownlint pass.🤖 Generated with Claude Code