Skip to content

Inside The command hook

Ilia edited this page Nov 9, 2026 · 1 revision

The hook guards against accidents, not against a session set on getting round it. It reads the command line it is shown. Subshells, brace groups, bash -c '…', eval, a merge through gh api (REST or GraphQL) and a push whose destination is a variable, a substitution or refs/heads/main are all read and refused; a code review found each of them going through, and tests/hooks.py now holds them. What it cannot see is a command written to a file and run from there (python x.py, bash x.sh), or a git alias. No hook can.


Generated from docs/sclaude.md; edit it there, then rebuild with wiki/build.py.

Clone this wiki locally