You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
disk-hygiene: PowerShell guard false-positives on read-only Export-Csv into the plugin data dir, and the workaround bypasses the guard #5226
A worker subagent doing a read-only inventory tried to write its findings with Export-Csv into ~/.claude/plugins/data/disk-hygiene-melodic-software/. The PowerShell guard blocked it. The worker then started pwsh from the Bash lane and ran the same command there, which went through. This is both a false positive (the write target is the plugin's own data dir and the command deletes nothing) and a guard bypass (the same operation passes when wrapped in a Bash-launched pwsh).
Evidence
Worker blocked on the PowerShell lane for Export-Csv to the data dir; the same operation succeeded via bash -> pwsh.
The exact denial text was not captured, and which rule in skills/clean/scripts/destructive_guard.py matched is unknown. Someone reproducing this should capture the denial text.
Read-only output cmdlets (Export-Csv, Out-File, Set-Content) targeting the plugin data dir are allowed, or asked once with a clear reason.
A pwsh process launched from Bash is judged by the same rules as the PowerShell tool, or the docs say plainly that it is not.
Proposed direction
(a) Allowlist writes whose resolved target is under --data-root. (b) Have the Bash-lane guard classify pwsh -Command and powershell -Command payloads through the PowerShell rule set.
Owner decision (2026-10-01): approved the recommendation ("go with recommended", the owner's reply to the batch decision page that listed this question and its recommendation).
Question: how to resolve #5226 (Export-Csv write refused, and pwsh from Bash getting through).
Chosen option A: close it. Part (a), the Export-Csv write into the plugin data dir being refused, is fixed by merged PR #5546 (guardrails 0.42.1). Part (b), pwsh launched from Bash getting through, is the belt not reaching subagents, which is tracked in #3856. Re-file with the captured denial text if it recurs.
Next: closing as completed; a cross-reference to this issue is added on #3856.
Activity
fix(guardrails): exempt a literal PowerShell write under an exempt ro…
kyle-sexton commentedon Oct 1, 2026
Owner decision (2026-10-01): approved the recommendation ("go with recommended", the owner's reply to the batch decision page that listed this question and its recommendation).
Question: how to resolve #5226 (Export-Csv write refused, and pwsh from Bash getting through).
Chosen option A: close it. Part (a), the Export-Csv write into the plugin data dir being refused, is fixed by merged PR #5546 (guardrails 0.42.1). Part (b), pwsh launched from Bash getting through, is the belt not reaching subagents, which is tracked in #3856. Re-file with the captured denial text if it recurs.
Next: closing as completed; a cross-reference to this issue is added on #3856.