gstack/careful
Garry Tan 5d23ccab56
harden(careful): substitution separators + capital -R recursive flag (#2039)
Two residual fail-opens in the same guard PR #2040 hardened, both verified
by executing the script pre-fix:

- rm -rf $(./wipe-all)/node_modules silently allowed: the substitution token
  ends in a whitelisted suffix and the safe-exception early exit skipped ALL
  downstream checks. $( and backtick now count as chain separators; plain
  $VAR expansion stays allowed.
- rm -R / silently allowed: both greps required a lowercase r in the flag
  cluster; capital -R is the documented BSD/macOS recursive flag. Both greps
  now match -[a-zA-Z]*[rR].

Six new tests: substitution x2 -> ask, capital-R x2 -> ask, rm -Rf
node_modules single-command -> still allowed, escaped-newline branch
(existing code, previously untested), and a pinned deliberate FP
(cd app && rm -rf node_modules -> ask) documenting the fail-closed
direction on chains.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-09 18:57:56 -07:00
..
bin harden(careful): substitution separators + capital -R recursive flag (#2039) 2026-07-09 18:57:56 -07:00
SKILL.md v1.57.6.0 fix wave: 8 community bugs (4 security guards failing open) (#1911) 2026-06-08 06:39:38 -07:00
SKILL.md.tmpl v1.57.6.0 fix wave: 8 community bugs (4 security guards failing open) (#1911) 2026-06-08 06:39:38 -07:00