Block destructive commands before your AI agent runs them.

Don't rely on guidelines to stop a bad command. CC Safety Net hooks into your coding agent and blocks destructive commands and secret file access before they run.

Needs Node.js 18+. Works on macOS, Linux, and Windows.
Read the docs

It reads what the command does.

Wrapping a command in bash -c or reordering its flags doesn't hide it, and the safer version still goes through.

Example commands

cc-safety-net · pre-exec hook

$ git push --force

✖ BLOCKEDgit.push-force

git push --force destroys remote history. Use --force-with-lease for safer force push.

$ git push --force-with-lease

✔ ALLOWED

Refuses to push when the remote moved since your last fetch.

Your secrets are off-limits. Even for reads.

Env files, SSH keys, cloud credentials, and coding agent tokens stay blocked in the shell and in the agent's own read, edit, write, and search tools.

$ cat .env

blocked

Reason: reads API keys and tokens from an environment file.

$ cp ~/.ssh/id_rsa /tmp/key

blocked

Reason: copies a private SSH key out of your key directory.

$ cat ~/.aws/credentials

blocked

Reason: reads AWS access keys from the credential store.

$ grep token ~/.claude/.credentials.json

blocked

Reason: reads your coding agent's own auth token.

Precise by default, strict when you need it

Pick a safety preset and switch protections on or off in a local dashboard instead of hand-editing JSON.

Runs on 127.0.0.1, so nothing leaves your machine.

127.0.0.1:52341/?token=f3a9…

Safety preset
  • $ $TOOL --force✔ allowed
  • $ rm -rf ./build✔ allowed
  • $ python -c "shutil.rmtree('build')"✔ allowed

Three examples. The preset applies to every command your agent runs.

Your commands never leave your machine.

The hook decides offline, the audit log stays in ~/.cc-safety-net, and there's no telemetry.

~/.cc-safety-net/logs/…/2026-10-01-a1b2c3.jsonl

{
"ts": "2026-10-01T13:16:56.213Z","decision": "deny","agent": "claude-code","toolName": "Bash","command": "GITHUB_TOKEN=<redacted> git push --force","ruleId": "git.push-force",…}

Install in one command

The installer finds the coding agents on this machine and hooks into the ones you pick.

Needs Node.js 18+. Works on macOS, Linux, and Windows.

CC Safety Net

Move fast. Break nothing.