kenryu42/cc-safety-net
A pre-execution guard for AI coding agents. It blocks destructive Git and file system commands, plus common attempts to access sensitive files, before a tool call runs. Supports Amp Code, Antigravity CLI, Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, Grok Build, Hermes Agent, Kimi Code, OpenClaw, OpenCode, and Pi.
What it solves
CC Safety Net prevents AI coding agents from executing destructive shell commands or accessing sensitive files (like SSH keys and .env files) before the tool call is executed. It acts as a security layer that blocks high-risk actions—such as rm -rf or git push --force—to prevent accidental or intentional data loss and secret leakage when using AI-powered CLIs.
How it works
The tool parses and analyzes commands before they run, ensuring that wrapping a command or reordering flags cannot bypass the protection. It integrates as a hook into various coding CLIs (e.g., Claude Code, Cursor, GitHub Copilot CLI) and can also be used as a Node.js library. Users can manage security policies via a GUI, install specialized rulebooks for cloud providers (AWS, Azure, GCP), and share these policies across teams via Git.
Who it’s for
Developers using AI coding agents and CLIs who want to ensure their local environment and sensitive credentials remain protected from autonomous agent actions.
Highlights
- Multi-CLI Support: Works with a wide range of agents including Claude Code, Cursor, Gemini CLI, and GitHub Copilot CLI.
- Customizable Safety Presets: Offers Standard, Strict, and Paranoid levels of protection.
- Rulebooks: Extensible protection via official packs for Terraform, AWS, gcloud, and Azure.
- Audit Trail: Maintains local logs of command decisions for review.
- Library API: Can be embedded directly into other tools via an npm package.
- Policy Sharing: Allows security policies to be committed to Git for team-wide consistency.
Related
- Project
- Project
- Project
- Project
- Project