Skip to main content

Security boundaries

Status: Ready

Truth label: Limited

Audience: Fleet operator, System designer

Reader outcome: State exactly which boundaries this system enforces, which it only labels, and what each deployment step widens.

Last verified: 2026-09-13

Full guides: Security model

The design assumption​

AGENTASIAN is designed for one trusted operator, trusted repositories, and machines you own. It is not a public multi-tenant service, and the current controls do not prove confidential client isolation.

That is the honest frame for everything below.

Credentials​

Four credentials exist, and they authorize different things.

CredentialHeaderProtects
Fleet bearer, AA_API_TOKENAuthorization: BearerEvery non-health request when set. Without it, only loopback clients are accepted
Worker tokenX-Worker-TokenCredentialed worker routes. Returned once when Central first registers the worker identity
Run tokenX-Run-TokenLease renewal and terminal result delivery. Bound to one task and fence, returned only in the claim response
Operator token, AA_OPERATOR_TOKENX-Operator-TokenOnly searches that request scope=all

OPTIONS and /health are public.

The operator token protects the all-scope search and nothing else. It does not protect checkpoint, project, task, document, or knowledge-promotion routes.

Implemented controls​

ControlWhat it does
Network perimeterServices bind loopback by default. Without a token, non-loopback clients are rejected even if bound to a LAN address
Browser originsAA_ALLOWED_ORIGINS is an exact origin list
Project path controlRemote registration is confined to SE_MANAGER_ALLOWED_PROJECT_ROOTS, or to SE_MANAGER_PROJECTS_DIR when that list is blank and a token is set
Worker identityCentral mints a per-worker credential and stores only its hash
Run integrityA run token bound to one fence rejects late results from stale attempts
Execution authorityA per-machine maximum permission clamps what a task may request
Provider credentialsKey-returning endpoints stay disabled unless AA_ALLOW_KEY_DISTRIBUTION=true
Retrieval trustRepository control files are trusted instructions. Retrieved history and knowledge are labeled untrusted evidence
Attachment rootsAA_ATTACHMENT_ROOTS bounds which directories chat attachments may be read from

Named gaps​

State these plainly rather than discovering them later.

Safe permission is not an operating system sandbox​

Safe maps to an engine mode: plan mode for Claude, a read-only sandbox for Codex. It is a best-effort limit on the coding CLI. A verification command still executes repository code in the project directory.

Do not run hostile repositories or hostile tests on a worker.

Client scope is not tenant isolation​

client_id assigns a confidentiality scope, and scoped HTTP search records returned and denied counts. That audit measures denials seen by that one filter. It cannot detect retrieval paths that bypass the filter.

Keep a session inside one client scope, but do not use sessions as a confidentiality boundary. Do not use the system for multiple confidential clients until the audit findings are resolved.

The fleet bearer is not role separation​

One token authorizes every non-health route. A holder can create tasks, approve checkpoints, read traces, and search memory. There is no operator role distinct from a worker role at the perimeter.

Attachments and ingestion read server-side files​

Knowledge can be ingested from a server-side path, and chat attachments are read by the Brain process. With AA_ATTACHMENT_ROOTS unset, the act of picking is the only gate, so a token holder can read any file the Brain process can read. Do not expose the Brain API to an untrusted client.

Traces are sensitive​

Task traces contain the full task result inside the outcome object. Treat the trace API and raw trace artifacts as secrets, despite older documentation describing traces as fully sanitized.

A voice pack is prompt authority​

Pack content becomes system-level instruction. Treat an imported pack as code you are about to run, not as data you are about to read. Review imported profiles, lenses, samples, and style rules before applying them.

The worker inherits the whole environment​

The worker loads the repository .env and copies that environment into CLI and verification child processes. A shared .env therefore places the operator token and any provider keys on the worker. Until process-specific secrets and child environment filtering exist, keep unrelated keys out of a worker environment that will run untrusted repositories.

Backups are partial​

The current archive omits decisions, scope audit records, candidate resolution state, worker credentials, worker outboxes, and every external content root. Worker credential files, outboxes, raw traces, and backups are all secrets. See Running the stack.

Ten operating rules​

  1. Keep APIs on loopback unless remote workers require LAN access.
  2. Never expose ports 3000, 8080, or 8081 to the public internet.
  3. Use a long random fleet bearer for LAN access.
  4. Restrict firewall rules to trusted private hosts.
  5. Keep provider key distribution disabled.
  6. Store client work only in a correctly scoped project.
  7. Do not run hostile repositories or tests on a worker.
  8. Do not assume safe provides operating system isolation.
  9. Treat worker credential files, outboxes, raw traces, and backups as secrets.
  10. Do not use the system for multiple confidential clients until the audit P0 findings are resolved.

Deployment checklist​

Single host​

  • Leave AA_BIND_HOST at loopback.
  • Leave AA_API_TOKEN empty. Loopback-only is the boundary.
  • Use a disposable test repository until the whole path works end to end.

Trusted LAN​

  • Set AA_BIND_HOST=0.0.0.0 and a long random AA_API_TOKEN together. Never one without the other.
  • Set AA_ALLOWED_ORIGINS to the exact Cortex origin you browse from.
  • Set SE_MANAGER_ALLOWED_PROJECT_ROOTS to the smallest workable list.
  • Set AA_ATTACHMENT_ROOTS.
  • Add firewall rules scoped to trusted private hosts.
  • Use a dedicated browser profile on a trusted machine.

Before any wider exposure​

Read the named gaps above and treat each one as a blocking item, not a footnote.

Incident starting points​

SuspicionFirst actions
Fleet token exposureRotate AA_API_TOKEN on every service, worker, and browser. Restrict binding to loopback while you rotate
Worker token exposureDelete that worker registration, remove its credential file, restart the worker to re-enroll
Cross-client retrievalStop dispatching, review the scope audit counts, and inspect the affected task's retrieval evidence before resuming