What is bash-guardrails?
bash-guardrails is a Claude Code mod by ruihe774 that tool-call guard rules (parser-based), written in CEL; add your own in ~/.claude/bash-guardrails.json or .claude/bash-guardrails.json. On by default: blocks malformed bash and find rooted. It is listed under Security and has no public popularity data yet.
| Type | Claude code mod |
|---|---|
| Author | ruihe774 |
| Repository | ruihe774/cc-bash-guardrails |
| Popularity | no public popularity data yet |
| Category | Security |
| Security | Low risk (84/100) |
| Rank | #4,469 of 5,272 Claude Code mods; #465 in Security |
| License | Unlicense |
| Last commit | 2026-10-11 |
| Hooks | 2 events |
| Sees | Monitor|Bash calls |
| Draws on | nothing |
Is bash-guardrails safe to install?
bash-guardrails scores 84/100 on the MCPMods security check: Low risk. Things to review: reads environment variables. It passed 6 of 8 checks.
Mod footprints come from claude plugin validate, which lists every event a mod hooks and every API call it makes without running it.
| Check | Result |
|---|---|
| No network access | Pass |
| Starts no processes | Pass |
| Writes no files or config | Pass |
| Reads environment variables | Review |
| Only sees the events it hooks | Pass |
| Doesn't drive Claude | Pass |
| Validator reported problems | Note |
| Has an open-source license | Pass |
API calls in its code
| Call | What it means |
|---|---|
$.env.get | reads env vars |
$.fs.read | reads files |
$.fs.stat | reads files |
$.session.root | |
$.ui.ask | draws interface |
$.ui.log | draws interface |
$.ui.toast | draws interface |
How do I install bash-guardrails?
- Check your Claude Code version. Mods need Claude Code 2.1.287 or later and are on by default.
claude --version
- Read its footprint. This lists every event it hooks and every API call it makes, without running it.
git clone https://github.com/ruihe774/cc-bash-guardrails claude plugin validate ./cc-bash-guardrails/.
- Install it. Run this in your terminal, then /reload-plugins in an open session.
git clone https://github.com/ruihe774/cc-bash-guardrails && claude --plugin-dir ./cc-bash-guardrails/.
Or ask Claude to set it up
Paste this into Claude Code and it installs bash-guardrails for you:
Install the "bash-guardrails" Claude Code mod from https://github.com/ruihe774/cc-bash-guardrails. Run claude plugin validate on it first and show me what it can access before you enable it.