Claude Code Bash Guardian — Security skill for Claude Code
Automated security layer for Claude Code PreToolUse Bash Tool hooks.
How to install Claude Code Bash Guardian
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open RoaringFerrum/claude-code-bash-guardian and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Claude Code Bash Guardian does
Automated security layer for Claude Code PreToolUse Bash Tool hooks. Provides bash command filtering, bypass prevention, and intelligent path control for safe, unattended AI agent sessions.
Alternatives in Security
- Security Scan Report — Generated: 2026-04-10 20:48 UTC Skills scanned: 134 Total findings: 836 Critical: 32 High: 50 Safe skills: 100 18.1k ★
- Security Guardian — Comprehensive security analysis for RTK CLI tool, focusing on command injection, shell escaping, hook security 11.9k ★
- Skills Audit Report — Date: 2026-02-15 Auditor: Automated Skill Quality Audit Scope: Recently added skills in business-growth/, fina 5.3k ★
README
Claude Code Bash Guardian
[](LICENSE)
A security hook for **Claude Code's PreToolUse Bash Tool**. Designed for **unattended agent runs** (non-interactive sessions), it ensures safer automated operations by providing:
- Robust bash command filtering
- Advanced bypass prevention
- Intelligent path access control
**Hook Type:** PreToolUse (Bash Tool) **Operation Mode:** Fully automated, no user interaction **Target Users:** Developers using Claude Code (unattended / automated workflows)
⚠️ Security Disclaimer
**This tool provides defense-in-depth security for Claude Code bash operations, but is not infallible.**
While Claude Code Bash Guardian has been extensively tested against common attack patterns and bypass techniques, no security tool can guarantee 100% protection against all possible threats. Key considerations:
- Residual Risk: Despite comprehensive testing, false negatives (dangerous commands being allowed) remain theoretically possible due to the complexity of bash syntax and potential zero-day bypass techniques
- Threat Model: The primary threat actor is an AI agent making mistakes or being prompted inappropriately, not a deliberate attacker with system access
- Risk-Benefit Analysis: The security benefits of filtering automated agent commands significantly outweigh the residual risks in most development environments
- Best Practices:
- Always maintain current backups of critical data and code
- Use version control (git) to track and revert unwanted changes
- Run in isolated environments when working with sensitive systems
- Review logs periodically
- Test custom configurations thoroughly before production use
This tool is provided "as is" under the MIT License, without warranty of any kind. Users assume all risks associated with its deployment and operation.
🛡️ Security Features
- **Enhanced Wrapper Command Det
Related Skills
Claudemd Bypass Audit
R3 Step 2 — lesson-bypass detector. Joins memory-prompt-hint suggest events with subsequent transcript activit
Secure LLM Gateway
Security-focused gateway in front of an LLM API — auth, prompt-injection defense, output filtering, audit logg
GitHub Release Skill
Safe, automated GitHub releases with supply chain security. Prevents dangerous gh release commands, orchestrat
Claude Mission Control
Real-time command center for Claude Code agents. Monitor all agents from one dashboard, send instructions, tra
Mem0 Server MCP
🧠 Production-ready MCP server providing intelligent memory for Claude Code with async architecture, Neo4j kno
Canary PR Guardian
Run the canary PR test-guardian — Tier-0 diff-coverage, Tier-1 quality audit,
Related Agents
Git Repository Manager
Manages Git repositories, version control, GitHub/GitLab operations, and automated release workflows with inte
File Upload
File Upload vulnerability specialist (H1 #39). Use for testing upload restrictions, content-type bypass, exten
Doey Platform Expert
Platform systems specialist — tmux IPC, bash 3.2 portability, macOS process lifecycle, race condition preventi