skills/claude-code-community-ireland/claude-code-resources/autonomous-agent-patterns/Gen Agent Trust Hub
autonomous-agent-patterns
Warn
Audited by Gen Agent Trust Hub on Sep 23, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTIONDATA_EXFILTRATION
Full Analysis
- [COMMAND_EXECUTION]: The
SandboxedExecutionpattern inskill.mdrecommends the use ofsubprocess.run(command, shell=True). Executing commands through a shell is a dangerous practice that can lead to shell injection vulnerabilities, especially when handling inputs that may originate from an LLM or external source.- [DYNAMIC_EXECUTION]: TheMCPAgentarchitecture described in section 6.1 outlines a process where the agent generates Python code based on a description, writes it to a local file (server.py), and then dynamically loads and executes it. This "self-modifying" behavior for tool creation is a significant security risk as it provides a direct path for remote code execution if the generation process is influenced by malicious instructions.- [INDIRECT_PROMPT_INJECTION]: The skill documents architectural patterns for ingesting data from external URLs (requests.get) and browser automation (playwright), which are primary vectors for indirect prompt injection. - Ingestion points:
ContextManager.add_urlandBrowserTool.open_urlinskill.mdingest content from arbitrary external sources. - Boundary markers: The prompt construction example in
ContextManager.format_for_promptuses simple Markdown headers that do not provide robust isolation between trusted instructions and untrusted data. - Capability inventory: The design includes high-privilege tools such as
run_command,write_file, andedit_filethat could be abused if the agent follows malicious instructions hidden in ingested data. - Sanitization: The patterns provided do not include any form of sanitization, validation, or escaping of external content before it is interpolated into the agent's prompt.- [DATA_EXFILTRATION]: The
ContextManageruses therequestslibrary to fetch data from arbitrary URLs. Without a restrictive domain whitelist, this pattern can be used to exfiltrate sensitive context or hardcoded secrets by sending them as parameters to an external, attacker-controlled endpoint.
Audit Metadata