settings.json

sandbox.enableWeakerNetworkIsolation

型boolean既定値false記述場所どの設定ファイルでも可

macOS 専用。サンドボックス内からシステムの TLS トラストサービス(com.apple.trustd.agent)へのアクセスを許可する。httpProxyPort を MITM プロキシとカスタム CA とともに使用する際、gh、gcloud、terraform など Go 製ツールが TLS 証明書を検証するために必要である。潜在的なデータ流出経路を開くことでセキュリティを低下させる。既定値: false。 See https://code.claude.com/docs/en/sandboxing

記述例

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

使い方・用途

  • macOS で httpProxyPort にカスタム CA を使う MITM プロキシを設定している環境で、gh や gcloud や terraform といった Go 製 CLI の TLS 証明書検証が失敗する問題を解消したいときに使う。
  • excludedCommands でツールをサンドボックス外に出してフルアクセス権限で実行する代わりに、サンドボックス内のまま TLS 検証を通せるようにしたいときに使う。
英語原文(公式ドキュメントより)

macOS only. Allow access to the system TLS trust service (com.apple.trustd.agent) in the sandbox. Required for Go-based tools like gh, gcloud, and terraform to verify TLS certificates when using httpProxyPort with a MITM proxy and custom CA. Reduces security by opening a potential data exfiltration path. Default: false. See https://code.claude.com/docs/en/sandboxing

関連ドキュメント

関連する変更履歴

v2.1.69(1件)

Added
macOS限定の sandbox.enableWeakerNetworkIsolation 設定を追加。カスタムプロキシ使用時に gh や terraform 等のGoプログラムでのTLS検証を許可
英語原文を表示
Added sandbox.enableWeakerNetworkIsolation setting (macOS only) to allow Go programs like gh, gcloud, and terraform to verify TLS certificates when using a custom MITM proxy with httpProxyPort

変更後

社内ネットワーク制限がある環境でも、terraform や gcloud といった必須のインフラ操作ツールをClaude Codeから安全に実行できます。

関連ドキュメント

v2.1.64(1件)

Added
macOS 限定で sandbox.enableWeakerNetworkIsolation 設定を追加しました。httpProxyPort を使用したカスタムプロキシ環境下で、gh や terraform などの Go 製プログラムが TLS 証明書を検証できるようになります。
英語原文を表示
Added sandbox.enableWeakerNetworkIsolation setting (macOS only) to allow Go programs like gh, gcloud, and terraform to verify TLS certificates when using a custom MITM proxy with httpProxyPort

変更後

企業独自のネットワーク環境下でも、gh コマンドによる PR 作成や terraform によるインフラ操作を Claude に安全に実行させることができます。

関連ドキュメント