agent-patterns
Warn
Audited by Gen Agent Trust Hub on Sep 19, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [DYNAMIC_EXECUTION]: Multiple language templates provided in the skill implement a "calculator" tool using unsafe dynamic execution methods. In
templates/genaiscript/autonomous_agent.genai.mts, the tool useseval(args.expression), and intemplates/typescript/parallelization.ts, it uses theFunctionconstructor as an evaluator. These methods are susceptible to arbitrary code execution if the input strings are not strictly validated, as they run with the privileges of the agent's environment. - [COMMAND_EXECUTION]: The Python autonomous agent template (
templates/python/autonomous_agent.py) includes arun_commandtool that utilizessubprocess.run(command, shell=True). While the implementation includes a command whitelist (ls,cat,grep, etc.), the use ofshell=Truecombined with user-supplied arguments is a well-known security risk for shell injection, especially if the agent is not strictly sandboxed. - [INDIRECT_PROMPT_INJECTION]: The skill is designed to build agents that ingest untrusted data from various sources (RAG, web results, tool outputs), creating a significant attack surface for indirect prompt injection.
- Ingestion points:
resources/augmented-llm.md(retrieval systems),resources/dynamic-orchestration.md(autonomous exploration/web search results), and various worker templates. - Boundary markers: The skill explicitly instructs users to use XML-style delimiter tags (e.g.,
<retrieved_context>) to separate untrusted data from system instructions. - Capability inventory: The provided templates include powerful capabilities such as file system operations (
read_file,write_file), command execution, and network access via the Anthropic API. - Sanitization: While the documentation provides guidance on sanitizing role-switching patterns and jailbreak phrases before injection, the provided templates do not implement these filters directly, relying instead on user implementation of the described architectural patterns.
Audit Metadata