Marks / Execution controls / Credential handling
opencode · Credential handling
Full env inherited, plaintext credential DB; only *.env read-tool ask and host per-session env replacement
Level
Criteria for this column
- 0
Full environment inherited, credentials stored in plaintext readable by agent code, no filtering
- 1
Some protection (keychain option, redaction of output, per-command secret injection), but the full environment is still inherited by default
met - 2
Default denylist filtering of the environment, but known provider keys or credential files remain reachable by agent code
- 3
Default cleared environment plus allowlist for agent processes; credential stores may still be readable on the same filesystem
- 4
Level 3, plus provider credentials held outside the agent's reach (separate process or broker) and auxiliary processes (MCP stdio) also get an allowlisted environment
What the source review found
Local shell inherits the server's full process.env, or a per-session replacement the host sets via PUT /session/:id/environment. MCP stdio servers inherit the env. Stored credentials are plaintext JSON in the 0600 SQLite DB, which the shell can read. The *.env ask rule covers the read tool, not shell cat. No output redaction. X96X101X102X103X104
Pinned evidence
Cited by the mark
- X101
local shell env = per-session override or process.env
- X102
MCP stdio extendEnv true
- X103
credential value stored as plaintext JSON
anomalyco/opencode packages/core/src/credential/sql.ts L5-L14
Also cited by the review finding
- X96
default permissions allow * with ask for versioned skills and *.env reads
- X104
database file chmod 0600
anomalyco/opencode packages/core/src/database/database.ts L89-L100
Two independent graders
- Grader A
- 1 / 1
- Grader B
- 1 / 1
- Final
- 1 / 1