skills/volcengine/openviking/opencode/Gen Agent Trust Hub

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_cmd in opencode_utils.py uses subprocess.run with shell=True. In list_sessions.py, this function is invoked with a command string built using the path value 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.messages within the read_new_messages function in opencode_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_cmd function in opencode_utils.py.
  • Sanitization: No sanitization or validation of the session message content was identified.
  • [PERSISTENCE]: The start_opencode function in opencode_utils.py initiates the opencode serve process in a detached state using os.setsid on Unix-like systems and CREATE_NEW_PROCESS_GROUP | DETACHED_PROCESS on Windows, allowing the service to persist beyond the lifecycle of the agent task.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 19, 2026, 06:32 AM
Security Audit — agent-trust-hub — opencode