docs: describe v2 permissions and server auth

This commit is contained in:
rekram1-node 2026-10-02 00:42:49 +00:00 • committed by opencode-agent[bot]
parent 8a3185b66c
commit 2dedc5e274

View file

@ -14,19 +14,24 @@ OpenCode is an AI-powered coding assistant that runs locally on your machine. It
### No Sandbox
OpenCode does **not** sandbox the agent. The permission system exists as a UX feature to help users stay aware of what actions the agent is taking - it prompts for confirmation before executing commands, writing files, etc. However, it is not designed to provide security isolation.
OpenCode does **not** sandbox the agent. By default, Build permits shell commands and file edits without confirmation;
Plan restricts edits to its plan directory. Configured rules can ask or deny, and sensitive reads and external paths ask
by default. Permission prompts are not a security boundary.
If you need true isolation, run OpenCode inside a Docker container or VM.
### Server Mode
Server mode is opt-in only. When enabled, set `OPENCODE_SERVER_PASSWORD` to require HTTP Basic Auth. Without this, the server runs unauthenticated (with a warning). It is the end user's responsibility to secure the server - any functionality it provides is not a vulnerability.
OpenCode clients normally discover or start a local background HTTP service. The CLI binds to loopback by default and
supplies a generated HTTP Basic Auth password when one is not configured; its server process refuses to start without a
password. If you expose the service beyond your machine, use appropriate network access controls as well as authentication.
An application embedding the fetch handler without a password must provide its own access control.
### Out of Scope
| Category | Rationale |
| ------------------------------- | ----------------------------------------------------------------------- |
| **Server access when opted-in** | If you enable server mode, API access is expected behavior |
| **Authorized server access** | Access to the API with valid credentials is expected behavior |
| **Sandbox escapes** | The permission system is not a sandbox (see above) |
| **LLM provider data handling** | Data sent to your configured LLM provider is governed by their policies |
| **MCP server behavior** | External MCP servers you configure are outside our trust boundary |