Set strictAllowlist to have the sandbox flat-out deny hosts outside your allowed domains instead of prompting.
What's wrong with this entry?
A strictAllowlist boolean on sandbox network settings makes the sandbox runtime deny hosts outside allowedDomains outright instead of prompting. The runtime check existed before but there was no way to turn it on.
- Added to the sandbox network settings schema and propagated through settings merging (
if (o.strictAllowlist === !0) l.strictAllowlist = !0;), derived from any of user, managed or CLI settings - The runtime permission check is
if (!r || Hl.network.strictAllowlist); a host matching no rule is denied rather than prompted when this is on - Honoured only from user, managed/policy or
--settingssources; per its own description project settings (.claude/settings.jsonand.claude/settings.local.json) are ignored - Described as "Enforced for sandboxed commands only"; in-process tools such as WebFetch are not gated by it
- Absent by default, so behaviour is unchanged unless configured
{"sandbox":{"network":{"allowedDomains":["api.example.com"],"strictAllowlist":true}}}the sandbox runtime deterministically denies hosts not in allowedDomains instead of prompting, When true, the sandbox runtime deterministically denies hosts not in allowedDomains instead of prompting.
Strings lifted out of the shipped bundle, so the claim above can be checked against them.
Related
Other releases about the same thing. Found by shared names or similar wording; neither means one caused the other.
-
v2.1.232
An empty allowedDomains list no longer produces an empty egress allowlist
Both mention sandbox network allowed domain