gstack/careful
Garry Tan 5084f85e00
fix(careful): close three check-careful bypasses via real JSON extraction
The grep-based command extractor stopped at the first escaped quote, so any
quoted argument truncated the command before the pattern checks ran —
`git commit -m "wip" && rm -rf /` was silently allowed. Replace it with a
python3/node JSON parse that fails CLOSED on unreadable payloads, add an
IFS/base64-to-shell obfuscation tripwire, and stop multi-line commands from
riding the single-line safe-exception whitelist (line-based grep would have
approved `rm -rf /` when a later line matched node_modules — a hazard the
real newline decoding exposed).

Contributed by @wtamminga (PR #2426; the -R hunk was dropped — it landed in
v1.61.0.0 — and output shapes updated to the nested hookSpecificOutput form).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 15:38:16 -07:00
..
bin fix(careful): close three check-careful bypasses via real JSON extraction 2026-08-14 15:38:16 -07:00
SKILL.md fix(hooks): nest freeze/careful permissionDecision under hookSpecificOutput 2026-08-14 15:34:35 -07:00
SKILL.md.tmpl fix(hooks): nest freeze/careful permissionDecision under hookSpecificOutput 2026-08-14 15:34:35 -07:00