Skip to content

fix(motion): stop key-word heuristic from blocking unrelated commands - #119

Merged
brunoazoulay merged 2 commits into
mainfrom
fix/motion-key-guard-overmatch
Oct 14, 2026
Merged

brunoazoulay merged 2 commits into
mainfrom
fix/motion-key-guard-overmatch

Conversation

@brunoazoulay

Copy link
Copy Markdown
Collaborator

Summary

  • Motion signing key guard: drop the \bkeys?\b alternative of the "glob/variable + word" heuristic. It fired in every session with fuse-motion enabled on unrelated commands (python key=lambda, SQL count(*) ... key, d.keys()[:60], ssh scripts) and protected nothing a simple glob variant did not already bypass.
  • Kept unchanged: the glob/variable + .fuse-har heuristic and every path-based protection of the signing key directory.
  • Version bump to 0.1.109 (separate commit).

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.json

Test plan

  • HOME=$(mktemp -d) bun test: 3343 pass / 1 skip / 0 fail
  • bunx tsc --noEmit: exit 0
  • CI green

Breaking changes

None

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).
@brunoazoulay
brunoazoulay merged commit f772737 into main Oct 14, 2026
1 check passed
@brunoazoulay
brunoazoulay deleted the fix/motion-key-guard-overmatch branch October 14, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant