open-agent-sdk-typescript
Warn
Audited by Gen Agent Trust Hub on Oct 8, 2026
Risk Level: MEDIUMDYNAMIC_EXECUTIONCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
- [DYNAMIC_EXECUTION]: The example code for a custom
calculatortool utilizes theFunctionconstructor to evaluate mathematical expressions:Function("'use strict'; return (${expression})")(). This pattern allows for the execution of arbitrary JavaScript code from the user-providedexpressionstring.\n- [COMMAND_EXECUTION]: The SDK documentation details theBashandBashSessiontools, which enable the agent to execute shell commands on the host system. The examples demonstrate how to use these tools in conjunction with thebypassPermissionsconfiguration.\n- [INDIRECT_PROMPT_INJECTION]: The SDK establishes an attack surface for indirect prompt injection by facilitating the processing of untrusted data (via file reads, web fetches, and user prompts) and providing examples where the agent is configured tobypassPermissions. This configuration allows the agent to use sensitive tools likeBash,Write, andDeletewithout human confirmation.\n - Ingestion points: Data enters the agent context through
agent.prompt(),query(), and the results of tools likeRead,Glob, andhttp_get.\n - Boundary markers: The provided examples do not demonstrate the use of delimiters or specific safety instructions to isolate data from instructions.\n
- Capability inventory: The SDK includes a suite of tools for file management, process execution (
Bash), and network operations.\n - Sanitization: There is no demonstration of sanitization or validation for input data processed by the example tools.\n- [EXTERNAL_DOWNLOADS]: The documentation includes examples that use
npxto download and execute Model Context Protocol (MCP) servers, such as@modelcontextprotocol/server-filesystemand@modelcontextprotocol/server-postgres.
Audit Metadata