add-opencode
Warn
Audited by Gen Agent Trust Hub on Oct 9, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONDATA_EXFILTRATION
Full Analysis
- [COMMAND_EXECUTION]: The skill uses
spawnSyncwithshell: trueinpayload/container/agent-runner/src/providers/opencode-memory.tsto execute memory session hooks. This allows the execution of arbitrary shell commands defined in the hook configuration. - [REMOTE_CODE_EXECUTION]: In
payload/scripts/opencode-host.ts, the skill downloads theopencode-aipackage vianpmand then explicitly executes apostinstall.mjsscript from the downloaded package using the current Node.js process. - [DYNAMIC_EXECUTION]: The skill dynamically executes Node.js scripts and shell commands at runtime to handle installation, authentication, and memory management, including the use of
process.execPathto run setup scripts. - [INDIRECT_PROMPT_INJECTION]: The
offerOpenCodeFailureAssistfeature inpayload/scripts/opencode-host.tscreates a maintenance request file containing external error messages and instructions, then prompts the agent to read and follow those instructions. This creates an attack surface where maliciously crafted error messages could influence agent behavior. - Ingestion points: Error messages (
ctx.msg) and hints (ctx.hint) passed toofferOpenCodeFailureAssistinopencode-host.ts; memory hook outputs inopencode-memory.ts. - Boundary markers: The maintenance file uses markdown headers to separate sections, but does not provide strong isolation for the untrusted error content.
- Capability inventory: Shell execution (
spawnSync), container management (spawn), and file writing capabilities are present across the scripts. - Sanitization: Paths are sanitized using
JSON.stringify, but the error content itself is written directly to the diagnostic file. - [DATA_EXFILTRATION]: The skill communicates with an external management service (
OneCLI) to store and retrieve sensitive credentials, including API keys and OAuth tokens for various AI providers.
Audit Metadata