Skip to content

Container runtime

Parrier runs entirely in Docker. The host runs docker compose and nothing else from Parrier. There is no host execution path: the host sandbox backend is gone, and PARRIER_SANDBOX accepts only docker.

host ── docker compose
│
├─ parrier TUI, CLI, engine. No Docker socket.
│ │ DOCKER_HOST=tcp://docker-proxy:2375
│ ▼
├─ docker-proxy The only container holding /var/run/docker.sock.
│ │ Forwards an allowlist of Engine API calls.
│ ▼
└─ sandbox One container per agent command, created through
the proxy. Mounts only that run's workspace.

Networks:

Network Members Purpose
parrier-control (internal) parrier, docker-proxy API traffic only; no egress
parrier-egress parrier LLM providers and targets
parrier-sandbox-egress sandboxes command egress; unreachable from parrier or the proxy

Mounts:

Where From the host Mode
parrier:/runs parrier_runs/ read-write (artifacts)
docker-proxy:/runs parrier_runs/ read-only (symlink checks)
parrier:/targets targets/ read-only
sandbox /targets/<target> targets/<target> (this run’s target only) read-only
docker-proxy:/targets targets/ read-only (symlink checks)
parrier:/home/parrier/.parrier named volume parrier-home read-write (config, providers)

What Parrier can and cannot ask the daemon for

Section titled “What Parrier can and cannot ask the daemon for”

Can:

  • create a sandbox container named parrier-* with label parrier.sandbox=1, attached to parrier-sandbox-egress, with --cap-drop ALL, no-new-privileges, and only the NET_RAW and DAC_OVERRIDE capabilities. Sandboxes run as root, and DAC_OVERRIDE lets that root write the workspace, which is owned by the parrier user. It bypasses file permission checks inside the sandbox only. Mounts stay the only host-visible paths, and targets stay read-only;
  • bind exactly one run’s <runs>/<run>/workspace at /workspace, read-write, and this run’s own target targets/<target> at /targets/<target>, read-only (nothing for a URL, host or IP target);
  • start, wait on, log, stop, and remove sandboxes it created;
  • pull and inspect the allowlisted sandbox image.

Cannot:

  • privileged mode, host network, host PID or IPC, devices, published ports, extra mounts, / or the whole runs directory, another run’s workspace, the whole targets directory, a symlinked target;
  • act on any container without the label;
  • use any route outside the table: container lists, info, exec on foreign containers, build, volumes, networks, events, image import.

