Repository navigation
feat(sandbox): enforce egress with a privileged agent (ALIEN-1188) - #840
alongubkin merged 10 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Enclave skipped this draft pull request. It will run automatically when you mark the PR as Ready for review. |
|
@greptileai review |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@greptileai review |
|
Normalize pinned hostnames, refuse raw remote grants, and use only\nnetfilter matches supported by the guest kernel. Enter saved image\nworking directories after dropping privileges. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@greptileai review |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@greptileai review |
AWS ingress does not populate guest INPUT connection tracking. Allow\nACK-bearing kernel TCP replies while new outbound SYN packets still\nrequire a declared destination. Commands cannot forge raw packets. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@greptileai review |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@greptileai review |
Use the supported native socket uid match instead of the unavailable iptables owner extension. Preserve privileged transport initialization across image restore while enforcing default-deny command egress. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@greptileai review |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@greptileai review |
1 similar comment
|
@greptileai review |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@greptileai review |
A sandbox can opt into
privilegedSupervisor: { commandUid: 60001 }to have Alien's agent install its declared egress policy before serving exec requests or starting image code. The agent is the privileged entrypoint; the saved OCI Entrypoint/Cmd, exec requests, and detached jobs run under the declaration-owned non-root uid with zero capabilities and an irreversible privilege drop. Callers cannot select the identity or override the startup policy.AWS cloud egress stays open and the extra OS capability grant is internal. Before creating worker threads, the supervisor installs a dedicated native IPv4 nftables table selecting the command uid, then reduces its capabilities. Native socket uid matching works on the guest kernel even though the iptables owner extension is unavailable. Root traffic remains available for AWS's internal transport initialization after image restore. Commands inherit seccomp denying IPv6 sockets, io_uring, and alternate syscall ABIs: the real MicroVM has an IPv6 default route, while IPv6/inet netfilter tables are unavailable. Disabling IPv6 globally breaks AWS transport.
allowDomainspins public IPv4 addresses into the built image version, with canonical and dotted hostname aliases. Other services sharing those addresses remain reachable; rebuild and redeploy the image to refresh DNS. Restarting or resuming a session retains the pinned addresses. Restricted policies deny command DNS before accepting loopback or established traffic. No proxy, firewall, or new connector resources are added. Backends without this supervisor path, including Local and Kubernetes, refuse the opt-in at plan time. Raw remote cloud grants are also refused because they permit selecting retained image versions with different security policies; ordinary workload bindings select the active version.Compatible bundles preserve OCI argv, environment, and working directory in root-owned metadata. Startup refuses older incompatible bundles. The default sandbox base includes nftables; build instructions and policy limits are in
crates/alien-sandbox-agent/README.md.Validation:
00000000000011eb. Caller environment overrides do not change identity or policy. example.com returns HTTP200, 1.1.1.1 times out, IPv6 sockets fail EPERM, andnft flush rulesetfails. Hostname aliases resolve identically. A detached preview service also answers HTTP200 through AWS ingress after restore. All probe resources deleted afterward.🤖 Generated with Claude Code