disk-hygiene: kill switch trusts /etc/claude-code managed settings on WSL, where that directory is user-writable
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 62/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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).
- Lenguaje dominante
- Shell
- Estrellas
- 22
- Forks
- 2
- Merge medio
- 8 h 41 min
- PR fusionados (30 d)
- 892
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de melodic-software/claude-code-plugins
-
good first issue needs-human priority: low work-class: mechanical
Dificultad 2/5 1-3 horas Aptitud para principiantes 92/100
melodic-software/claude-code-plugins#8023 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
needs-human work-class: mechanical
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
melodic-software/claude-code-plugins#8021 ·
Los mantenedores suelen responder en 1 día
-
needs-human work-class: scoped
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
melodic-software/claude-code-plugins#8018 ·
Los mantenedores suelen responder en 1 día
-
docs(planning): point the interview surface context at the surface README instead of restating itAbiertoneeds-human work-class: mechanical
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
melodic-software/claude-code-plugins#8015 ·
Los mantenedores suelen responder en 1 día
-
needs-human work-class: mechanical
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
melodic-software/claude-code-plugins#8004 ·
Los mantenedores suelen responder en 1 día
Todos los issues de melodic-software/claude-code-plugins
Issues similares
-
gdsa opencode: keep-alive cleanup trap fails with 'keepalive_pid: unbound variable'Posiblemente ocupada @darribas la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 65/100
-
icon request
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 78/100