Git Commands
| Command Pattern | Why It’s Blocked |
|---|---|
git checkout -- <files> | Discards uncommitted changes permanently |
git checkout <ref> -- <path> | Overwrites working tree with ref version |
git checkout <ref> <path> | May overwrite working tree when Git disambiguates ref vs pathspec |
git restore <files> | Discards uncommitted changes |
git restore --worktree | Explicitly discards working tree changes |
git switch --discard-changes | Discards uncommitted changes when switching branches |
git switch --force / -f | Discards uncommitted changes (force switch) |
git reset --hard | Destroys all uncommitted changes |
git reset --merge | Can lose uncommitted changes |
git clean -f | Removes untracked files permanently |
git push --force / -f | Destroys remote history |
git branch -D | Force-deletes branch without merge check |
git stash drop | Permanently deletes stashed changes |
git stash clear | Deletes ALL stashed changes |
git worktree remove --force | Force-deletes worktree without checking for changes |
Filesystem Commands
| Command Pattern | Why It’s Blocked |
|---|---|
rm -rf (destructive targets) | Recursive deletion of root, home, parent, absolute, or non-temp paths outside cwd |
rm -rf / or ~ or $HOME | Root/home deletion is extremely dangerous |
find ... -delete | Permanently removes files matching criteria |
xargs rm -rf | Dynamic input makes targets unpredictable |
xargs <shell> -c | Can execute arbitrary commands |
parallel rm -rf | Dynamic input makes targets unpredictable |
parallel <shell> -c | Can execute arbitrary commands |
dd writing to block devices | Can overwrite disks or partitions |
mkfs on block devices | Formats disks or partitions |
shred | Permanently destroys file contents |
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.
With CC_SAFETY_NET_PARANOID_INTERPRETERS=1, interpreter one-liners — including python -c, node -e, ruby -e, and perl -e — are blocked as well, since they can hide destructive operations behind a language runtime.
The
explain command lets you trace exactly why CC Safety Net blocks or allows any specific command. See the CLI Commands reference.