autonomous-agent-patterns
Fail
Audited by Gen Agent Trust Hub on Feb 21, 2026
Risk Level: HIGHREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONDATA_EXFILTRATIONEXTERNAL_DOWNLOADS
Full Analysis
- Remote Code Execution (HIGH): The
MCPAgent.create_toolfunction insub-skills/61-mcp-server-pattern.mdimplements a dangerous pattern where Python code is generated by an LLM, written to a local file, and then executed via theconnect_servermethod. This allows an attacker to achieve arbitrary code execution if they can influence the agent's task via indirect prompt injection.\n- Command Execution (HIGH): TheSandboxedExecutionclass insub-skills/33-sandboxing.mdusessubprocess.run(command, shell=True)with a validation logic that only checks the first word of the command string against a whitelist. This is trivial to bypass using command chaining characters like;,&&, or|to execute arbitrary shell commands outside the intended whitelist.\n- Data Exfiltration (HIGH): TheReadFileToolandEditFileToolinsub-skills/21-tool-schema.mdandsub-skills/23-edit-tool-design.mdallow the agent to read and modify any file on the system using absolute paths. When combined with theAUTOpermission level suggested insub-skills/31-permission-levels.md, this creates a high risk of sensitive data exposure (e.g., SSH keys, credentials) without user oversight.\n- Indirect Prompt Injection (LOW): Multiple components ingest untrusted external data which could lead to prompt injection attacks. \n - Ingestion points:
ContextManager.add_url(viarequests.get) andBrowserTool.get_page_content(via Playwright).\n - Boundary markers: None identified; external content is interpolated directly into prompts.\n
- Capability inventory: File writing, shell command execution, and dynamic code generation.\n
- Sanitization: None; external HTML/text is converted or used directly.
Recommendations
- AI detected serious security threats
Audit Metadata