OpenCompute runs models that can be tricked, and (later) gives them tools. The most important security principle is:
The model is never the security boundary.
Security must be enforced by deterministic software outside the model — file permissions, path checks, and explicit limits — never by trusting what the model says or outputs.
Even with only two capabilities, the main risks are:
- Prompt injection. A webpage or search result can instruct the model to do something harmful. The model's "decision" is not trusted — the code checks the outcome.
- Path escape / arbitrary writes. A plan or model output could try to write
outside the workspace. Mitigated: the filesystem capability resolves paths and
rejects anything outside the workspace root, and the planner's output is
schema-validated (
extra="forbid"). - Untrusted web content. Fetched pages are treated as data, never executed. They are only ever read as text and summarized.
- Arbitrary code execution. Not present yet — there is no terminal/coding capability. When one is added, it must run sandboxed with an explicit permission grant, not by default.
- Credential exposure. The model key comes from the environment. The runtime itself does not log API keys — events store only model names and usage numbers.
- Outbound requests (SSRF). The new
httpcapability makes plain HTTP requests. It is restricted tohttp://andhttps://and does not follow the model's instructions about where to call — but a malicious plan could direct it at internal/localhostservices. Until there is a permission or network policy (Milestone 4), treat it as "can reach whatever the host can reach" and do not expose it to untrusted goals.
- Workspace confinement. Files are written only under the workspace root.
Absolute and
..paths are rejected. - Schema validation. Plans are parsed by Pydantic with extra fields forbidden, so an LLM cannot smuggle in unexpected structure.
- Deterministic verification. The verifier is plain code, not a second LLM that could be fooled the same way.
- No sandboxing or process isolation (no terminal/code capability exists yet).
- No fine-grained permission system (nothing sensitive is reachable yet).
- No rate limiting or network egress policy on fetches.
- No secret redaction in logs (keep model keys out of
OPENAI_*if you log env).
These become real requirements the moment a code-execution or browser capability is added, and are scheduled for Milestone 4.
When you add a capability that can do something (code, browser, network, disk):
- Give it a scoped permission, off by default.
- Enforce that permission in code, not in a prompt.
- Log every grant and denial to the event stream.
- Sandbox it (Docker or better) before running untrusted input through it.