autonomous-agent-patterns

Warn

Audited by Gen Agent Trust Hub on Oct 29, 2026

Risk Level: MEDIUMDYNAMIC_EXECUTIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSINDIRECT_PROMPT_INJECTION
Full Analysis
  • [DYNAMIC_EXECUTION]: The MCPAgent class implementation includes a create_tool method that generates Python code via an LLM, writes it to the local filesystem, and then loads it for execution by connecting to it as a new server. This creates a significant risk of arbitrary code execution if the tool description is derived from untrusted input.
  • [COMMAND_EXECUTION]: The skill defines patterns for executing system commands, including a run_command tool and a SandboxedExecution class. The sandboxing implementation uses subprocess.run with shell=True, which is susceptible to command injection if command strings are not meticulously sanitized.
  • [EXTERNAL_DOWNLOADS]: The ContextManager class provides a pattern for fetching content from arbitrary external URLs using the requests.get method to augment the agent's context.
  • [INDIRECT_PROMPT_INJECTION]: The skill documents an architecture that ingests untrusted data from external URLs and files while maintaining access to high-privilege tools (file writing, command execution), creating a vulnerability surface for indirect prompt injection.
  • Ingestion points: ContextManager.add_url and ContextManager.add_file methods in SKILL.md.
  • Boundary markers: None are present in the provided design patterns to distinguish between instructions and data.
  • Capability inventory: run_command, write_file, edit_file, and dynamic tool creation/execution.
  • Sanitization: While basic path validation is included in SandboxedExecution, no sanitization or escaping is applied to content fetched from URLs or generated by the LLM.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Oct 29, 2026, 09:44 AM