From 4e1be21da329c01a2aabf80f37c73842c8951def Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Thu, 16 Apr 2026 19:32:07 +0200 Subject: [PATCH] chore(claude): generalize sandbox allowedDomains via subdomain wildcards Collapse explicit per-host entries into *.parent.tld patterns where the sandbox only needs reach to a single domain family (Ansible, AWS, Docker, Gitea, GitHub + githubusercontent, gstatic, hCaptcha, infinito, npm, pythonhosted, Taiga). Apex domains stay listed bare. Sorted ASC with the wildcard block first. Co-Authored-By: Claude Opus 4.7 --- .claude/settings.json | 42 +++++++++---------- .../tools/agents/claude/sandbox.md | 2 +- 2 files changed, 20 insertions(+), 24 deletions(-) diff --git a/.claude/settings.json b/.claude/settings.json index ef817307e7..00b56859d8 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -38,31 +38,27 @@ "allowUnsandboxedCommands": false, "network": { "allowedDomains": [ - "pypi.org", - "files.pythonhosted.org", - "galaxy.ansible.com", - "ansible-galaxy-ng.s3.dualstack.us-east-1.amazonaws.com", - "github.com", - "api.github.com", - "codeload.github.com", - "raw.githubusercontent.com", - "objects.githubusercontent.com", - "registry.npmjs.org", - "ghcr.io", - "docs.ansible.com", - "docs.docker.com", - "docs.gitea.com", - "letsencrypt.org", - "hcaptcha.com", - "gstatic.com", - "community.taiga.io", - "monogramm.io", + "*.amazonaws.com", + "*.ansible.com", + "*.docker.com", + "*.gitea.com", + "*.github.com", + "*.githubusercontent.com", + "*.gstatic.com", + "*.hcaptcha.com", + "*.infinito.example", + "*.infinito.nexus", + "*.npmjs.org", + "*.pythonhosted.org", + "*.taiga.io", "cybermaster.space", - "infinito.nexus", + "ghcr.io", + "github.com", "infinito.example", - "docs.infinito.nexus", - "s.infinito.nexus", - "hub.infinito.nexus" + "infinito.nexus", + "letsencrypt.org", + "monogramm.io", + "pypi.org" ], "allowAllUnixSockets": true, "allowLocalBinding": true diff --git a/docs/contributing/tools/agents/claude/sandbox.md b/docs/contributing/tools/agents/claude/sandbox.md index a863a2df62..749e0d701e 100644 --- a/docs/contributing/tools/agents/claude/sandbox.md +++ b/docs/contributing/tools/agents/claude/sandbox.md @@ -76,7 +76,7 @@ The `sandbox.network` block governs outbound and local connectivity from inside | Field | Current value | Effect | |---|---|---| -| `allowedDomains` | Explicit list of every host the agent or its tooling needs to reach (PyPI + pythonhosted, Ansible Galaxy, GitHub + raw/api/codeload + GHCR, npm registry, Let's Encrypt, hCaptcha, gstatic, the project's own `*.infinito.nexus` and `infinito.example` hosts, and the documentation/community sites referenced from research workflows). | Wildcards (`*`) are **not** honored by this gate — sandboxed network access is enforced per-host, and any unlisted host triggers an interactive `SandboxNetworkAccess` prompt. Add new hosts here when introducing tooling that fetches from a new origin; egress is still bounded by any host-level firewall on top. | +| `allowedDomains` | List of domain patterns the agent or its tooling needs to reach. Apex domains are listed bare (`pypi.org`, `github.com`, `ghcr.io`, `letsencrypt.org`, `monogramm.io`, `cybermaster.space`, `infinito.nexus`, `infinito.example`); subdomain families use the `*.parent.tld` form (`*.pythonhosted.org`, `*.ansible.com`, `*.amazonaws.com`, `*.github.com`, `*.githubusercontent.com`, `*.npmjs.org`, `*.docker.com`, `*.gitea.com`, `*.hcaptcha.com`, `*.gstatic.com`, `*.taiga.io`, `*.infinito.nexus`). | Subdomain wildcards (`*.example.com`) are honored, but a bare `*` is not — sandboxed network access is enforced per pattern, and any unmatched host triggers an interactive `SandboxNetworkAccess` prompt. Add a new pattern here when introducing tooling that fetches from a new origin; egress is still bounded by any host-level firewall on top. | | `allowAllUnixSockets` | `true` | The sandbox can connect to any Unix-domain socket on the host. Required so commands like `docker`, `systemctl`, and language servers continue to work; these all communicate over Unix sockets (e.g. `/var/run/docker.sock`). | | `allowLocalBinding` | `true` | The agent MAY bind listening sockets on `localhost` (e.g. `make up`, `python -m http.server`, dev servers). Required for any local end-to-end testing. |