Docs / Security
Threat model
What the mirror is built to protect, from whom, and what it does not protect against.
Mostly read bySecurity and red teamsAI governance and security leadersPrivacy and data protection
What MirrorDimensions protects, from whom, and how. It is written with STRIDE (spoofing, tampering, repudiation, information disclosure, denial of service, elevation of privilege) across the places where trust changes. It describes design goals and the mechanisms meant to meet them, not proofs: mirror doctor and each run's coverage block report what was checked on your machine.
Read it with architecture.md, which shows the parts, and SECURITY.md, which says how to report a failure of anything here.
What is protected
| Asset | Why it matters |
|---|---|
| The host: its files, credentials and network | The agent under test must not reach the computer it is tested on |
| Real credentials: model keys, the root CA key | A key that reaches a world can be read by the agent and sent to its model |
| The record of a run | A result is only worth something if the record is complete and unaltered |
| The test itself: scenarios, canaries, checks, this repository | An agent that learns it is in a test may behave differently |
| The owner's worlds and seed data | They describe a company, sometimes from real exports |
Who is assumed hostile, and who is trusted
- The agent under test is untrusted. It may be compromised by injected text, or misbehave by itself. It is assumed to try anything a process in its container can try.
- Content inside a world is untrusted. Issues, messages and files include text planted to steer an agent. Anything that reads a run's content, a person's AI tool included, must treat it as data.
- Files the owner imports are untrusted as data. An OpenAPI description, a tool list or a seed folder may be malformed or hostile; reading one must not run it or follow it.
- A coding agent setting worlds up is a limited operator. It acts for the owner through the operator MCP server, within what that server offers.
- The owner and the host are trusted. The mirror does not defend the owner against themselves or against other software on their computer. The portal and the operator server are for the person at that computer.
- The model provider is outside. It sees whatever the agent sends it.
Where trust changes
- The agent's container, to everything else in the engine.
- The sandbox's networks, to the world outside (the gateway and the engine's firewall).
- The engine VM, to the host (the Docker API, and nothing shared).
- A page in the owner's browser, to the portal's server.
- An AI tool, to the operator MCP server.
- A file the owner names, to the code that reads it.
- A contributor's change, to
mainand to a release.
Threats and what answers them
1. The agent's container
| Threat | Answer |
|---|---|
| Elevation: breaking out of the container into the engine | A hardened container (gVisor, or a microVM where the host can nest) inside a VM that holds nothing but worlds (decisions 0002, 0010, 0012) |
| Information disclosure: reading the test's machinery | No code, configuration or data from this repository or the project is placed in a container the agent can reach; no such container has a path to the control plane |
| Information disclosure: learning it is a test | Production-style names over valid TLS, ordinary host names and variables, text composed per world (decision 0029); each tell found is recorded in tells.md |
| Spoofing: acting as a person it was not given | It is signed in as one person, with exactly the grants in its file (decision 0020) |
| Repudiation: doing something that leaves no trace | Requests are recorded at the gateway, DNS at the resolver, processes and sockets by the tracer, and the records are reconciled against each other (decision 0016) |
2. The way out
| Threat | Answer |
|---|---|
| Information disclosure: sending data anywhere but the model | One pinned upstream per model route; the engine's firewall drops and logs everything else, including the cloud metadata address (decision 0013) |
| Information disclosure: a real key inside a world | The agent holds a placeholder; the gateway puts the real key in place as the call leaves |
| Tampering: resolving a name to somewhere else | The resolver answers only the world's own names |
| Information disclosure through the model itself | Not prevented: what the agent sends its model has left the world. The run reports canaries seen in model calls. Use test data |
3. The engine and the host
| Threat | Answer |
|---|---|
| Elevation: from the engine to the host | No host folder is shared, no port of a system is published to the host, no container has a route to it; everything crosses through the Docker API (decisions 0003, 0004) |
| Tampering: one world's data reaching another | One sandbox at a time per engine, restored from a snapshot before each run |
| Tampering with the owner's own tools | The mirror never uses or changes the owner's Docker context, Lima instances or WSL settings |
4. The portal
| Threat | Answer |
|---|---|
| Spoofing: another site or program calling it | It listens on 127.0.0.1 only; every request needs the token, kept in a same-site cookie named for the portal's port (a browser still sends a cookie to every port on 127.0.0.1, so another program listening there that the owner opens in the same browser could read it); changes need a header a page from elsewhere cannot send; the Host header is checked |
| Tampering: a name that climbs out of a folder, or that no file can have | Names are checked before they reach a folder; a world is found by its name among the worlds on the computer, never by a path a page sends |
| Denial of service: input that makes the server fail | Every endpoint is tested with input nobody would choose and must answer with a refusal (decision 0040) |
| Information disclosure: showing hostile text as page | Run content is shown as text; a fault is kept in the world's folder and sent nowhere |
The portal has one token and no accounts. It is not built to face a network, and has no option to.
5. The operator MCP server and AI tools
| Threat | Answer |
|---|---|
| Elevation by injected text: run content steering the owner's AI tool | Text an agent or a scenario wrote is returned only under run_content, marked untrusted, and structured facts are returned by default (decision 0023). This lowers the risk and does not remove it: read what the tool proposes |
| Elevation: a coding agent doing more than set a world up | It can create worlds in one folder only; nothing destructive is offered; no tool returns a key; what costs time or money waits for the owner's answer, given outside the tool (decision 0039) |
| Repudiation: not knowing what it did | Every act is written to the world's own log and shown in the portal |
| Information disclosure: the setup session being the tested agent | Not prevented by code. The guide, the page and the documents say the tested agent must be another session |
A coding agent with a shell can do more than these tools allow. The limits bound the tools, not the agent.
6. Files the owner names
| Threat | Answer |
|---|---|
| Tampering: a description that runs code or reaches out | Descriptions are read as data; nothing outside the file is opened or fetched; a system built from one answers by shape and holds records, and runs none of it (decision 0034) |
| Information disclosure: secrets or people in an imported file | Values that look like credentials are left out of what is kept; personal data in a seed folder must be accepted first (decision 0030). Detection is by pattern and can miss things |
| Spoofing: a description fetched from an address that is not what it seems | https only, no sign-in sent, no redirect followed, loopback and link-local addresses refused, the request made to the address that was checked |
| Elevation: reading a file the owner did not mean | The owner names the file, on their own computer, signed in to the portal. Reading the file they name is the purpose; this is why the scanner's "path from user input" finding is expected at these points, and each such point is reviewed when it is added |
7. Changes and releases
| Threat | Answer |
|---|---|
| Tampering: a change that weakens isolation | Every change to main goes through a pull request with required checks that nobody can bypass: tests on three operating systems, the sealed-network run, the portal's tests, lint and types, import boundaries, a secret scan and code scanning |
| Tampering: a dependency or an action replaced | Dependencies locked with hashes; licences checked; actions pinned to a commit; Dependabot for Python, actions and the front end |
| Information disclosure: a secret committed | Secret scanning with push protection, and a scan in CI |
| Spoofing: a release that is not what was built | No release exists yet. The first is to be built in CI, with provenance and a bill of materials (see docs/open-source/go-public.md) |
| Elevation: one account compromised | The organization requires two-factor sign-in. There is one maintainer today, which is a weakness of its own |
Known limits
- It is a prototype, measured on the hardware in platforms.md.
- A remote or desktop agent runs outside the sandbox: what it does to the world is recorded, its own side is not, and a leak there is detected and not blocked.
- The
hostengine driver gives a weaker boundary than a dedicated VM, and reports it. - A tell not yet found is not closed.
- Review by a second person does not exist while there is one maintainer.
Keeping this current
A change that adds a way for the agent to touch something, a way into the portal or the operator server, or a kind of file that is read, updates this page in the same pull request.
This page is docs/security/threat-model.md in the repository; improve it there.