opencode
Warn
Audited by Gen Agent Trust Hub on Sep 19, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONPERSISTENCE
Full Analysis
- [COMMAND_EXECUTION]: The utility function
execute_cmdinopencode_utils.pyusessubprocess.runwithshell=True. Inlist_sessions.py, this function is invoked with a command string built using thepathvalue retrieved from a local API endpoint (http://127.0.0.1:4096/project). This pattern allows for potential command injection if the local service returns an unsanitized string. - [INDIRECT_PROMPT_INJECTION]: The skill retrieves and displays messages from OpenCode sessions, which could contain instructions that influence the agent's behavior.
- Ingestion points: Data is ingested via
client.session.messageswithin theread_new_messagesfunction inopencode_utils.py. - Boundary markers: Absent. The messages are concatenated and printed directly as output in
list_sessions.py. - Capability inventory: The skill environment provides shell command execution capabilities via the
execute_cmdfunction inopencode_utils.py. - Sanitization: No sanitization or validation of the session message content was identified.
- [PERSISTENCE]: The
start_opencodefunction inopencode_utils.pyinitiates theopencode serveprocess in a detached state usingos.setsidon Unix-like systems andCREATE_NEW_PROCESS_GROUP|DETACHED_PROCESSon Windows, allowing the service to persist beyond the lifecycle of the agent task.
Audit Metadata