Safety
cc-safety-net 2.7.2 closes a secret-read bypass
cc-safety-net 2.7.2 blocks secret reads hidden behind env, sudo and command options. 2.7.1 blocks code piped from the internet into a program.
- Date
- Works with
- Claude Code, Codex CLI, Gemini CLI
What’s new
cc-safety-net 2.7.2 came out on 2 November 2026. Before this release, a command could read a secret file when a wrapper option came first, for example env -i, env -u, env -C, env -S, sudo -E, sudo -u or command -p. The release notes give examples that are now blocked, such as env -i bash -c 'cat ~/.npmrc'.
Version 2.7.1 came out on 30 October 2026. It blocks code fetched from the internet and handed straight to python, node, perl, ruby or PowerShell, for example curl … | python3 - or irm … | iex in PowerShell. It also blocks a file that is downloaded and then run in the same command. Assistants that can ask you show a question. Modes that cannot ask, such as bypassPermissions, refuse the command. Rules for deletes with everything inside now start from your session folder, not from the folder that a tool passes in.
Why it matters
cc-safety-net protects files with passwords and keys, such as .env and ~/.npmrc. Before 2.7.2 a short wrapper in front of the command let such a read through. The guard already stopped curl … | bash. Since 2.7.1 it also asks you first, or stops, when a download goes into python, node, perl, ruby or PowerShell. If you trust the script, read it first, then run it yourself.
How to try it
Run node --version first. It must show 22 or newer. Then run npx -y cc-safety-net@latest update and restart your assistant. To test a command without running it, use npx -y cc-safety-net@latest explain "env -i bash -c 'cat ~/.npmrc'". It should say the command is blocked.
Related
Source
Checked against the source on 3 Nov 2026