T05 · Unauthorized Access and Privilege Escalation
- Location
USAGE.md:130- Finding
Unnecessary Access to a Local API Credential File
- Content
View full analysis
.key` and whether `provider..options.apiKey` in `opencode.json` points to it using `{file:...}`; alternatively, reconfigure it with `/connect` in the TUI. ``` ### Technical Analysis The troubleshooting guidance explicitly recommends inspecting the **contents** of a provider API-key file. Reading secret contents is not required for the Skill's declared biomedical paper-screening functionality and violates the principle of least privilege. If an AI agent performs this troubleshooting step, the credential may enter the model context, terminal output, audit logs, tool-call history, or saved conversation transcripts. Although the project does not instruct the agent to transmit the key and no credential-exfiltration endpoint was found, bringing the secret into an AI-mediated session unnecessarily expands its exposure surface. A secure diagnostic procedure should verify only: - Whether the credential file exists. - Whether its owner and permissions are correct. - Whether the configuration references the expected file. - Whether authentication succeeds through the provider's supported connection flow. The credential value itself should never be displayed or returned to the model. ### Attack Path 1. An operator encounters a provider authentication problem. 2. The agent consults the Skill's troubleshooting documentation. 3. Following the instruction, the agent reads or displays `~/.config/opencode/.key`. 4. The credential becomes part of terminal output, tool results, model context, or persistent logs. 5. Any party or integration with access to those records may recover the key a ...[truncated 753 chars]- Remediation
View remediation
.options.apiKey` references the intended file, or reconfigure authentication with `/connect`. ``` ]]>
