How it works
Egress means traffic that leaves the sandbox. An egress allowlist denies all outbound traffic by default. A connection passes only when a rule allows it. Each rule names a domain name, an IP address or a CIDR range.
Why it limits data theft
An agent can read untrusted content, such as a web page or a file. Prompt injection hides instructions in that content. Those instructions can ask the agent to send private data to an outside server. The allowlist blocks that send when the server is not on the list. It does not stop the agent from reading the data. Sandboxes that run untrusted code use this rule to limit where that code can connect.
Domain rules and IP rules
A domain rule often matches the Host header of a plain HTTP request. For HTTPS, it matches the server name in the TLS handshake (SNI). Traffic on other ports may need IP or CIDR rules. Some domain rules do not cover UDP protocols such as QUIC.
DNS
A program looks up a domain name before it connects. Some providers add a rule for a public DNS resolver when you allow a domain. Such a rule can allow all traffic to that resolver, not only DNS. Check this before you rely on the list.
Kubernetes starts from allow
Kubernetes NetworkPolicy starts with the opposite default. A pod allows all outbound connections until a policy isolates it for egress. The network plugin must support NetworkPolicy, or the policy has no effect.
What to check
- Whether the default is deny or allow.
- Whether the list takes domain names, or only IP and CIDR ranges. Some providers accept IPv4 ranges only.
- Whether the rules also cover DNS and UDP traffic.
- Whether you can change the list while the sandbox runs.