Lockdown

The Lockdown feature applies a set of hardening policies to selected workloads, restricting their access to:

Lockdown is designed primarily for running AI agents inside sandboxes, where limiting the agent's blast radius is important for security.

Definition

Lockdown policies are specified in the customizations section of a sandbox or template definition:

customizations:
- lockdown:
    apply_to:
    - workspace1
    - container1
    - worker-*
    allow_api_access: false
    allow_ssh_keypair: false
    accessible_secrets:
    - agent-token
    outbound_ip_filters:
    - cidrs:
      - 8.8.8.8/32
      ports:
      - 53
      port_ranges:
      - start: 1000
        end: 3000
      block: true
    dns_filters:
    - names:
      - *.foo
      - a.*.b.*.bar
      - c.**.bar
      block: true

Field Reference

Field Description
apply_to Names or glob patterns matching target workloads. If omitted, applies to all workloads.
allow_api_access If true, allows the workload to access Crafting API using the owner's identity. Default: false.
allow_ssh_keypair If true, allows processes in the workspace to use the owner's managed SSH keypair. Default: false.
accessible_secrets Names or patterns of shared secrets that are allowed to be mounted. Secrets not matching are not mounted.
outbound_ip_filters Rules for filtering outbound connections by destination IP and port.
dns_filters Rules for filtering DNS resolution by name.

Outbound IP Filter Fields

DNS Filter Fields

Multiple Lockdown Sections

Multiple lockdown sections can be specified in customizations. When a workload matches multiple sections, they are merged in order:

Applying and Lifting Policies

A lockdown policy with no apply_to (or an empty list) applies to all workloads. A specific workload matches a policy if any item in apply_to matches its name.

To temporarily lift a policy from a particular workload (e.g. to allow troubleshooting access), modify the apply_to patterns so the workload name no longer matches. This avoids the need to remove the policy entirely.

Interaction with Restriction Mode

If Lockdown is present in the definition together with Restriction Mode on the same workspace, Lockdown is not applied until the workspace exits Restriction Mode. This allows the workspace to perform privileged operations (e.g. provisioning resources) during startup before lockdown takes effect.

See Also