The installer (`installIndividualHook` in index.js) places companion
Python scripts in `.claude/hooks/`, but the hook config referenced
`.claude/scripts/`. This meant the hook would always fail with a
"file not found" error at runtime, silently rendering it non-functional.
Also removed the `2>&1` stderr redirect which masked the error by
merging stderr into stdout, causing the hook runner to report the
unhelpful "No stderr output" message instead of the actual cause.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Add new security hook to prevent accidental execution of dangerous shell
commands like rm -rf, dd, mkfs, and other destructive operations.
Features:
- Blocks rm with dangerous flags (recursive, force) on critical paths
- Detects wildcards and system directory targets (/, ~, *)
- Prevents disk operations (dd, mkfs, format)
- Blocks fork bombs and direct disk device access
- Provides clear safety guidelines in error messages
- Allows safe operations (e.g., rm -rf /tmp/specific-folder)
Reviewed by component-reviewer agent.
Co-authored-by: Claude <noreply@anthropic.com>