Skip to content

Container Sandbox ​

Every container a flow starts (container.run steps, the container-backed tool steps, lab nodes, images a step builds) runs on a dedicated Docker-in-Docker daemon, the dind service, and never on the host's Docker daemon. This page describes how the sandbox is wired, how the worker reaches lab devices through it, and how flow egress policies are enforced on it. It is for contributors; operators start at Production Hardening, and flow authors at Flows.

Layout ​

text
host Docker daemon (one compose stack)
├── api, worker × N, postgres, temporal, ...   compose default network
├── dind        privileged docker:dind, fixed address, data in dind-data
│   └── sandbox daemon
│       ├── step containers (container.run, ansible, tf, ...)
│       ├── hegemony-egress-<digest16> policy networks
│       └── lab nodes and a bastion, when a flow deploys a lab
├── dind-init   one-shot: registers volumes, stamps the marker, pre-pulls
└── egress-nflog  ulogd2 in the dind netns: sampled egress denials as JSON

worker ── tcp://dind:2375 (per docker invocation) ──▶ sandbox daemon
worker ── SSH / SOCKS5 to the bastion ──▶ lab devices
worker ── /var/run/docker.sock ──▶ host daemon (worker-id derivation only)

The sandbox lives in deploy/compose/docker-compose.dind.yml. It is not an optional overlay: deploy/compose/dc.sh, the compose Taskfile and the appliance apply it to every stack, SERVICES=core included, and any other entry point that assembles a compose file list must add it too (tests/deploy/test_dind_overlay.py checks every launcher).

The dind Service ​

  • Image docker:28-dind, privileged: true, init: true (tini as PID 1), restart: unless-stopped. The engine must be 26.1 or newer for the volume-subpath mounts that shared workspaces use.
  • A named data volume dind-data at /var/lib/docker. Images, containers, inner volumes and networks survive recreating dind; down -v clears the whole flow-container estate in one step.
  • The compose volume shared-workspaces mounted at /data/shared, the same bytes the worker manages there.
  • Daemon flags: --mtu=${HEGEMONY_DIND_MTU:-1500}, --ipv6 --ip6tables and --fixed-cidr-v6=${HEGEMONY_DIND_FIXED_CIDR_V6} for a dual-stack inner default bridge.
  • DOCKER_TLS_CERTDIR= (empty), so the image's dockerd-entrypoint.sh serves unix:///var/run/docker.sock plus plain tcp://0.0.0.0:2375. The command must not repeat --host flags: duplicate listeners abort dockerd.
  • A wrapping entrypoint that restricts the API port before dockerd starts; see Daemon API transport.

Compose Network and Fixed Addresses ​

The overlay declares the stack's default network: dual-stack (enable_ipv6: true), with HEGEMONY_COMPOSE_SUBNET / HEGEMONY_COMPOSE_SUBNET_V6, their gateways, and an ip_range per family (HEGEMONY_COMPOSE_IP_RANGE, HEGEMONY_COMPOSE_IP_RANGE_V6). dind takes fixed addresses HEGEMONY_DIND_IPV4 and HEGEMONY_DIND_IPV6 inside the subnets and outside the ranges. The range confines dynamic allocation to the upper part of the subnet: at host boot the daemon starts containers in any order, and without it a sibling could draw dind's address first and leave dind unable to start. tests/deploy/test_dind_overlay.py checks that every fixed address sits inside its subnet and outside its range, for the defaults and every env example.

Stacks that share a host need distinct subnets (the env examples pin their own) that avoid the sandbox's inner default bridge, 172.17.0.0/16. Changing the subnet of an existing stack needs down and up. Inner IPv6 traffic is NAT66'd twice: inner ULA, then dind's compose-network address, then the host's uplink.

dind-init ​

A docker:28-cli one-shot (restart: "no") that runs once dind is healthy, with DOCKER_HOST=tcp://dind:2375. It:

  1. registers a bind-backed named volume over /data/shared named HEGEMONY_SHARED_WORKSPACE_VOLUME (see Shared workspaces);
  2. creates the marker volume hegemony-sandbox-marker labelled hegemony.sandbox.token=${HEGEMONY_SANDBOX_TOKEN} (see Attestation);
  3. pulls the egress helper image (HEGEMONY_CONTAINER_EGRESS_HELPER_IMAGE, default docker:28-dind), best effort: a failed pull prints a warning and the first policied step pulls it inline, reporting progress as run events.

