github kenryu42/cc-safety-net v2.4.5

4 hours ago

Closes a coverage gap where git checkout path restores were allowed at every protection level unless the command used a -- separator.

Fixed

  • Fixed separator-free git checkout path restores being allowed. Commands such as git checkout ., git checkout src/, git checkout src/app.ts, and glob operands such as git checkout '*.ts' are now blocked by the git.checkout-double-dash rule, which points to git stash or git switch. (#128)

Changed

  • Changed a lone git checkout operand to count as a path restore when it is spelled as a path (., .., ./…, ../…, : magic pathspecs, absolute or drive-letter forms, or a trailing slash) or when it names an existing entry in the working tree. Bare branch names such as git checkout main, along with the -b, -t, --track, and --detach forms, stay allowed. A branch whose name matches an existing file or directory is now blocked instead, with guidance to use git switch. (#128)

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

NewReleases is sending notifications on new releases.