task.toml file at varying degrees of granularity. How you choose to specify depends on your environment affordances and use case.
Example
task.toml

Network policy across phases in the shared sandbox
In this example, downloading and installing the agent still works because
agent.setup() uses the public [environment] baseline. [agent] applies
only to agent.run(). If a phase has no override, it inherits its sandbox’s
baseline policy.Network modes
Harbor supports three network modes:public, no-network, and allowlist.
Provider-specific limitations
Provider-specific limitations
¹ Single-container tasks only (not in Docker Compose mode).
² Docker Compose (multi-container) tasks only.
³ Docker and Podman support requires Linux containers; Windows containers do not support this network policy mode.
⁴ Docker and Podman support requires Linux containers and local runtime support for the nftables kernel features used by Harbor’s egress-control sidecar.
⁵ Beam resolves concrete hostnames to IP CIDRs before applying the policy; wildcard host entries are not supported.
⁶ TensorLake allowlists accept exact hostnames, leading-wildcard hostnames (a wildcard matches subdomains at any depth but not the apex domain), IPv4 literals, and IPv4 CIDR ranges, but not IPv6 targets.
⁷ Vercel allowlists are available for single-container tasks only. They match domain rules on the TLS SNI, accept exact and leading-wildcard hostnames but not IP literals or CIDR ranges, and deny plain-text HTTP to an allowlisted host. The policy applies from sandbox creation and can be updated on a running sandbox. Compose tasks support
⁸ Islo supports dynamic network policy only when no custom gateway profile or gateway configuration is supplied.
² Docker Compose (multi-container) tasks only.
³ Docker and Podman support requires Linux containers; Windows containers do not support this network policy mode.
⁴ Docker and Podman support requires Linux containers and local runtime support for the nftables kernel features used by Harbor’s egress-control sidecar.
⁵ Beam resolves concrete hostnames to IP CIDRs before applying the policy; wildcard host entries are not supported.
⁶ TensorLake allowlists accept exact hostnames, leading-wildcard hostnames (a wildcard matches subdomains at any depth but not the apex domain), IPv4 literals, and IPv4 CIDR ranges, but not IPv6 targets.
⁷ Vercel allowlists are available for single-container tasks only. They match domain rules on the TLS SNI, accept exact and leading-wildcard hostnames but not IP literals or CIDR ranges, and deny plain-text HTTP to an allowlisted host. The policy applies from sandbox creation and can be updated on a running sandbox. Compose tasks support
public and no-network only.⁸ Islo supports dynamic network policy only when no custom gateway profile or gateway configuration is supplied.
Phases
Network policies can be specified for the following phases:
Baseline phases are subject to the environment supporting the requested network mode (see the table above).
These phases can also be specified at the step-level, when using multi-step tasks.
Capabilities
EachBaseEnvironment implementation declares an EnvironmentCapabilities model describing what it can do. The following capabilities govern network policy enforcement:
Full feature grid
Full feature grid
Provider-specific limitations
Provider-specific limitations
¹ Single-container tasks only (not in Docker Compose mode).
² Docker Compose (multi-container) tasks only.
³ Docker and Podman support requires Linux containers; Windows containers do not support this network policy mode.
⁴ Docker and Podman support requires Linux containers and local runtime support for the nftables kernel features used by Harbor’s egress-control sidecar.
⁵ Beam resolves concrete hostnames to IP CIDRs before applying the policy; wildcard host entries are not supported.
⁶ TensorLake allowlists accept exact hostnames, leading-wildcard hostnames (SDK 0.5.110+; a wildcard matches subdomains at any depth but not the apex domain), IPv4 literals, and IPv4 CIDR ranges, but not IPv6 targets.
⁷ Vercel allowlists are available for single-container tasks only. They match domain rules on the TLS SNI, accept exact and leading-wildcard hostnames but not IP literals or CIDR ranges, and deny plain-text HTTP to an allowlisted host. The policy applies from sandbox creation and can be updated on a running sandbox. Compose tasks support
⁸ Islo supports dynamic network policy only when no custom gateway profile or gateway configuration is supplied.
² Docker Compose (multi-container) tasks only.
³ Docker and Podman support requires Linux containers; Windows containers do not support this network policy mode.
⁴ Docker and Podman support requires Linux containers and local runtime support for the nftables kernel features used by Harbor’s egress-control sidecar.
⁵ Beam resolves concrete hostnames to IP CIDRs before applying the policy; wildcard host entries are not supported.
⁶ TensorLake allowlists accept exact hostnames, leading-wildcard hostnames (SDK 0.5.110+; a wildcard matches subdomains at any depth but not the apex domain), IPv4 literals, and IPv4 CIDR ranges, but not IPv6 targets.
⁷ Vercel allowlists are available for single-container tasks only. They match domain rules on the TLS SNI, accept exact and leading-wildcard hostnames but not IP literals or CIDR ranges, and deny plain-text HTTP to an allowlisted host. The policy applies from sandbox creation and can be updated on a running sandbox. Compose tasks support
public and no-network only.⁸ Islo supports dynamic network policy only when no custom gateway profile or gateway configuration is supplied.

