github kenryu42/cc-safety-net v2.3.1

4 hours ago

Closes five detection gaps in command analysis: curl uploads of secret files, downloads piped to a shell inside unscanned bodies, live substitutions in unquoted heredocs, function keyword definitions, and PowerShell home-path spellings.

Fixed

  • Fixed curl uploads that read sensitive files being allowed. -d @.env, -F file=@.env, --data-ascii, --data-binary, --data-urlencode, and <file form parts are now blocked, including the attached (-d@.env), =-joined (--data=@.env), and clustered (-sF file=@.env) spellings. --data-raw, --form-string, and @- still pass, because they never open a file.
  • Fixed downloads piped to a shell going undetected inside command bodies the parser does not descend into, such as a heredoc fed to bash. curl ... | sh and its wget, nc, and aria2c variants are now blocked, including sudo, env, command, and builtin wrappers and line continuations, while benign pipes such as curl ... | jq . stay allowed.
  • Fixed unquoted heredoc bodies hiding live code. $(...) and backtick substitutions in such a body are now parsed and matched against the full rule set, so cat <<EOF with $(find . -delete) reports the find.delete rule instead of a generic text match. Quoted (<<'EOF') bodies and escaped \$(...) remain inert data.
  • Fixed bash function name { ... } and function name() { ... } definitions not being parsed. Commands inside such a function are now analyzed when it is called, including mutations of the protected policy file.
  • Fixed PowerShell secret checks missing native path spellings. A $HOME\, $env:USERPROFILE\, $env:HOME\, or ~\ prefix now resolves for Get-Content, Set-Content, Add-Content, Copy-Item, Move-Item, Remove-Item, and the aliases gc, cat, type, cp, mv, rm, and del, and a backtick escape inside the path no longer hides it. A path assembled any other way, such as concatenation, a subexpression, or Join-Path, stays out of scope.

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

NewReleases is sending notifications on new releases.