shell-wrapper-guard
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.
- Score
- Unranked
- Evidence
- No signals yet
- Last commit
- Not known
- Listed
Install
armory install shell-wrapper-guard --cli claudewrites the file to.claude/hooks/shell-wrapper-guardListed as compatible
# fetches the hook script into:
.claude/hooks/shell-wrapper-guard
# then register it in your settings.json "hooks" block.↳ Add the hook entry to settings.json, then restart the harness.
Needs the armory CLI · not on npm yet, build it from cli/ in the repository
What it is
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.
When to use it
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.
How to install / invoke
# Wire this hook script into .claude/settings.json
curl -sL https://raw.githubusercontent.com/davila7/claude-code-templates/main/cli-tool/components/hooks/security/shell-wrapper-guard.json -o .claude/hooks/shell-wrapper-guard.json
Notes
Extracted from davila7/claude-code-templates, security category.