docker volume create is idempotent and every record lives in dind-data, so dind-init does not need to run again after a restart. The worker depends on it with service_completed_successfully: if a step's --mount reached the daemon first, dockerd would auto-create a plain empty volume under the same name. Flow-step images are not pre-pulled; the container.run pull reports byte progress instead.

egress-nflog ​

ulogd2 with network_mode: "service:dind" and NET_ADMIN, because nfnetlink_log groups are netns-scoped. It reads NFLOG group HEGEMONY_CONTAINER_EGRESS_NFLOG_GROUP (compose sets 32; the setting's own default 0 emits no NFLOG rules) and writes each sampled packet as one JSON line to HEGEMONY_CONTAINER_EGRESS_NFLOG_FILE on the egress-nflog volume, which the worker mounts read-only. Losing the sidecar degrades the report, never enforcement.

Daemon Selection ​

HEGEMONY_CONTAINER_DOCKER_HOST (container_docker_host in packages/core/settings.py) names the sandbox daemon. The overlay sets it to ${HEGEMONY_CONTAINER_DOCKER_HOST:-tcp://dind:2375} for the worker and the API, so an unset or empty value still resolves to the sandbox. The worker refuses to start with it empty; there is no host-daemon fallback.

The container handler, the container janitors and egress enforcement pass it as DOCKER_HOST per docker invocation (ContainerRuntime.docker_host, filled by WorkerHandlerServices.container_runtime() in apps/worker/step_handlers/services.py). It is never exported process-wide: the worker-id derivation in apps/worker/run.py asks "which container has my hostname as its id", which only the daemon hosting the worker can answer. That query is the only use of the host socket the worker still mounts (HEGEMONY_WORKER_ID skips it).

Parameter Semantics ​

Bind sources, network names and namespaces resolve against the daemon that runs the container, so step parameters keep their meaning one level down:

Step paramResolves to
network_mode: hostthe dind container's network namespace
network_mode: <name>a network on the sandbox daemon
privileged, pid_mode: hostpower over the dind container, not the host
extra_mounts source pathsthe dind container's filesystem (/var/lib/docker is the dind-data volume)
attach_docker_socket: truethe sandbox daemon's own unix socket

attach_docker_socket needs no special handling: the handler's -v /var/run/docker.sock:/var/run/docker.sock bind resolves on the dind filesystem, where that path is the sandbox daemon's socket. A step granted it is an administrator of the whole sandbox by design, which is why the option needs admin (Handler-level narrowing).

Shared Workspaces ​

Pinned steps mount their run's workspace with --mount type=volume,source=<vol>,target=/shared,volume-subpath=<run_id>. <vol> is the bind-backed volume dind-init registers over /data/shared inside dind, which is the same shared-workspaces compose volume the worker mounts at HEGEMONY_SHARED_WORKSPACE_ROOT. So the worker's <root>/<run_id> directories, its run-end cleanup and the stale-workspace janitor (apps/worker/container_cleanup.py) all act on the bytes steps see.

HEGEMONY_SHARED_WORKSPACE_VOLUME is required, not defaulted, because one sandbox file serves both base files and the name must match the base file's volume (hegemony-dev-shared-workspaces or hegemony-prod-shared-workspaces). The worker and dind-init read the same expression, so they cannot disagree. docker cp staging does not depend on the daemon and needs nothing.

Daemon API Transport ​

The worker, the API's image-prune job and dind-init reach the daemon at tcp://dind:2375, TLS off. It is acceptable because the port is served on the stack network only, which is inside the sandbox's trust boundary:

  • The port is never published to the host. Never publish 2375 or 2376.
  • Before dockerd starts, the dind entrypoint finds the interface holding HEGEMONY_DIND_IPV4 (by address, not name) and inserts iptables and ip6tables INPUT rules dropping TCP 2375 and 2376 on every other interface: the inner default bridge, user and policy bridges, and loopback. dind does not start when no interface holds the address or a rule is refused. The rules run on every start, in the fresh netns each start gets.
  • Flow containers, with or without an egress policy, reach the daemon only through an attach_docker_socket bind.
  • Egress enforcement also drops the API port for every policy subnet and bridge, so a policied step stays closed on a sandbox started without this entrypoint.

The setting also accepts a unix:// URL, for a deployment that shares a socket volume over dind's /var/run with the worker and wants no TCP listener at all; the shipped compose files do not wire one, and the API's image-prune job supports only tcp:// endpoints. TLS on 2376 is not supported.

Attestation ​

HEGEMONY_SANDBOX_TOKEN is a deployment-scoped marker value. Compose passes it to dind-init, which stamps it on hegemony-sandbox-marker, and to the worker and API as HEGEMONY_CONTAINER_SANDBOX_TOKEN. The comparison is one function, sandbox_token_matches in packages/core/egress.py (both sides stripped, constant time, an empty token matches nothing), used by three checks:

  • worker startup, which refuses to run against a daemon that does not attest;
  • egress enforcement, which re-reads the marker before programming any rule, because the daemon behind an endpoint can change while the worker runs;
  • the image-prune job, which deletes nothing on a daemon that does not attest.

This guards against misconfiguration (an endpoint pointed at the host's socket or another daemon), not against an attacker who already controls the worker's environment or the daemon. docker volume create never relabels an existing volume, so rotating the token means removing the marker first; see Rotating the sandbox token.

Startup and Restarts ​

  • Worker startup (apps/worker/run.py). An empty endpoint or token, or a daemon that answers without a matching marker, makes the worker exit non-zero. wait_for_sandbox_daemon holds the janitors and Temporal pollers back until the daemon answers, for at most HEGEMONY_CONTAINER_DOCKER_WAIT_SECONDS (default 120; 0 skips the wait but still probes once). Past the deadline the worker starts degraded: attest_sandbox_when_reachable keeps probing, WorkerHandlerServices.container_runtime() refuses every container step until the process-wide SANDBOX_ATTESTATION covers the endpoint, and a late daemon that then fails the marker check stops the worker.
  • Capability advertisement. The heartbeat advertises containers only after attestation, so shared-worker assignment pins no new shared or explicit run to a degraded worker. A starting worker first sends one heartbeat with no capabilities to withdraw what its previous process advertised. A run already pinned to it keeps its pin.
  • Janitors sweep only an attested daemon: at startup, or right after a late attestation, before container steps are enabled.
  • dind restart. Every inner container stops; images, inner volumes and networks, the workspace registration and the marker persist in dind-data. Steps in flight fail and follow their retry policy. Containers with no restart policy (lab nodes) stay down until the flow that deployed them runs again. Egress rules live in the dind netns and are gone, which is why the worker re-asserts them before every policied launch.
  • Host reboot. dind, the worker and every other long-running service carry restart: unless-stopped. dind-init stays Exited (0) and is not re-run, which is correct because its records survive in dind-data. The remaining edge is losing dind-data without recreating the stack, which in practice only happens with down -v, and that removes dind-init too.

Cleanup and Disk Growth ​

apps/worker/container_cleanup.py owns containers on the sandbox:

  • the startup janitor removes created, exited or dead flow containers whose last activity is more than an hour old, skipping running ones and those whose hegemony.stack label names another stack, so stacks or replicas sharing a daemon never reap each other's;
  • sweep_containers_of_ended_runs runs every HEGEMONY_CONTAINER_SWEEP_INTERVAL_SECONDS and stops, then removes, step containers whose run ended at least two minutes ago;
  • cleanup_orphaned_egress_networks (in apps/worker/egress_enforcement.py) removes unattached policy networks at startup, together with their DOCKER-USER jumps and chains, because Docker recycles subnets.

The sandbox_image_pruning maintenance job (apps/api/services/maintenance/jobs/sandbox_image_pruning.py) reclaims the two regenerable categories over the Engine API: dangling images and, with HEGEMONY_MAINTENANCE_SANDBOX_PRUNE_BUILD_CACHE, build cache. It runs every HEGEMONY_MAINTENANCE_SANDBOX_IMAGE_PRUNING_INTERVAL_SECONDS (default six hours). A missing endpoint or token, an unreachable daemon, or one that does not attest fails the job run, so a sandbox that is never pruned shows in platform health.

Not reclaimed automatically: stopped containers (the worker's grace period applies, so the API would race a replica provisioning a step), tagged but unused images (the daemon has no last-used signal, and until= filters match the build date), and inner volumes, which can hold flow data. Reclaim those with docker system prune -a inside dind, or down -v.

MTU ​

Bridges and veth pairs add no encapsulation, so nesting does not shrink the MTU. The risk is an outer path MTU below 1500 (VPN or overlay uplinks). Three places must then agree: the compose network, the sandbox daemon's networks (HEGEMONY_DIND_MTU), and any network a flow creates on the sandbox, such as a containerlab management network with its own mtu. Keep each inner MTU at or below the outer effective MTU; the defaults (1500) suit plain Ethernet. Check with docker network inspect or ip link inside dind. Worker traffic to lab devices rides TCP through the bastion, so it is not affected by PMTU blackholes.

Bastion Access to Lab Devices ​

The worker has no route into networks on the sandbox. In-process handlers (network CLI, shell.execute, probes, monitors) reach devices there through a bastion the lab flow deploys on the sandbox and publishes in the dind netns: SSH for ProxyJump and an authenticated SOCKS5 listener for TCP probes. Neither listener is published to the host. The same mechanism serves production management networks that are reachable only through a jump host.

A device declares the hop in access_config.jump_host:

yaml
access_config:
  ssh:
    username_ref: "..."
    password_ref: "..."
  jump_host:
    host: dind            # any host the worker can resolve
    port: 2222            # default 22
    username_ref: "..."
    password_ref: "..."   # or private_key_ref; one is required
    allow_legacy_ssh: false
  • Validation. apps/api/services/inventory/validation.py keeps the jump_host refs and literals when an inventory provider supplies them, so a provider's default block reaches the stored device. _resolve_jump_host_refs in apps/worker/step_handlers/credentials.py fails on a malformed block, so a declared bastion is never silently bypassed.
  • Transport. apps/worker/shell_transport.py and HandlerServices.connect() open SSH session one to the jump host with the bastion's credentials only, then run the device session inside a forwarded channel, end to end encrypted: the bastion never sees device credentials or session content. Both hops verify host keys (SSH Host Keys) and share one connect budget. The transport wheels in hegemony-step-plugins implement the same hop for asyncssh, netmiko and scrapli.
  • SOCKS probes. Probe checks take a socks_proxy option (socks5[h]://[user:pass@]host:port, credentials as secret refs). ICMP cannot cross a proxy; use a tcp_connect check on port 22 for tunnelled liveness.
  • The device form and the Device Detail page show the jump_host fields.

Egress Policies ​

Outbound firewall rules for container steps, declared per flow and per step and enforced inside the sandbox; worker-side steps get a userspace gate with the same semantics.

Policy Model ​

  • Flow level: a top-level network_policy block in definition_json, validated by FlowNetworkPolicy / FlowEgressPolicy in apps/api/schemas.py:

    yaml
    network_policy:
      egress:
        mode: allow-listed        # open (default) | allow-listed | deny-all
        allow:
          - "10.20.0.0/24"        # CIDR, every port and protocol
          - "[::/0]:443/tcp"      # IPv6 in brackets, with port and protocol
          - "gitea:3000"          # service:port, resolved at enforcement
        deny:
          - "169.254.169.254"     # a bare address is a /32; deny wins
  • Step level: flat egress_mode, egress_allow and egress_deny params on every container-backed step.

  • Grammar: packages/core/egress.py is the platform's authority, so admission and enforcement never import a plugin wheel. Each list holds at most MAX_EGRESS_RULES (128) rules.

  • Resolution (resolve_effective_egress): effective policy = flow ∩ step. A step may only narrow: the more restrictive mode wins, allow lists come from the step when it is allow-listed, and deny lists are unioned. An unknown mode in stored JSON raises, and the step fails rather than running under a permissive policy.

Admission ​

  • _ensure_run_container_egress_authorized (apps/api/routers/flows/lifecycle.py, built on apps/api/services/egress_admission.py) rejects bad grammar with a 400 for everyone and widening past the flow policy with a 403 unless the principal holds admin.
  • An egress policy cannot be combined with the host-access options (network_mode, attach_docker_socket, privileged, pid_mode, extra_mounts) or with network_disabled. Each either makes the step a sandbox administrator or bypasses the policy network. It is a 400 for everyone, admins included, and the worker's dispatch re-checks it and fails closed.
  • A node's handler id is not trusted alone, because the API may lack the wheel a worker loads: egress and host-access fields are admitted by name on every node, the same fields under node.config are refused, and a step whose handler the API does not know is refused on create, update, duplicate, draft save and restore.
  • Imports carry no principal. clamp_container_egress_for_import treats repository content as non-admin, narrows widened step params, reports every dropped rule, and fails the import on grammar errors or host-access conflicts.

Enforcement ​

prepare_step_egress in apps/worker/egress_enforcement.py, called from the step dispatch in apps/worker/flow_activities.py, does the following for each container step:

  1. An open policy with no deny rules needs nothing. deny-all runs the container with --network none. A step with network_disabled is already narrower than any policy. An image build gets the default network only under an open policy, and none otherwise.
  2. Otherwise the endpoint must be set, attested by this process, and carry its marker now; anything else fails the step closed.
  3. service:port rules resolve through the worker's resolver, to both address families; an unresolvable service fails the step.
  4. The policy's identity is an HMAC-SHA256 of its canonical JSON keyed with the sandbox token, so replicas and restarts map one policy to one network. Rules are canonicalized (host bits masked, single-port ranges collapsed, IPv6 compressed) before hashing.
  5. The network hegemony-egress-<digest16> is ensured with enable_icc=false, dual-stack with a ULA /64 derived from the digest whenever the daemon supports it, and labelled with the full digest and the canonical policy. A reused network whose stored policy differs fails the step rather than merging isolation domains.
  6. A short-lived helper container (HEGEMONY_CONTAINER_EGRESS_HELPER_IMAGE, the same image as dind so the iptables backend matches) runs with --network host --cap-add NET_ADMIN on the sandbox and programs the rules. It aborts if DOCKER-USER is missing instead of creating it.
  7. The handler attaches the container to the policy network (ContainerRuntime.docker_network) with a MAC derived from the step run id (container_mac) for per-step accounting.

Each family's rules live in a chain named for its content, HEG-<hash12>, in this order:

  1. -i <bridge> ! -s <subnet> -j DROP: anti-spoofing, when the bridge is known;
  2. -d <subnet> -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT: replies;
  3. -s <subnet> -d <subnet> -j DROP: container-to-container isolation, which ICC off alone does not guarantee once a broad allow ACCEPT is terminal;
  4. one DROP per deny rule;
  5. for allow-listed, one ACCEPT per allow rule, then -s <subnet> -j DROP.

DOCKER-USER jumps to the chain with -s <subnet>, -d <subnet> and, when the bridge is known, -i <bridge>, each commented hegemony-egress-<digest16> for ownership and cleanup. Because DOCKER-USER hangs off FORWARD, the same chain is also reached from INPUT, under an unconditional DROP of the daemon's API port (daemon_api_ports), so no policy mode lets a container dial the Docker API on its bridge gateway address.

A new chain is built in a per-launch staging chain (HEGT-<nonce>-<family>), renamed into place, and switched to with one atomic jump replacement; an unchanged policy finds its chain present and does nothing. Several replicas can program one daemon at once, and a packet always meets one complete rule set. Superseded chains are reaped once nothing jumps to them.

Reporting ​

After a policied step the worker reads its counters and emits one run event, Egress report [...]: N packet(s) dropped, M accepted, with per-rule attrs. Attribution comes from a per-container accounting chain (HEGC-<hash12>, see _accounting_specs): a counting-only mirror of the policy rules scoped to the step's MAC, installed above the policy jump. Every rule in it RETURNs, so a wrong mirror costs accuracy, never containment. A MAC counts what a step sent; replies stay with the shared chain. A step with no run id, or whose mirror the daemon rejects, reports the policy network's shared counters and says so. Accounting chains are swept on every launch, keeping those whose container is attached or that are younger than 30 minutes.

With an NFLOG group set, each drop rule in the mirror has a rate-limited NFLOG sampler ahead of it, prefixed <digest8>:<mac>, and the report adds "denied destinations (sampled)" from the egress-nflog stream. Sampled numbers legitimately differ from the exact counters.

Results land in three places: the run event, StepOutput.metrics["egress"] (totals only), and egress_report artifacts holding the full detail and, built by apps/worker/egress_evidence.py, the egress-policy record of what was enforced. Artifacts are redacted with the step's secrets. The user-facing fields are in Egress policy in the evidence.

Enforcement Limits ​

  • Dual-stack. Each family is governed by its own table. open leaves a family with no deny rules open; allow-listed default-drops every family, so a family the policy never names is closed. On a daemon without ip6tables the network falls back to IPv4 only, and a policy naming IPv6 destinations then fails closed.
  • Embedded DNS. Docker's resolver (127.0.0.11) forwards queries from the daemon's own netns, which FORWARD rules never see, so a policied container can still resolve names: a low-bandwidth side channel. deny-all has no resolver. Rules are CIDR, port and protocol only.
  • Published ports match after DNAT. A service another sandbox container publishes is rewritten to its inner address before FORWARD, so an allow rule for it must name the target's inner network, not the dind address. service:port shorthands are for worker-side and external targets.
  • Point-in-time resolution. service:port rules resolve at each policied launch; an address that moves mid-step keeps the old rule until the next.
  • Open mode shares the default bridge. Only policied steps get an isolated network; concurrent open steps can reach each other.
  • The workload is the boundary. Policies defend against code inside a container, not against a step handed the daemon; admission refuses that combination.
  • Stack network. The API port is closed to every sandbox bridge, but services on the stack network can reach it, which is inside the trust boundary by design.
  • Distinct-policy ceiling. One bridge per distinct effective policy, from Docker's default address pools (roughly 30), swept at worker startup only.

Worker-Step Policy Gate ​

Network CLI, shell, probe and monitor steps run inside the worker process, where per-step kernel rules are impossible: one netns serves concurrent flows with different policies, the worker has no NET_ADMIN, and its own traffic (Temporal, the API, the secret store) must stay unconstrained. Instead, apps/worker/egress_gate.py binds the flow's policy for the executing step in a contextvar, and the platform's connection brokers check every destination before dialling:

BrokerChecks
HandlerServices.connectthe device and the jump host, before resolving any secret
open_shell_transportthe same two hops
HandlerServices.run_probethe target, and the socks_proxy endpoint when set
HandlerServices.start_monitorevery target, once at start
HandlerServices.enforce_egressfor handlers that open their own socket (probe.http, probe.wait_reachable)

rule_matches_address in packages/core/egress.py mirrors the iptables specs: a port-less rule matches any port and protocol, a ported rule only TCP or UDP dials in range. Hostnames resolve in the worker and every resolved address must pass; an unresolvable name under a restrictive policy is refused. dns_resolve checks are exempt because nothing dials the target.

A denied one-shot dial fails the step. A denied monitor target is carried as blocked and reports a failed policy_denied sample every tick, as a container keeps running while its denied pings fail; the verdict is fixed at start, because the monitor's task holds a frozen copy of the step's context. Refusals and accepted connections are reported after the step as an egress report run event and the egress-report-worker artifact.

This is enforcement against configuration, not malicious code: worker handlers are trusted platform code, and untrusted workloads belong in container steps. Any handler that opens its own connection must call enforce_egress. Notification dispatch and internal API traffic are exempt.

Hosts and Workers ​

There is exactly one sandbox per host, shared by every worker replica on it: the dev and prod stacks run deploy.replicas: 2 workers against one dind.

  • A host's replicas already share its kernel, its shared-workspaces volume and any lab on its sandbox, so a private sandbox per replica would add no isolation. Concurrent programming of one daemon is safe because of the content-named, atomically published chains and the janitors' grace and stack checks.
  • A sandbox is host-local (privileged, host kernel, host-local data volume), so it is never shared across hosts. A wedged or full sandbox takes down container steps for that host only.
  • The sandbox token is deployment-scoped: each host's dind-init stamps the same HEGEMONY_SANDBOX_TOKEN, and each worker attests its own host's daemon.

A remote worker host runs the same shape: its own dind on a host-private network, with HEGEMONY_CONTAINER_DOCKER_HOST pointing at it and never reachable from another host. Its cross-host dependencies are Temporal, the API and the secret store, plus registry access for its sandbox.

Workspaces, the image store, files a flow writes inside dind and any lab bastion are per host. A run that shares files between steps, builds an image in one step and runs it in another, or reaches a lab must run on one host. execution_affinity: shared or explicit provides that: it pins the run to one worker, and so one host and one sandbox, through the per-host queue hegemony-host-<worker_id> (apps/worker/run.py, apps/worker/flow_workflow.py). On a single host every worker shares the sandbox, so pinning matters only once hosts differ.

Tests ​

  • tests/deploy/test_dind_overlay.py: compose wiring, the API-port rules, address fences, and that every launcher applies the overlay.
  • tests/core/test_egress.py: grammar, resolution, canonical form and digests.
  • tests/worker/test_egress_enforcement.py: generated firewall scripts, fail-closed paths, network reuse, accounting and reports.
  • tests/worker/test_egress_docker_integration.py: the rules and the dind entrypoint against a real daemon.
  • tests/worker/test_egress_gate.py: the worker-step gate.
  • tests/worker/test_connect_jump_host.py, tests/api/test_access_config_jump_host_validation.py: the bastion hop.

Released as open source under the AGPL-3.0-or-later license. Development is sponsored by Rexonix s.r.o. Contact — [email protected].