This was generated by AI during triage (#657 sweep housekeeping, T8h batch conversion).
Origin: PR #742 review thread (destructive_guard.py line 141). Folded from a #657 line (checked off there, this issue is the target).
Problem
Literal-$ authorized-path support is missing in the disk-hygiene destructive guard. Repro: _literal_shell_words (plugins/disk-hygiene/skills/clean/scripts/destructive_guard.py, around L56-59) blanket-rejects any command containing $, so an authorized --data-root whose CLAUDE_PLUGIN_DATA path contains a literal $ is rejected before parsing — scan/preview/apply fail closed for those installs despite the argv authority.
Current behavior is fail-closed/fail-loud (deny with visible reason) — over-blocking, the safe direction, outside DEFER-FORBIDDEN. Deferred deliberately by the reporter, not a quick fix.
Fix direction (from the reporting review thread)
Allow $ only inside a single-quoted literal word (bash does NOT expand $ in single quotes; it DOES inside double quotes) — requires a quote-aware tokenizer that still rejects real expansion/$(...)/backtick syntax.
Why this is needs-human, not a mechanical batch fix
This is a change to a security-relevant guard's tokenizer. The stated fix direction is a single design, but it must be implemented and adversarially reviewed by a human before merge — the exact bar this repo already applies to guard-tokenizer changes (see #903/#964's chained-alias-bypass caution: a plausible-looking carve-out in a value/shape guard is exactly the class of change that has reopened bypasses before here). Getting the quote-aware tokenizer wrong (e.g., missing a $(...)-inside-single-quotes edge case, or a mixed-quote word) would silently reopen the injection vector the blanket check exists to block — that is a genuine security review call, not a mechanical rename/consolidation.
Question for the human: does the single-quoted-literal carve-out as scoped above cover the real-world CLAUDE_PLUGIN_DATA-contains-$ cases this repo needs to support, or is the safer path to instead document the $-in-path restriction as an accepted limitation (parallel to #1013's resolution for the guardrails value-blindness case) and tell affected installs to avoid $ in their data-root path?
This was generated by AI during triage (#657 sweep housekeeping, T8h batch conversion).
Origin: PR #742 review thread (
destructive_guard.pyline 141). Folded from a #657 line (checked off there, this issue is the target).Problem
Literal-
$authorized-path support is missing in the disk-hygiene destructive guard. Repro:_literal_shell_words(plugins/disk-hygiene/skills/clean/scripts/destructive_guard.py, around L56-59) blanket-rejects any command containing$, so an authorized--data-rootwhoseCLAUDE_PLUGIN_DATApath contains a literal$is rejected before parsing — scan/preview/apply fail closed for those installs despite the argv authority.Current behavior is fail-closed/fail-loud (deny with visible reason) — over-blocking, the safe direction, outside DEFER-FORBIDDEN. Deferred deliberately by the reporter, not a quick fix.
Fix direction (from the reporting review thread)
Allow
$only inside a single-quoted literal word (bash does NOT expand$in single quotes; it DOES inside double quotes) — requires a quote-aware tokenizer that still rejects real expansion/$(...)/backtick syntax.Why this is
needs-human, not a mechanical batch fixThis is a change to a security-relevant guard's tokenizer. The stated fix direction is a single design, but it must be implemented and adversarially reviewed by a human before merge — the exact bar this repo already applies to guard-tokenizer changes (see #903/#964's chained-alias-bypass caution: a plausible-looking carve-out in a value/shape guard is exactly the class of change that has reopened bypasses before here). Getting the quote-aware tokenizer wrong (e.g., missing a
$(...)-inside-single-quotes edge case, or a mixed-quote word) would silently reopen the injection vector the blanket check exists to block — that is a genuine security review call, not a mechanical rename/consolidation.Question for the human: does the single-quoted-literal carve-out as scoped above cover the real-world
CLAUDE_PLUGIN_DATA-contains-$cases this repo needs to support, or is the safer path to instead document the$-in-path restriction as an accepted limitation (parallel to #1013's resolution for the guardrails value-blindness case) and tell affected installs to avoid$in their data-root path?