fix(one-way-doors): unify credential noun list across revoke/reset/rotate#2025
Open
jbetala7 wants to merge 1 commit into
Open
fix(one-way-doors): unify credential noun list across revoke/reset/rotate#2025jbetala7 wants to merge 1 commit into
jbetala7 wants to merge 1 commit into
Conversation
…tate The secondary keyword safety net's three credential patterns are meant to be parallel, but revoke was missing "secret" and reset was missing "secret" and "access key". Those nouns only lived in the rotate alternation, so "revoke my secret", "reset my secret", and "reset my access key" classified as two-way (auto-decidable) instead of one-way (always ask) -- a false negative in a destructive-op safety net, the same class garrytan#1839 fixed for "rotate ... password". Give all three verbs an identical noun alternation and extend the regression test to assert every verb x noun pair is one-way. Fixes garrytan#2024 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
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.
Problem
scripts/one-way-doors.tsis the secondary keyword safety net for AskUserQuestion calls that fire without a registry id. A false negative here auto-approves a destructive op (the question is treated as two-way / preference-suppressible instead of one-way / always-ask).Its three credential patterns are meant to be parallel across
revoke/reset/rotate(the inline comment says they "allow filler words between verb and noun"; the#1839test header states the patterns "must be parallel across revoke/reset/rotate"). They were not:Root cause
secretlived only in therotatealternation, andaccess keywas absent fromreset. So these phrasings slipped through as two-way onmain(c7ae632, v1.58.1.0):This is the same false-negative class
#1839fixed forrotate ... password; that fix unified one verb's nouns but leftrevoke/resetshort.Fix
Give all three verbs an identical credential noun alternation (
api key | token | secret | credential | access key | password). Pure widening of an over-narrow safety net: no previously-caught phrasing stops matching, and the additions are conservative (a credential verb + credential noun is exactly what this net is for).Testing
bun test test/one-way-doors.test.ts— 4 pass, 28 assertions. Added a regression test asserting every<verb> my <noun>pair across all three verbs and all six nouns classifies one-way; it fails onmainfor the three cases above and passes with this change.Fixes #2024