autonomous-agent-patterns
Warn
Audited by Gen Agent Trust Hub on Mar 16, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONPROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The
SandboxedExecutionclass usessubprocess.runwithshell=True. The validation logic only verifies the primary command name, which permits the execution of unauthorized commands via shell operators like '&&' or ';' to bypass the restricted environment.\n- [REMOTE_CODE_EXECUTION]: TheMCPAgentpattern involves generating Python code via an LLM based on user descriptions, writing that code to a local file, and executing it as an MCP server. This dynamic loading and execution of unvalidated code generated at runtime is a high-risk practice.\n- [PROMPT_INJECTION]: TheContextManagerimplementation creates a surface for indirect prompt injection. 1. Ingestion points: Untrusted data enters viaadd_fileandadd_urlmethods inSKILL.md. 2. Boundary markers: Theformat_for_promptmethod lacks delimiters or specific instructions for the agent to ignore embedded commands. 3. Capability inventory: The skill defines high-risk tools forrun_command,write_file, andedit_file. 4. Sanitization: No filtering or escaping is applied to the ingested content before prompt interpolation.\n- [EXTERNAL_DOWNLOADS]: The skill includes code for fetching remote content using therequestslibrary, which allows the agent to pull data and potentially malicious instructions from arbitrary external URLs.
Audit Metadata