autonomous-agent-patterns
Warn
Audited by Gen Agent Trust Hub on Nov 13, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDATA_EXFILTRATION
Full Analysis
- [DYNAMIC_EXECUTION]: The
MCPAgent.create_toolmethod provides a pattern for dynamically generating Python code using an LLM based on user-provided descriptions, writing that code to the filesystem (e.g.,./mcp_servers/server.py), and subsequently executing it as an MCP server. This creates a critical surface for arbitrary code execution if the input description originates from an untrusted source. - [COMMAND_EXECUTION]: The skill demonstrates patterns for executing system shell commands through
subprocess.runandsubprocess.getoutput. TheSandboxedExecutionexample utilizesshell=True, which is a high-risk pattern that can lead to command injection if arguments are not perfectly sanitized. - [INDIRECT_PROMPT_INJECTION]: The
ContextManagerclass (SKILL.md) demonstrates patterns for ingesting untrusted data from local files and external URLs into the agent's context. Evidence: 1. Ingestion points:add_file,add_folder, andadd_urlmethods. 2. Boundary markers: Absent in the providedformat_for_promptlogic. 3. Capability inventory: The skill includes file-read/write tools, network fetching, and shell execution capabilities. 4. Sanitization: Absent; content is directly interpolated into markdown blocks without escaping or validation. - [DATA_EXFILTRATION]: The
ContextManager.add_urlmethod utilizes therequestslibrary to perform network operations (GET requests) to arbitrary external domains, which represents a potential surface for data exfiltration if the agent is instructed to send sensitive data as part of a URL or request.
Audit Metadata