The rules live in internal/dockerproxy and are covered by tests that include mutation checks: relaxing a rule makes its test fail.

  • The proxy is the boundary. It holds the daemon socket, so a bug in its allowlist is a host-level bug. The code is small and tested, but it is still the single trust root. Keep it that way.

  • Sandboxes have egress. A command can reach the LAN and the internet from the host’s network stack. That is needed for real targets, and it is also how a hallucinated command could reach hosts you did not intend. Scope with PARRIER_TARGET_ALLOW and PARRIER_TARGET_BANS. Those are policy, not network isolation.

  • Linux file ownership. Sandboxes run as root with DAC_OVERRIDE, so they can write the workspace. Files they create are root-owned, though, and Parrier (uid 1000) may be unable to change them on a Linux host. Docker Desktop on Windows and macOS maps ownership and does not hit this.

  • Devices are reached through the host’s adb server, not USB. No container gets USB access. Instead ADB_SERVER_SOCKET (default tcp:host.docker.internal:5037, override with PARRIER_ADB_SERVER_SOCKET) points adb and frida inside the parrier container at the adb server on your machine, so every USB device and emulator it sees is usable: discovery, parrier android setup, ensure_frida, the frida_* tools, pull_apk. The image pins the frida python module to the frida-server version Parrier installs (17.10.1) and ships the java/objc bridges prebuilt. With several devices attached, set PARRIER_ANDROID_DEVICE=<serial>; frida follows it too. Android runs’ sandboxes get the same ADB_SERVER_SOCKET, so adb and the frida CLI work from exec_command on the lab image (build-lab). Other target types get no device access.

    Host setup:

    • Docker Desktop (Windows, macOS): nothing. host.docker.internal reaches the host loopback, where adb start-server listens by default.
    • Linux: the default server listens on 127.0.0.1 only, which containers cannot reach. Run adb kill-server && adb -a start-server.

    Warning: adb -a listens on all interfaces, and the adb server has no authentication. Anyone who can reach port 5037 can control every attached device. Firewall the port to the Docker bridge, or set PARRIER_ADB_SERVER_SOCKET to a specific address you control. Also note that an android run’s sandbox can issue any adb command, including adb kill-server, against your host server.

    PARRIER_DEVICE_ADDR still works for devices in adb tcpip mode. Frida injection needs a rooted device (su); parrier android setup says so when it is missing. adb reverse lands on the host loopback, not in a container, so setup_android_proxy needs a Caido reachable there (PARRIER_CAIDO_URL).

  • Caido runs as a per-run sidecar by default. Android device runs start parrier-caido-<run> from the sandbox image, in the same hardened shape as a sandbox. It is published on a free host loopback port that Parrier picks for each run, where adb reverse lands. Set PARRIER_CAIDO_SIDECAR_PORT to pin the port instead. Parrier reaches it at host.docker.internal. The docker proxy allows port publishing only on 127.0.0.1 and only on ports 1024-65535. Linux: host.docker.internal maps to the bridge gateway, which cannot reach a loopback-only port, so the sidecar is Docker Desktop-only for now. A stopped sidecar left behind by a killed run is removed on the next run; a running one belongs to another run and is left alone. Remove a leftover manually with docker rm -f parrier-caido-<run> when no run is active.

  • External Caido instead: set PARRIER_CAIDO_URL=http://host.docker.internal:<port>. That Caido must listen on the host loopback at the same port and be started with --ui-domain host.docker.internal. Otherwise its DNS-rebinding protection answers 403. Without PARRIER_CAIDO_TOKEN, Parrier logs in as a guest, which needs --allow-guests.

  • Host-side conveniences fail. Clipboard copy and “open folder” call host programs. They report an error in the container. Artifacts stay in parrier_runs/.

Terminal window
./parrier.sh build # or ./parrier.ps1 build on Windows
./parrier.sh chat # interactive TUI
./parrier.sh -t https://example.lab --scan-mode quick
./parrier.sh --resume /runs/<run-name>
./parrier.sh build-lab # optional: lab image for android static analysis
docker compose down # stop the stack; keeps parrier-home
docker compose down -v # also deletes parrier-home (config and providers)

The launchers set PARRIER_HOST_RUNS_DIR and PARRIER_HOST_TARGETS_DIR to absolute host paths, create parrier_runs/ and targets/ if they are missing, and call docker compose. The Docker daemon needs those host paths to mount a workspace. Parrier itself never sees the host filesystem beyond those two directories.

Put APKs and other app files in targets/, one per engagement, and give that path as the target (/targets/app.apk). A run’s sandboxes see only that folder, read-only, so one engagement never reads another’s files.

Variable Set by Meaning
PARRIER_HOST_RUNS_DIR launcher Host path of parrier_runs/. Required.
PARRIER_HOST_TARGETS_DIR launcher Host path of targets/. Required.
PARRIER_RUNS_DIR compose (/runs) Runs root inside the container.
PARRIER_SANDBOX_IMAGE .env or shell Sandbox image. Must be allowlisted in the proxy.
PARRIER_SANDBOX_NETWORK compose Must match the proxy’s sandbox network.
PARRIER_SANDBOX_CAP_ADD .env or shell Capabilities a sandbox may add. The proxy enforces the same list.
PARRIER_CAIDO_URL .env or shell External Caido, e.g. http://host.docker.internal:8080. Replaces the per-run sidecar.
PARRIER_CAIDO_SIDECAR_HOST compose How Parrier reaches the sidecar’s published port (host.docker.internal).
PARRIER_CAIDO_SIDECAR_PORT .env or shell Pins the sidecar’s host loopback port. Unset: a free port is chosen per run, so concurrent runs do not collide.
PARRIER_PROXY_REQUIRED .env or shell Default on. A dynamic Android run stops before its first model call unless the device proxy and Caido CA are ready. 0 explores anyway.
PARRIER_CAIDO_TOKEN .env or shell Caido API token. Optional; guest login otherwise.