From 2dedc5e274df74c40edf323fcb0273395b6f06ba Mon Sep 17 00:00:00 2001 From: rekram1-node Date: Fri, 2 Oct 2026 00:42:49 +0000 Subject: [PATCH] docs: describe v2 permissions and server auth --- SECURITY.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index e7e59f4a27a..2afc2d102df 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -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 |