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

opencode

Warn

Audited by Gen Agent Trust Hub on Sep 28, 2026

Risk Level: MEDIUMCOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The utility function execute_cmd in opencode_utils.py uses subprocess.run with shell=True to execute commands. This pattern is generally discouraged as it increases the risk of shell injection vulnerabilities.
  • [DYNAMIC_EXECUTION]: In list_sessions.py, the skill dynamically constructs shell commands using project paths fetched from a local API (execute_cmd(f"cd {project['path']};opencode session list --format=json")). The lack of sanitization on the path variable means that if the local OpenCode service provides a path containing shell metacharacters, it could result in arbitrary command execution.
  • [INDIRECT_PROMPT_INJECTION]: The skill acts as a processing layer for data retrieved from an external (though local) source, creating a surface for indirect injection.
  • Ingestion points: Project worktree paths and session messages are retrieved from the local OpenCode server at http://127.0.0.1:4096 via httpx and the opencode-ai SDK.
  • Boundary markers: None are used when processing or displaying messages and paths.
  • Capability inventory: The skill can execute arbitrary shell commands via subprocess, launch detached background processes, and read/write local files (status.json).
  • Sanitization: The skill does not sanitize the project paths or message content before using them in shell commands or displaying them to the user.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 28, 2026, 10:06 AM