You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
min secret set: re-read the effective rule before storing a value approved under another rule #4055
Found in review of #4009 (comment), at crates/minimal/src/cmd/secret.rs:631. Unresolved when this issue was filed.
Approval for one rule does not cover the rule in effect at store time.
When min secret set cannot write the rule, the terminal asks whether to store the value under the rule that applies. The approval names that rule's authorities. The value is read after the approval, and store.set runs with no re-read or comparison of the effective rule. If the organization rule changes during value entry, the value is stored for the new authorities, and the user has not approved them.
The check comment at crates/minimal/src/cmd/secret.rs:876-877 says the rule is checked, and any change confirmed, before the value is read. The code does not repeat that check after the read.
Before store.set at crates/minimal/src/cmd/secret.rs:953, re-read the applicable rule with applicable_rule(target, &args.id) and compare it with the rule the user approved. If they differ, store nothing and report the change, or ask again. The choice between refusal and a new question is left to the author.
Activity