disk-hygiene: kill switch trusts /etc/claude-code managed settings on WSL, where that directory is user-writable
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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).
- 主要言語
- Shell
- スター
- 22
- フォーク
- 2
- 平均マージ
- 8時間 34分
- マージ済み PR(30日)
- 946
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
melodic-software/claude-code-plugins のほかの issue
-
needs-human needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
melodic-software/claude-code-plugins#7636 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
agent-ready needs-human
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
melodic-software/claude-code-plugins#7598 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
good first issue priority: low
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
melodic-software/claude-code-plugins#7530 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs-human priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
melodic-software/claude-code-plugins#7455 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
priority: medium
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
melodic-software/claude-code-plugins#7351 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
melodic-software/claude-code-plugins の issue をすべて見る
似ている issue
-
Add Photocraftオープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
gke-labs/kube-agents#3394 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信