# CC Safety Net

> A pre-execution guard that blocks destructive commands and secret file access before AI coding agents run them.

CC Safety Net is an open-source, MIT-licensed pre-execution guard for AI coding agents, published by J Liew (kenryu42). It hooks into supported coding CLIs and blocks destructive commands and access to secrets such as SSH keys and `.env` files before the tool call runs. The latest release listed is v2.6.10.

## What It Is

CC Safety Net is a safety layer for coding agents that run shell commands. It parses what a command actually does, so wrapping it in `bash -c` or `python -c`, or reordering flags, does not hide it. Safer variants such as `git push --force-with-lease` or `git clean -n` are allowed through. The docs state it is a pre-execution check, not a sandbox: it does not contain processes, set filesystem permissions, or watch network egress. A broken config file never blocks anything.

## What It Blocks

Destructive commands include `git reset --hard`, `git push --force`, `find -delete`, and `rm -rf` on dangerous targets such as root or home. Secret protection covers SSH keys, `.env` files, `~/.aws`, and coding-CLI credentials, both in the shell and in the agent's own read, edit, write, and search tools.

## Policy and Team Setup

A local dashboard, started with `npx cc-safety-net gui`, lets users choose a Standard, Strict, or Paranoid preset and toggle rules. Official rulebooks add blocks for Terraform, AWS, gcloud, and Azure, and custom JSON rules are supported. Committing the `.cc-safety-net/` directory shares policy across clones and cloud sessions. A `checkCommand` function can be called from Node.js without installing the hook.

## Setup Path

It requires Node.js 18 or higher. One installer detects the coding agents on the machine and hooks into the ones the user picks, and a `doctor` command verifies protection. The site says decisions are made offline, audit logs stay in `~/.cc-safety-net`, and there is no telemetry.

## Features
- Blocks destructive commands like git reset --hard, git push --force, and rm -rf on dangerous targets
- Unwraps commands inside bash -c, sh -c, and python -c
- Blocks access to SSH keys, .env files, AWS credentials, and coding-agent tokens
- Local GUI with Standard, Strict, and Paranoid presets
- Official rulebooks for Terraform, AWS, gcloud, and Azure plus custom JSON rules
- Shareable team policy via .cc-safety-net/ in git
- Node.js library API with checkCommand
- Local JSONL audit log with no telemetry
- Installer, doctor, update, and uninstall commands

## Integrations
Amp Code, Antigravity CLI, Claude Code, Codex, Cursor, DeepSeek Harness, Devin CLI, Factory Droid, Gemini CLI, GitHub Copilot CLI, Grok Build, Hermes Agent, Kimi Code, OpenClaw, OpenCode, Pi

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
v2.6.10

## Links
- Website: https://ccsafetynet.com
- Documentation: https://ccsafetynet.com/docs
- Repository: https://github.com/kenryu42/cc-safety-net
- EveryDev.ai: https://www.everydev.ai/tools/cc-safety-net
