github kenryu42/cc-safety-net v2.6.14

3 hours ago

The command analyzer now resolves more shell-script and source paths before deciding, so fewer safe scripts are blocked as unverifiable and heredoc-written scripts are still inspected when they are run through those paths.

Changed

  • Improved heredoc script coverage: a script written by a heredoc and then executed directly by its path ($DIR/run.sh) is now checked against its recorded body instead of running unexamined. A body with a non-shell shebang such as #!/usr/bin/env python3, a body that cannot be parsed, or a body that exceeds analysis limits is allowed rather than blocked. (#270)
  • Changed heredoc tracking so an intervening command that only assigns shell variables no longer discards it, which means a script written to $HOME/cleanup.sh and then run as Z=$HOME; bash $Z/cleanup.sh is still inspected. (#270)

Fixed

  • Fixed source and . operands whose path comes from a literal assignment being blocked as an unverifiable shell execution source, so S=/tmp/work; source $S/env.sh is allowed in standard mode. (#270)
  • Fixed script and source paths that start with an unquoted ~/, $HOME, or $PWD not resolving, so commands such as K=$PWD/kit; bash $K/run.sh and bash ~/bin/setup.sh are no longer blocked as unverifiable. $PWD stays unresolved when a wrapper changes the working directory. (#270)
  • Fixed paths built from the macOS per-user temp directory not resolving: an assignment whose value is exactly $(getconf DARWIN_USER_TEMP_DIR) is now expanded by reading that value once from /usr/bin/getconf on macOS, so scripts under that directory are analyzed instead of blocked. (#270)

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

NewReleases is sending notifications on new releases.