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
ngl my agent created this issue without asking me - I've been working on making its permissions less permissive and apparently I need to block its easy access to gh
Further testing shows the issue is broader than just --. Even "chezmoi *": "ask" and "chezmoi git *": "ask" fail to block chezmoi git -- push.
This appears to be the same root cause as the closed issue #6676 — the bash tool uses treesitter to tokenize commands before permission matching, and skips certain node types. The -- token is stripped during tokenization, so chezmoi git -- push is evaluated as if it were chezmoi git push.
Confirming the treesitter theory: the pattern "chezmoi git push": "ask" (without --) does block chezmoi git -- push. This confirms -- is being dropped before pattern matching occurs.
So #6676 was closed but the fix was incomplete — it only addressed the kill -9 style flags, not -- argument separators.
I confirm it still exist, in my case it was git status --porcelain, even defining without wildcard is not working (of course I restarted my session after permission update).
Activity
github-actions commentedon May 14, 2026
This issue might be a duplicate of existing issues. Please check:
harvzor commentedon May 14, 2026
ngl my agent created this issue without asking me - I've been working on making its permissions less permissive and apparently I need to block its easy access to
ghharvzor commentedon May 14, 2026
I think the issue still stands but I don't feel confident enough to file an issue
harvzor commentedon May 14, 2026
Update: root cause found
Further testing shows the issue is broader than just
--. Even"chezmoi *": "ask"and"chezmoi git *": "ask"fail to blockchezmoi git -- push.This appears to be the same root cause as the closed issue #6676 — the bash tool uses treesitter to tokenize commands before permission matching, and skips certain node types. The
--token is stripped during tokenization, sochezmoi git -- pushis evaluated as if it werechezmoi git push.Confirming the treesitter theory: the pattern
"chezmoi git push": "ask"(without--) does blockchezmoi git -- push. This confirms--is being dropped before pattern matching occurs.So #6676 was closed but the fix was incomplete — it only addressed the
kill -9style flags, not--argument separators.m21-cerutti commentedon Jul 15, 2026
I confirm it still exist, in my case it was
git status --porcelain, even defining without wildcard is not working (of course I restarted my session after permission update).