Skip to main content
Workers are where OASM touches the internet. Every scan runs on a worker, and most scans run inside a connector container that the worker starts for the job. This page describes that runtime from the inside. Connecting and configuring a worker is covered in Worker; writing a connector is covered in Connectors.

Two kinds of tools

  • Built-in tools — subdomain discovery (subfinder), port scanning (naabu), HTTP probing (httpx) and screenshots (a headless browser) — run as processes on the worker. Their binaries are not baked into the worker image: on first start the worker asks the core API’s tool registry for the archives of its OS and architecture (shipped with the core API), downloads the ones it is missing over gRPC, and caches them with their versions in a tools folder that several workers on one host can share.
  • Connectors — every other scanner — are container images from the connector catalog. The worker runs each one as an isolated, short-lived container. Only workers in node mode, which have access to a Docker daemon, claim connector jobs.

Identity and joining

A worker proves who it is in three steps:
  1. Join key. The Connect worker dialog issues a one-time API key for the workspace, valid for five minutes. The core API stores it only in Redis and deletes it on first use, so a leaked key that was already used is worthless. Platform operators can instead start a cloud worker with the platform’s cloud key.
  2. Worker token. A successful join returns a long-lived worker token. The worker persists it to disk and authenticates every later gRPC call with it. Restarting with the same token resumes the same identity — name, scope, history — instead of registering a new worker.
  3. Encryption key. On first start the worker also creates an HPKE key pair and sends the public half with its join. The core API uses it to seal job secrets to this worker. A registered key is never replaced, so a stolen token cannot swap in someone else’s key.
Several replicas can share one state volume: each locks its own token slot, so every replica keeps a distinct identity. The worker’s scope decides what it may claim. A workspace worker claims only its workspace’s jobs; a worker attached to an internal network claims only targets on that network; a cloud worker serves every workspace. The core API enforces this in the claim query itself, not in the worker.

Channels to the core API

All traffic is gRPC, initiated by the worker. Nothing on the worker is reachable from the core API, so workers run fine behind NAT and outbound-only firewalls, and the connection can be wrapped in TLS.

Losing the connection

A dropped stream releases nothing by itself: a core API restart or a network blip does not cost a worker its running jobs. When the worker rejoins, it reports the jobs it is still running; every other job the core API had assigned to it goes back to the queue. A worker that never comes back is removed after 60 seconds without a heartbeat, and its jobs are requeued. See When something goes wrong.

Running a connector

The lifecycle of one connector execution is described in the overview: resolve the image, spawn the container, wait for it to dial back and register, stream the job in, stream findings out, finish. Around that core, the worker manages capacity and failure.

Warm pool

Starting a container costs an image check and a process start. After a clean run the worker keeps the container idle and hands it the next job for the same image, so that cost is paid once.
  • A pooled container runs one execution at a time; parallel jobs get more containers.
  • An idle container is reused only for a job of the same workspace. Configuration and any state a tool leaves behind never cross tenants.
  • Idle containers are removed after an idle timeout, and every pooled container is retired after at most two hours, so configuration changes always reach new containers.

Capacity

A worker has a number of job slots — sized automatically from the CPU and memory it can see (container-aware), or pinned with WORKER_MAX_CONCURRENCY. Each connector declares a CPU, memory and timeout budget in the catalog (default 500m, 512Mi, 600 s), which the worker enforces on the container. A node-wide budget refuses a new container when the host is full; the job then waits for capacity instead of failing.

Failure handling

  • Broken images back off. Consecutive launch failures of one image push its next attempt out exponentially (30 s doubling to 10 minutes), so a bad image cannot burn every slot.
  • Timeouts and cancels. A job that exceeds its timeout, or that a user cancels, is aborted and its container stopped.
  • Orphans are reclaimed. Every container is stamped with a hash of the worker identity. On restart the worker reconciles containers carrying its own stamp, and never touches another worker’s.

Isolation

Connectors run third-party scanners against hostile targets, so each container is treated as untrusted.

The container

  • Read-only root filesystem, with scratch space on an ephemeral tmpfs.
  • no-new-privileges, so setuid binaries cannot raise privileges.
  • Process limit (1,024 PIDs), plus the catalog’s CPU and memory limits.
  • No inbound ports. The connector dials the worker; nothing listens in the container.
  • Per-execution credentials. The callback and the egress proxy each authenticate with a token that is valid for that execution only.
  • No platform secrets. The container gets the job’s own inputs and configuration, nothing else; credentials it echoes are masked before they leave the worker.

The network

Connector containers join a dedicated connector network (WORKER_CONNECTOR_NETWORK) that does not include the database, Redis or the core API. When that network is created as internal — as in the Compose file of the open-asm repository — it also has no route to the internet, and the only ways out are the worker’s callback port and its egress proxy. On a non-internal network, the proxy settings are still injected into every container, but a tool that ignores them can connect directly. The egress proxy is an HTTP and SOCKS5 proxy inside the worker. It enforces one rule — public addresses only:
  • loopback, private, link-local, carrier-grade NAT and reserved ranges are refused, as are well-known cloud metadata hostnames;
  • names are resolved by the proxy and the resulting IPs are checked before dialing (resolve-then-check), so DNS rebinding cannot smuggle a private address through;
  • operators can allow specific private IPs or ranges (WORKER_EGRESS_ALLOW), for example an on-premises Nessus server.
This closes the classic SSRF path of a scanner: a target that redirects or resolves to 169.254.169.254 or to the operator’s own LAN gets a refusal, not a response. Raw port scanners that send packets a proxy cannot carry are the one exception: the catalog marks them egress: direct, and the worker attaches them to the default network as well. Operator settings are listed in Worker.

The host

The worker starts containers through the Docker Engine API, which requires access to the Docker socket. That access is root-equivalent on the host, so the worker is the one privileged component of a deployment: run trusted connector images only, and dedicate the worker host to scanning.

The agent sandbox

The Security Agent can run shell commands on a worker. A global worker serves agents of other workspaces only when it runs with the agent sandbox enabled (WORKER_AGENT_SANDBOX=true); its commands then never run on the worker host. Each AI session gets its own sandbox container:
  • read-only root filesystem, all Linux capabilities dropped, no-new-privileges, a 1 GiB memory cap without swap and a 512-process limit;
  • the built-in tools mounted read-only;
  • none of the worker’s environment, its token, the platform key or the Docker socket.
If the Docker daemon is unreachable, agent commands fail closed instead of falling back to the host. A conversation is pinned to the worker that served it, so follow-up commands land in the same sandbox.

Worker

Connect, configure and scale workers

Job registry

How workers claim jobs and report results

Secrets and encryption

Sealed job secrets and output masking

Connectors

Build your own connector image