Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
claude-code-guardrails — Real-time guardrails for Claude Code tool calls. | Kitploit
Tools/GitHubGitHub/rulebricks/claude-code-guardrails
Defensive ToolsConfiguration AuditingIncident ResponseAPI SecurityAI SecurityLog Analysis
GitHubrulebricks/claude-code-guardrails

claude-code-guardrails

Real-time guardrails for Claude Code tool calls.

View Repository
77857 months agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

We have since built a dedicated product to help developers manage AI permissions better, which we intend to make open source. Check it out at stoplight.ai.

Claude Code Guardrails

Example Table

settings.json works if:

  • You're fine editing JSON and killing Claude Code sessions every time policy changes
  • Your security team is comfortable making PRs
  • You don't need to know what got blocked, when, or for whom
  • Basic pattern matching like Bash(rm:*) covers your use cases

Use this if:

  • Policy changes need to apply instantly across your team—no git pull, no restart
  • Security/compliance needs a clear audit trail of every blocked command
  • You need conditional logic: "allow rm -rf on node_modules, deny everywhere else"
  • Non-engineers need to edit rules without touching config files
Rulebricks gives you instant governance from one hook.
root@kitploit:~
Claude Code → PreToolUse hook → Rulebricks API → allow / deny / ask

Setup (5 minutes)

1. Create your rules

  1. Go to rulebricks.com and create an account
  2. Fork one of these templates from the "AI Agents" category:
    • Claude – Bash Guardrails — control shell commands
    • Claude – File Access Policy — control file read/write/edit
    • MCP Tool Governance — control MCP server operations
  3. Customize the rules for your team
  4. Publish the rule
  5. Copy your API key from the API tab

2. Install

Automatically finds your rules

root@kitploit:~
git clone https://github.com/rulebricks/claude-code-guardrails
cd claude-code-guardrails
./install.sh

Claude will detect your published rules and wire up the appropriate hooks.

3. Restart Claude Code

You're done.

What gets checked

TemplateMatcherWhat it controls
Bash Command GuardrailsBashShell commands

Configuration

Environment variables in ~/.claude/settings.json:

root@kitploit:~
{
  "env": {
    "RULEBRICKS_API_KEY": "your-api-key",
    "RULEBRICKS_VERBOSE": "1"
  }
}
VariableDescription
RULEBRICKS_API_KEYYour Rulebricks API key (required)
RULEBRICKS_VERBOSESet to 1 to log decisions to stderr

Updating rules

Edit your decision table and publish a new version. Changes apply immediately— no restart, no redeployment.

Reviewing histories

Review the history of blocked commands in the Logs tab. You can query by tool, approval decision, and more. There are other meaningful perks to this data, like finding out which tool is being blocked the most.

Example Logs

Data privacy

You're free to edit the guardrail however you'd like to redact sensitive data before it hits our platform.

Also– while this works with our cloud environment, you can also run this on private infrastructure, using your own logging provider. Reach out if that might be of interest.

Uninstall

root@kitploit:~
# Remove hook script
rm ~/.claude/hooks/guardrail.py

# Remove from settings.json (manual)
# Edit ~/.claude/settings.json and delete:
#   - hooks.PreToolUse entry
#   - env.RULEBRICKS_* variables

Or, use this one-liner to remove the hook and settings:

root@kitploit:~
rm ~/.claude/hooks/guardrail.py && python3 -c "
import json
p = '$HOME/.claude/settings.json'.replace('\$HOME', '$HOME')
s = json.load(open(p))
s.get('hooks', {}).pop('PreToolUse', None)
for k in list(s.get('env', {}).keys()):
    if k.startswith('RULEBRICKS_'): s['env'].pop(k)
json.dump(s, open(p, 'w'), indent=2)"
Download Tool
File Access PolicyRead|Write|EditFile operations
MCP Tool Governancemcp__*MCP server calls