Git Commands
These git operations are blocked because they discard uncommitted work, destroy recovery history, or rewrite shared state.
Git commands that mutate a branch with both a force flag and a create/reset flag (for example
git checkout -Bf, git switch -Cf --discard-changes) are treated as forced branch resets and blocked.
Git SSH environment overrides
Git acceptsGIT_SSH_COMMAND, GIT_SSH, and GIT_SSH_VARIANT to run an arbitrary program during network operations. CC Safety Net blocks any of these overrides when combined with a network subcommand, because they can execute arbitrary commands:
Filesystem Commands
rm -rf is classified by target: root/home, dynamic, cwd-self (.), home-cwd, and outside-cwd targets are blocked; temp paths (/tmp, /var/tmp, the system temp dir, $TMPDIR) and paths inside the current working directory are allowed. See Commands Allowed for the safe variants.
Shell Wrappers and Interpreter One-Liners
Commands wrapped in shell interpreters likebash -c or sh -c are also blocked. CC Safety Net recursively analyzes nested wrappers up to 10 levels deep, so there is no bypass through indirection.
Destructive code embedded in interpreter one-liners is detected and blocked by default. CC Safety Net extracts the code passed to an interpreter’s
-c or -e flag and scans it for embedded destructive operations, so an agent cannot sneak os.system("rm -rf /") past the hook by wrapping it in a Python or Node call.
The analyzed interpreters are
python, python2, python3, node, ruby, and perl. It is the embedded destructive command that triggers the block — the one-liner form alone is allowed by default.
Blocking all interpreter one-liners
If you want to block interpreter one-liners outright regardless of their content, setCC_SAFETY_NET_PARANOID_INTERPRETERS=1. Every python -c, node -e, ruby -e, and perl -e one-liner is then blocked, even if it contains no dangerous code. See Modes.
The
explain command lets you trace exactly why CC Safety Net blocks or allows any specific command. See the CLI Commands reference.