Security

lea’s security model

The boundary is the container and its proxy, not a prompt. Even a prompt-injected agent with every permission granted works inside these walls.

What an agent can reach

What an agent in lea can reach
ResourceReachable
The projects directory, read/writeYes
An allow-list of ~/.claude, read-onlyYes
~/.claude/projects/<slug>, this projects directory’s Claude Code transcripts, read/writeYes
Public HTTP and HTTPS on the egress allowlistYes
Git over SSH to the endpoints you pin, with lea’s keyYes
Its own rootless containersYes
The sockets of the locks lox run runs, mounted read-only (writes wait for your approval)Yes
~/.ssh, ~/.aws, ~/.kube and the rest of your homeNo
Private and link-local addresses: your NAS, intranet, cloud metadataNo
Host services listening on 0.0.0.0No
A DNS resolver: of your host, your network or the internetNo
Your Docker socketNo
Your clipboard (lea writes to it, never reads it for an agent)No
A Lock’s credentials, its hub, its audit logNo

Each agent network is isolated from the host: the host has no address on it (Docker Engine 28.0 or later). lea refuses to start a container on a network that is not, unless you set LEA_ALLOW_GATEWAY=1 (Podman, or a Docker Engine older than 28.0): the host’s services are then reachable from the agents’ network.

Egress

By default the allowlist holds the forges (GitHub, GitLab), the package registries (Go, npm, yarn, PyPI), the image registries, the Fedora and Alpine mirrors of nested builds and the model APIs (Anthropic, and openai.com and chatgpt.com for Codex), on ports 80 and 443. Each domain covers its subdomains; anything else is refused. LEA_EGRESS_ALLOW='*' opens every domain; with LEA_LOCKHTTP=1 the LockHTTP gate decides the destinations instead of the list.

Only you change it, on the host: lea egress allow, lea egress deny, or LEA_EGRESS_ALLOW in ~/.config/lea/lea.conf. No agent, MCP tool or allowance reaches it.

A host of your network is reached only once listed in the internal-hosts file (LEA_INTERNAL_HOSTS is its path, by default config/internal-hosts in lea’s installation), one <host or IPv4> <ports> entry per line, and an internal name grants that name only: the proxy checks the TLS handshake’s server name.

The agents resolve no external name: lea starts their container with a resolver address that is never routed, so no lookup, from an agent or a container it starts, reaches your host’s resolver or the internet. The proxy resolves names for them. lea doctor fails on a container that resolves an external name.

What an agent can read

No API key or token is in the agent container’s environment or image. What lea gives the agents, though, they run as the owner of. lea doctor lists what is there, by path, never by value.

Credentials in the lea container
CredentialReadable by the agents
Claude Code’s and Codex’s logins (lea’s own, per projects directory)yes: the agent refreshes them
GitHub token (lea github login)no: in the proxy, usable through gh and git
Other forges, registry loginsyes
lea’s SSH keyno: usable through the ssh-agent socket only
Provider API keysno: in the proxy, usable through the key forwarder
Kubernetes view token (lea kube refresh, at ~/.kube/lea)yes: read-only, valid 8 h

Keep the readable ones narrow: a forge token limited to its projects, registry logins for the registries the agents need.

Inside the container

The entrypoint drops to your uid with no effective capabilities. The image has no sudo and no setuid file; only newuidmap and newgidmap keep the file capabilities rootless Podman needs (cap_setuid, cap_setgid), which is why the container runs without no-new-privileges.

lea’s seccomp profile is Docker’s default with a reviewed list of changes, each with its reason, checked in CI. It allows what the nested rootless Podman needs and keeps refusing the kernel keyring, bpf, perf_event_open and the kernel crypto sockets. Where Docker uses AppArmor (not on SELinux distributions or Docker Desktop), the AppArmor profile lea applies too.

The proxy, the only container on both the agents’ networks and the egress network, runs with a read-only root and almost every capability dropped (when its image carries the lea.confine=1 label; an older pinned LEA_PROXY_IMAGE runs unconfined, with a warning). No service runs as root, except under rootless Podman, where the key forwarder runs as the container’s root, which is your user on the host.

The kernel

Every lea container shares the host kernel, so the host’s patch level is part of the containment. lea doctor shows the kernel, Docker Engine, containerd and runc versions, and warns when config/host-minimums has no kernel minimum for your distribution; it fails below one only once a minimum is listed (none is yet).

LEA_RUNTIME=runsc (gVisor) or LEA_RUNTIME=kata (Kata Containers) puts a second kernel in the way, for the agent containers. Each has a cost and a few features it drops. A second kernel.

Signed releases

Each release is signed keyless with cosign by the release workflow: its checksums.txt and the lea and lea-proxy images, by digest. The installer, lea update and the background update verify the signature first, and stop when it is missing or bad.

Every signature is logged publicly (Rekor). The signature protects against a tampered asset or mirror; it does not replace trusting the GitHub account that publishes lea. Verify a release by hand.

What lea does not protect against

These limits are part of the design. Read them before you rely on lea.

A kernel bug

With the default runtime, one kernel bug reachable from the container is enough to escape it, whatever seccomp and AppArmor refuse. A second kernel narrows that surface; it does not remove it.

Files your host runs

The projects directory is writable, and an agent can write what your host tools would run: git hooks, .mcp.json, .claude/ settings, build scripts. lea reports changes to the first three when the last session closes; work in lea, not on the host, inside that directory.

Agents of one container

The agents of one lea share a uid. They can read each other’s environment and files, and the logins lea gives them. Use one projects directory per trust level.

What you allow

A domain you add to the allowlist, an internal host you list, an allowance you record: lea applies them as you wrote them. A domain that accepts uploads is a way out for data.