Repository navigation
fix(motion): stop key-word heuristic from blocking unrelated commands - #119
Merged
Merged
Conversation
The Motion signing key guard fired in every session with fuse-motion enabled on any command containing the word "key" next to a glob or variable character (python lambdas, SQL columns, ssh scripts). That branch protected nothing a simple glob variant did not already bypass, so it is removed; the glob/variable + .fuse-har heuristic and every path-based protection of the motion signing key directory are unchanged. Tests: test/motion-key-word-rule.test.ts (4 former false positives now allowed, 5 groups of real key-directory accesses still blocked).
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.
Summary
\bkeys?\balternative of the "glob/variable + word" heuristic. It fired in every session with fuse-motion enabled on unrelated commands (pythonkey=lambda, SQLcount(*) ... key,d.keys()[:60], ssh scripts) and protected nothing a simple glob variant did not already bypass..fuse-harheuristic and every path-based protection of the signing key directory.Changes
src/policy/motion/guard-key.ts(one line)test/motion-key-word-rule.test.ts(new: 4 former false positives allowed, 5 groups of real key-directory accesses still blocked)MEMORY/LESSON.md,CHANGELOG.md,package.jsonTest plan
HOME=$(mktemp -d) bun test: 3343 pass / 1 skip / 0 failbunx tsc --noEmit: exit 0Breaking changes
None