javascript-sdk
Warn
Audited by Gen Agent Trust Hub on Apr 14, 2026
Risk Level: MEDIUMREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSPROMPT_INJECTION
Full Analysis
- [REMOTE_CODE_EXECUTION]: Documentation promotes the use of eval() on model-generated content in tool-handling examples in references/tool-builder.md and references/agent-patterns.md. This allows arbitrary code execution within the environment where the SDK is running if the AI produces malicious code.
- [REMOTE_CODE_EXECUTION]: The SDK documentation describes a built-in codeExecution capability for agents in references/agent-patterns.md, enabling agents to write and run code. This provides a direct path for executing arbitrary code via indirect prompt injection.
- [COMMAND_EXECUTION]: Examples include tools with destructive capabilities, such as a delete_file tool in references/agent-patterns.md, which could be abused if the agent is compromised.
- [EXTERNAL_DOWNLOADS]: The SKILL.md file recommends installing additional platform skills using the npx skills add command, introducing potential supply chain risks from external sources.
- [PROMPT_INJECTION]: The SDK facilitates building agents that process untrusted data with high-privilege capabilities, creating an indirect prompt injection surface. Ingestion points: agent.sendMessage() accepts untrusted user input in SKILL.md and references/agent-patterns.md. Boundary markers: Documentation examples lack instructions for delimiting user input or ignoring embedded instructions. Capability inventory: SDK enables code execution, file system access, and network webhooks. Sanitization: Examples do not demonstrate sandboxing or validation of AI-generated content before execution.
Audit Metadata