Summary
The disk_hygiene_enabled=false kill switch ("audit-only mode") does not actually prevent deletions
on the platforms where it matters, for two independent reasons.
B2 — the enabled flag never gates the PowerShell lane
skills/clean/scripts/destructive_guard.py:296-300 routes tool_name == "PowerShell" to
powershell_decision() and returns before the enabled flag is computed.
- The
enabled = ... CLAUDE_PLUGIN_OPTION_DISK_HYGIENE_ENABLED ... computation at :303 is only
reached on the Bash branch.
So with execution disabled, Remove-Item / del / ::Delete / recycle-bin spellings still return
ask and can be approved. On Windows/macOS the PowerShell lane is the deletion/handoff path, so
"audit-only mode" is not audit-only there.
Fix: when disabled, powershell_decision should deny (not ask) the mutation spellings.
D3 — the kill switch is inert under the #376 injection failure anyway
Fix: move kill-switch enforcement to a point that actually receives the value — pass it as a
hook arg alongside the ${CLAUDE_PLUGIN_DATA} fix from #376, or have the engine read/enforce it.
Severity
HIGH — a disabled kill switch that does not disable execution is a safety-contract violation.
Related: #376 (same env-injection root cause for D3).
Summary
The
disk_hygiene_enabled=falsekill switch ("audit-only mode") does not actually prevent deletionson the platforms where it matters, for two independent reasons.
B2 — the enabled flag never gates the PowerShell lane
skills/clean/scripts/destructive_guard.py:296-300routestool_name == "PowerShell"topowershell_decision()and returns before theenabledflag is computed.enabled = ... CLAUDE_PLUGIN_OPTION_DISK_HYGIENE_ENABLED ...computation at:303is onlyreached on the Bash branch.
So with execution disabled,
Remove-Item/del/::Delete/ recycle-bin spellings still returnaskand can be approved. On Windows/macOS the PowerShell lane is the deletion/handoff path, so"audit-only mode" is not audit-only there.
Fix: when disabled,
powershell_decisionshoulddeny(notask) the mutation spellings.D3 — the kill switch is inert under the #376 injection failure anyway
:303readsCLAUDE_PLUGIN_OPTION_DISK_HYGIENE_ENABLEDfrom the hook process env and defaults toenabled=truewhen absent (... != "false").absent on exactly the hosts disk-hygiene: skill-frontmatter guard reads CLAUDE_PLUGIN_DATA from env but never receives it -> engine lane fails closed on all platforms #376 affects → the guard defaults to enabled regardless of the
configured
userConfigvalue. The deterministic kill switch is silently defeated; only themodel-advisory
${user_config.disk_hygiene_enabled}token inSKILL.md:35-37remains (and itsexpansion in skill-body text is itself unverified).
Fix: move kill-switch enforcement to a point that actually receives the value — pass it as a
hook arg alongside the
${CLAUDE_PLUGIN_DATA}fix from #376, or have the engine read/enforce it.Severity
HIGH — a disabled kill switch that does not disable execution is a safety-contract violation.
Related: #376 (same env-injection root cause for D3).