Back to articles

Diplomat-agent static scanner reveals 76% of tool calls in 16 open-source AI agent repos lack security guards

Hacker News · April 29, 2026

Diplomat-agent static scanner reveals 76% of tool calls in 16 open-source AI agent repos lack security guards

AI Summary

  • A Python tool called diplomat-agent scans codebases for unguarded AI agent tool calls—functions that write to databases, send emails, charge cards, or delete data. A scan of 16 open-source agent repositories found 76% of tool calls had zero checks (input validation, rate limiting, auth checks, confirmation steps, idempotency keys, or retry bounds).
  • The scanner runs in ~2 seconds on a 1,000-file repo using only Python's standard library AST module. It detects 40+ patterns across 8 categories (database writes/deletes, HTTP writes, payments, email/messaging, agent invocations, destructive commands, and publish/upload operations) and outputs results in Terminal, JSON, SARIF 2.1.0, CSAF 2.0, or Markdown formats.
  • The tool integrates into CI pipelines (to block unguarded PRs), IDEs (Copilot Chat, Claude Code, Cursor), pre-commit hooks, and GitHub Code Scanning. It also generates a toolcalls.yaml behavioral SBOM that documents what an agent can do, comparable to a requirements.txt file.

Related Articles

Stay ahead with AI news

Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.

Get Started Free