disk-hygiene: kill switch trusts /etc/claude-code managed settings on WSL, where that directory is user-writable
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 62/100
Direzione di ricerca
Start with plugins/disk-hygiene/lib/killswitch_config.py, especially managed_settings_path and resolve_effective; check how the existing platform detection and managed settings precedence work. Verify how WSL can be identified and how to determine whether the managed path is trusted. Done when a user-writable WSL managed path cannot override the user's setting and the docstring reflects the behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
disk-hygiene's kill switch treats /etc/claude-code/managed-settings.json as a root-owned path that cannot be forged, and lets a value configured there override the user's setting. On WSL the live docs say /etc/claude-code is user-writable, so any process running as the user can stand in for organization policy: it can replace an organization's audit-only setting, or force-enable the clean skill's execution tiers over the user's own audit-only choice.
Affected area / component
plugins/disk-hygiene/lib/killswitch_config.py
Steps to reproduce
- On WSL, as the ordinary user, write
/etc/claude-code/managed-settings.json(or a file in/etc/claude-code/managed-settings.d/) that setspluginConfigs["disk-hygiene@<marketplace>"].options.disk_hygiene_enabledtotrue. - Set the same option to
false(audit-only) in user settings. - Call
resolve_effective()with the platform's managed path. The managed value wins and the execution tiers are enabled.
(Repro is from reading the code path; not run.)
Expected behavior
On platforms where the managed directory is user-writable, the guard does not treat that path as an organization-controlled source for the kill switch.
Actual behavior
killswitch_config.py:45-78(managed_settings_path): the docstring says the file "lives at a fixed, root-owned system path per platform, so a repo cannot forge it", and the function returns/etc/claude-code/managed-settings.jsonfor everylinux*platform, WSL included.killswitch_config.py:291-317(resolve_effective): a configured managed value is returned before user settings are read.- Live docs, https://code.claude.com/docs/en/managed-settings#present-admin-documents (read 2026-10-12): "On WSL,
/etc/claude-codeis user-writable as well", with thewslInheritsWindowsSettingsentry saying when the Windows documents stand above it.
Suggested fix
Detect WSL and treat a user-writable managed path as untrusted for this switch (for example, honor it only when it is root-owned and not writable by the current user), and correct the docstring.
The related fail-open gap (the guard's hook rows do not set onFailure: "block") is tracked in #6755 and is not repeated here.
Environment
WSL; disk-hygiene on main as of 2026-10-12.
Found during the upstream-pointer sweep (PRs #7061-#7274).
- Lingua principale
- Shell
- Stelle
- 22
- Fork
- 2
- Merge medio
- 8h 25m
- PR unite (30g)
- 944
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di melodic-software/claude-code-plugins
-
good first issue priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
melodic-software/claude-code-plugins#7530 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
needs-human priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
melodic-software/claude-code-plugins#7455 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
melodic-software/claude-code-plugins#7351 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
agent-ready priority: high work-class: scoped
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
melodic-software/claude-code-plugins#7312 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
melodic-software/claude-code-plugins#7288 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di melodic-software/claude-code-plugins
Issue simili
-
area: compat area: parsing bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
reubeno/brush#1526 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Add dependabotApertafeat
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 72/100
open-nudge/opentemplate#204 ·
I maintainer di solito rispondono entro 1 giorno
-
omarchy-brightness-keyboard: double idle-blank saves brightness 0, so wake 'restore' keeps the keyboard backlight offForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Type/Improvement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
wso2/product-integrator-mi#5099 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Windows 上 pwsh 工具名未按 exec 分类着色,与状态圆点颜色家族分裂Forse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ccch1mneyyy/dsh-TUI#1555 ·
I maintainer di solito rispondono entro 1 giorno