From 213e838e44de684b6584af83aeb2f3a849d2b17e Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Tue, 10 Nov 2026 18:59:47 -0500 Subject: [PATCH 1/2] fix(claude): let sandboxed tools verify TLS through the macOS trust service The sandbox blocked com.apple.trustd.agent, so every client that verifies TLS through Security.framework failed with x509: OSStatus -26276 unless it ran unsandboxed or had SSL_CERT_FILE set. enableWeakerNetworkIsolation allows the trust service, at the cost of a path outside the network proxy. --- managed/.chezmoitemplates/claude/user.md | 2 +- managed/dot_claude/settings.managed.jsonc.tmpl | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/managed/.chezmoitemplates/claude/user.md b/managed/.chezmoitemplates/claude/user.md index d719114..ab375a0 100644 --- a/managed/.chezmoitemplates/claude/user.md +++ b/managed/.chezmoitemplates/claude/user.md @@ -32,7 +32,7 @@ established conventions conflict with them, follow the repository. `gh repo clone`, or any `op`, `aws`, or `codex` command, set `dangerouslyDisableSandbox: true` on the call. For other Git and `gh` commands, leave `dangerouslyDisableSandbox` unset. - If Git fails with `Permission denied (publickey)`, `Host key verification failed`, - `1Password: Operation not permitted`, or a `sandbox proxy` error, or `gh` fails with + `1Password: Operation not permitted`, or a `sandbox proxy` error, or any tool fails with `x509: OSStatus -26276`, the call ran inside the sandbox. Rerun it with `dangerouslyDisableSandbox: true` instead of diagnosing the tool. - Inside the sandbox, `diff` fails with `Operation not permitted` when an input is a process diff --git a/managed/dot_claude/settings.managed.jsonc.tmpl b/managed/dot_claude/settings.managed.jsonc.tmpl index 6d201ad..41e38cb 100644 --- a/managed/dot_claude/settings.managed.jsonc.tmpl +++ b/managed/dot_claude/settings.managed.jsonc.tmpl @@ -121,10 +121,13 @@ "sandbox": { "enabled": true, "autoAllowBashIfSandboxed": true, + // Allow the macOS trust service, com.apple.trustd.agent. Without it, every client that verifies + // TLS through Security.framework, such as Go tools, mise, and Terraform, fails with + // "x509: OSStatus -26276". The trust service is an exfiltration path outside the proxy. + "enableWeakerNetworkIsolation": true, // Exclude only commands that need what the sandbox withholds: the commit-signing agent, SSH - // remotes, or credentials outside the sandbox. Sandboxed gh needs SSL_CERT_FILE, because the - // sandbox blocks the macOS trust service Go uses to verify TLS. A sudo entry has no effect: - // calls that start with sudo always stay sandboxed. + // remotes, or credentials outside the sandbox. A sudo entry has no effect: calls that start + // with sudo always stay sandboxed. "excludedCommands": [ "git commit *", "git rebase *", From 4ad26a72a54ebec813eaeb1ef41fdb1b52f9c2e9 Mon Sep 17 00:00:00 2001 From: Alex Baker Date: Tue, 10 Nov 2026 19:00:01 -0500 Subject: [PATCH 2/2] feat(claude): allow Terraform downloads and plugin sockets in the sandbox Terraform and TFLint fetch providers from registry.terraform.io and releases.hashicorp.com, and their plugins handshake over a Unix socket in TMPDIR. Projects point TMPDIR at ~/.cache/terraform-tmp for those tools, so the sandbox allows sockets in that one directory. --- managed/dot_claude/settings.managed.jsonc.tmpl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/managed/dot_claude/settings.managed.jsonc.tmpl b/managed/dot_claude/settings.managed.jsonc.tmpl index 41e38cb..cd9641b 100644 --- a/managed/dot_claude/settings.managed.jsonc.tmpl +++ b/managed/dot_claude/settings.managed.jsonc.tmpl @@ -190,8 +190,13 @@ "release-assets.githubusercontent.com", "objects.githubusercontent.com", "mise-versions.jdx.dev", - "nodejs.org" - ] + "nodejs.org", + "registry.terraform.io", + "releases.hashicorp.com" + ], + // Terraform providers and TFLint plugins handshake over a Unix socket in TMPDIR. Projects + // point TMPDIR here for those tools, so the sandbox allows sockets in this one directory. + "allowUnixSockets": ["~/.cache/terraform-tmp"] } } }