github kenryu42/cc-safety-net v2.7.2

2 hours ago

Secret protection now handles commands run behind env, sudo, and command wrapper options, which previously let some sensitive reads through and rejected an already-approved path.

Fixed

  • Fixed sensitive-path reads being allowed when a wrapper option came before the real command, covering env -i, env -u, env -C, env -S, sudo -E, sudo -u, and command -p. Commands such as env -i bash -c 'cat ~/.npmrc' and printf 'open(".env")' | sudo -u root python3 - are now blocked. (#320)
  • Fixed an allow_paths entry being ignored for a sensitive file named in an environment assignment, so env -i npm_config_userconfig=<approved-path>/.npmrc node x.js is no longer blocked by secret.basename.npmrc. An assigned path that is not approved is still blocked, and a filename that merely contains = is still checked. (#319)
  • Fixed path resolution under env -C <dir>: command operands now resolve in the wrapper directory, while redirection targets keep resolving at the shell working directory. (#320)
  • Fixed a command carried inside an env -S string not being inspected, so a secret read split across the -S string and the words after it is detected, including a stdin script whose interpreter is named there. (#320)

Don't miss a new cc-safety-net release

NewReleases is sending notifications on new releases.