sandbox.allowNestedUserNamespaces

settings.json型boolean既定値false記述場所ユーザー設定または管理者設定

Linux および WSL2 上のサンドボックス化されたコマンドがユーザー名前空間を作成できるようにする。Chromium や Electron 自身のサンドボックス、ネストされた bubblewrap、unshare はこの機能を必要とする。このキーを true に設定すると、セキュリティ境界が無効になり、サンドボックス化されたコマンドのコードがサンドボックス外で実行される可能性がある。rootless Podman や Buildah については、代わりに [excludedCommands](#sandbox-excludedCommands) を使用すること。これらはサンドボックスが他の方法でも停止させるためである。Claude Code v2.1.305 以降が必要

記述例

{
  "sandbox": {
    "enabled": true,
    "allowNestedUserNamespaces": true
  }
}

使い方・用途

  • Linux や WSL2 のサンドボックス内で Chromium や Electron など、独自のサンドボックスを持つアプリケーションを実行するために user namespace の作成を許可したい場合に使う。
  • サンドボックス内で nested bubblewrap や unshare を実行する必要があり、それらが user namespace の作成を要求するために失敗する場合に使う。
  • サンドボックスのファイル保護で rootless podman や Chromium などのコマンドが停止してしまう問題を解消する場合に使う。
英語原文

Let sandboxed commands on Linux and WSL2 create user namespaces, which Chromium's and Electron's own sandbox, a nested bubblewrap, and unshare need. If you set this key to true, you turn off a security boundary: code from a sandboxed command can end up running outside the sandbox. For rootless Podman or Buildah, use [excludedCommands](#sandbox-excludedcommands) instead, because the sandbox stops them in other ways too. Requires Claude Code v2.1.305 or later.

関連ドキュメント

関連する変更履歴

v2.1.305(1件)

sandbox.allowNestedUserNamespaces を追加した。これにより Linux 上のサンドボックス化されたコマンドがユーザー namespace を作成できるようになる(Chromium、rootless podman)。ただし、これによりサンドボックスのファイル保護を回避できるようになる。
英語原文を表示
Added sandbox.allowNestedUserNamespaces so sandboxed commands on Linux can create user namespaces (Chromium, rootless podman); this lets them get around the sandbox's file protections

変更後

Linux のサンドボックス環境で Chromium や rootless podman など、ユーザー名前空間を必要とするツールをそのまま実行できるようになる。設定でこの用途に限定した権限を与えられるため、サンドボックスのファイル保護は維持したまま動かせる。

関連ドキュメント