mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
docs: describe v2 permissions and server auth
This commit is contained in:
parent
8a3185b66c
commit
2dedc5e274
1 changed files with 8 additions and 3 deletions
11
SECURITY.md
11
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 |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue