opencode
Fail
Audited by Gen Agent Trust Hub on Sep 19, 2026
Risk Level: HIGHCOMMAND_EXECUTIONPRIVILEGE_ESCALATIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The skill instructions in
SKILL.mdmandate the use of theopencodeCLI with the--dangerously-skip-permissionsflag. This flag is designed to auto-approve all tool calls made by the sub-agent, including filesystem modifications and arbitrary bash command execution. This configuration intentionally removes the 'human-in-the-loop' safety constraint, allowing the sub-agent to execute actions that would normally require explicit user consent. - [PRIVILEGE_ESCALATION]: By coupling the
--agent buildmode (which has write access) with the--dangerously-skip-permissionsflag, the skill grants the sub-agent unrestricted autonomy to modify the codebase and execute shell commands without oversight. This effectively escalates the sub-agent's privileges to that of an autonomous administrator within the working directory. - [INDIRECT_PROMPT_INJECTION]: The skill creates an attack surface where user-provided prompts and attached project files are passed to external AI models. Because the sub-agent's actions are auto-approved, a malicious prompt or a poisoned codebase file could cause the sub-agent to execute destructive commands.
- Ingestion points: User-provided prompts and codebase files attached via the
-fflag inSKILL.mdare passed to theopencodeCLI. - Boundary markers: The skill uses structural headers (e.g.,
[CONTEXT],[TASK],[SCOPE]) in prompt templates, but these provide weak logical separation and do not prevent the sub-agent from following instructions embedded within the codebase files. - Capability inventory: The sub-agent has full access to the filesystem and the ability to execute arbitrary shell commands via its internal
bashandwrite_filetools. - Sanitization: There is no evidence of input sanitization or validation of the sub-agent's generated tool calls before execution.
- [DYNAMIC_EXECUTION]: The
scripts/test_skill.pyutility usessubprocess.runwithshell=Trueon Windows platforms to invoke theopencodeCLI. This pattern can lead to command injection if parts of the command string (such as the prompt or directory path) are not properly sanitized, especially given the script's use of environment variables likeOPENCODE_BINto define the executable path.
Recommendations
- AI detected serious security threats
Audit Metadata