Summary (highest priority — potential fail-open of the security guard)
The disk-hygiene clean skill launches its PreToolUse safety guard via the unqualified
interpreter python:
skills/clean/SKILL.md:12 — command: "python", args ["${CLAUDE_PLUGIN_ROOT}/skills/clean/scripts/destructive_guard.py"]
Stock macOS and many Linux distros ship only python3 (no python shim). If python is
unresolvable, the PreToolUse hook process cannot launch.
Two failure modes, both severe
- Fail-open (worst case): if Claude Code treats a hook-launch failure as non-blocking, the
destructive guard never runs — rm -rf, engine apply, etc. are no longer intercepted on the
very POSIX hosts the safety model relies on. The guard's whole purpose is defeated silently.
- Fail-closed: if hook-launch failure blocks, the plugin is entirely unusable (scan/preview/
apply all denied) on those hosts.
Additionally, if a legacy python (2.x) resolves first, the guard crashes immediately on
from __future__, f-strings, and dict[str, object] annotations.
Note the irony: the guard discloses its own absolute sys.executable for the engine calls to use,
but the guard itself is bootstrapped by the unqualified python it warns against.
Suggested fix
- Launch the hook via a resolvable 3.11+ interpreter: prefer
python3, or a tiny launcher that
resolves a suitable interpreter and execs the guard.
- Confirm Claude Code's actual behavior on hook-launch failure (fail-open vs fail-closed) and, if
fail-open, treat this as critical.
- Add a regression test /
setup:check probe that the hook's interpreter actually resolves (see the
companion setup:check issue).
Severity
HIGH (security) — a security guard that may not run at all on POSIX hosts.
Found via a deep source audit prompted by a real Windows session.
Summary (highest priority — potential fail-open of the security guard)
The disk-hygiene
cleanskill launches its PreToolUse safety guard via the unqualifiedinterpreter
python:skills/clean/SKILL.md:12—command: "python", args["${CLAUDE_PLUGIN_ROOT}/skills/clean/scripts/destructive_guard.py"]Stock macOS and many Linux distros ship only
python3(nopythonshim). Ifpythonisunresolvable, the PreToolUse hook process cannot launch.
Two failure modes, both severe
destructive guard never runs —
rm -rf, engineapply, etc. are no longer intercepted on thevery POSIX hosts the safety model relies on. The guard's whole purpose is defeated silently.
apply all denied) on those hosts.
Additionally, if a legacy
python(2.x) resolves first, the guard crashes immediately onfrom __future__, f-strings, anddict[str, object]annotations.Note the irony: the guard discloses its own absolute
sys.executablefor the engine calls to use,but the guard itself is bootstrapped by the unqualified
pythonit warns against.Suggested fix
python3, or a tiny launcher thatresolves a suitable interpreter and
execs the guard.fail-open, treat this as critical.
setup:checkprobe that the hook's interpreter actually resolves (see thecompanion
setup:checkissue).Severity
HIGH (security) — a security guard that may not run at all on POSIX hosts.
Found via a deep source audit prompted by a real Windows session.