Skip to content
BENIBIX Learn

sandbox.network.deniedDomains

AI⌨️ Claude CodeConfiguration

Also known as deniedDomains

A list of hosts sandboxed commands may never reach.

Think of it like

It is like a street a child may not walk down. Not even a friend can take them there.

Example

Jack allows *.example.com but one subdomain hosts untrusted files. He denies that one host, and it stays blocked.

Why it matters

It cuts one risky host out of a wide allow rule.

Definition

sandbox.network.deniedDomains is a settings key. It blocks the hosts it lists for commands in the sandbox. It uses the same wildcards and ports as allowedDomains. A denied host stays blocked even when an allowed entry matches it too. Lists from all settings files are joined, so anyone can make the list tighter.

Example code

json
{
  "sandbox": {
    "network": {
      "deniedDomains": ["*.pastebin.com"]
    }
  }
}
Block a site where code could be posted.

Common mistake

Thinking a match on the allow list wins. The deny list always wins.

Key takeaways

  1. 1
    Never reach. Listed hosts.
  2. 2
    Beats allow. Always.
  3. 3
    Lists join. Every file.