Diplomat-ai Tool Scans Agent Code for Unchecked Tool Calls
TL;DR. A new static analysis tool, diplomat-agent-ts, identifies potentially insecure tool calls within TypeScript AI agent codebases. - The tool scans for functions that interact with real-world systems like databases or payment gateways. - It flags tool calls lacking input validation, rate limits, or confirmation steps, posing significant security risks. - The analysis of one agent codebase revealed 79% of real-world side-effect calls had no safety checks.
- diplomat-agent-ts is a static AST scanner designed for TypeScript AI agent codebases.
- It detects over 40 patterns across 12 categories of side-effecting tool calls (e.g., database writes, payments, email sending).
- The tool identifies tool calls that lack common security guards such as input validation, rate limiting, and confirmation steps.
- A scan of the OpenClaw agent showed 79% of 419 side-effect tool calls were unguarded.
- The project provides a command-line interface for scanning, generating SBOMs, and integration into CI pipelines.