Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Run automatically on Claude Code events. Claude doesn't decide.
1 critical · 2 cautions to review before installing
A hook runs before every tool call and can block or approve it
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A security guard written in Zig that stops Claude Code before it runs rm -rf /.
Normalizes shell evasion and obfuscation before pattern matching, catching attacks that simple string blocklists miss. Zero external dependencies, single binary.
Available in Anthropic's community plugin marketplace — install with
/plugin install ccguard@claude-community.

AI coding assistants can accidentally run destructive commands, read secrets, or install unwanted packages. Instead of maintaining a massive deny list in settings.json, ccguard inspects every tool call as a PreToolUse hook and blocks dangerous operations with shell-aware pattern matching.
| Category | Examples | Reason |
|---|---|---|
| Recursive delete | rm -rf /, rm -rf ~, rm -rf src, rm -rf $VAR (allows ephemeral dirs like node_modules/dist/build and /tmp/... paths) | Prevent data loss without blocking routine cleanup |
| Destructive commands | mkfs, dd if=, shred, truncate | Prevent data loss |
| Privilege escalation | sudo, su -, doas, pkexec, eval, exec | Block unauthorized access |
| Git dangerous ops | git push --force, git reset --hard, git clean -f | Protect git history |
| Reverse shells | bash -i, /dev/tcp/, pty.spawn, child_process | Block code injection |
| Pipe-to-shell | curl | bash, wget | sh, cat file | zsh | Block remote code execution |
| Secret exfiltration | curl + .env, wget + credentials | Block data exfiltration |
| DNS exfiltration | dig $(cat .env), nslookup $(...) | Block DNS-based data theft |
| Env variable dumps | env, printenv, export -p | Prevent secret exposure |
| Global installs | pip install, npm install -g, cargo install, brew install | Prevent system modification |
| History evasion | unset HISTFILE, history -c, HISTSIZE=0 | Prevent audit trail tampering |
| File attribute changes | chown, chattr, xattr | Block ownership/permission changes |
| Shell obfuscation | $'\x72\x6d', $'\0150' | Defeat ANSI-C quoting bypass |
| Container escape | nsenter -t 1 -m -u -i -p | Block container breakout |
| Docker dangerous ops | --privileged, -v /:/host | Block privileged container access |
| macOS system commands | osascript, defaults write, diskutil, security | Block system tampering |
| /proc sensitive access | /proc/self/environ, /proc/*/cmdline | Block process secret access |
| Custom package registry | pip install --index-url, npm --registry | Block supply chain attacks |
| Credential leakage | curl + AKIA*, ghp_*, sk-proj-*, xoxb-* | Block API key exfiltration |
| Sensitive env var exfiltration | curl + $OPENAI_API_KEY, $AWS_SECRET_ACCESS_KEY | Block credential exfiltration |
| Script sourcing | source script.sh, . setup.sh | Block arbitrary script execution |
| Git config dangerous keys | core.hooksPath, core.pager, core.editor, core.sshCommand | Block arbitrary code execution via git config |
| File upload exfiltration | curl -T, curl -F, curl -d @, wget --post-file | Block file upload to external servers |
| Shell script execution | bash /tmp/script.sh, sh ./evil.sh | Block download-and-execute attacks |
| Redirect to protected paths | echo "evil" > ~/.bashrc, printf > ~/.ssh/config | Block redirect-based config writes |
| Kernel/system commands | insmod, modprobe, mount, sysctl, iptables | Block kernel/network manipulation |
| Debug/process attach | gdb -p, strace -p, ltrace -p | Block process inspection and injection |
| Category | Applies to | Examples | Reason |
|---|---|---|---|
| Secret file access | Read, Edit, Write | .env, .ssh/, .aws/, *.pem, credentials | Prevent secret leaks |
| /proc sensitive access | Read, Edit, Write | /proc/self/environ, /proc/*/cmdline | Block process secret access |
| Shell config modification | Edit, Write, NotebookEdit | .zshrc, .bashrc, .gitconfig, .claude/settings | Protect shell environment |
| IDE/MCP config protection | Edit, Write, NotebookEdit | .vscode/settings.json, .idea/, .code-workspace, .cursorrules, copilot-instructions.md, .kiro/ | Prevent agent trust boundary attacks |
| CI/CD pipeline config | Edit, Write, NotebookEdit | .github/workflows/, .gitlab-ci.yml, Jenkinsfile, .circleci/, terraform.tfstate | Prevent supply chain attacks via CI/CD |
| System path protection | Edit, Write, NotebookEdit | /etc/, /usr/, /System/, /Library/LaunchDaemons/ | Protect system files |
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub soyukke/ccguard --plugin ccguardPlugins from other owners that cover similar ground