Shell Wrapper Guard
Hooks security 196
Detects destructive commands hidden inside shell wrappers (sh -c, bash -c, python3 -c, node -e, perl -e, ruby -e). Complements dangerous-command-blocker by catching bypass vectors like 'sh -c "rm -rf /"' that evade direct command checks. Covers 8 bypass patterns: interpreter one-liners, nested wrappers, pipe-to-shell, here-strings, and env-based wrappers.
npx claude-code-templates@latest --hook security/shell-wrapper-guard claude-code — shell-wrapper-guard
Content
JSON
{
"description": "Detects destructive commands hidden inside shell wrappers (sh -c, bash -c, pytho..."
"supportingFiles": [
{3 keys}
]
"hooks": {
"PreToolUse": [1 item]
}
}