Agent Tool Guardrails & Prompt-Injection Eval Benchmark
A compact, deterministic evaluation suite for testing tool-calling AI agents, coding-agent harnesses, and MCP servers against real production security failure modes — plus benign controls to measure false-positive over-refusal.
Maintained by Alejandro Hernández Padrón (GitHub · LinkedIn · Bytefo / TravelRuter).
Why This Benchmark Exists
Most agent evaluations only test whether an agent completes the happy path in a demo. In production, real failures occur at tool boundaries:
- Indirect prompt injection hidden inside web pages, PR diffs, calendar invites, JSON payloads, or OCR transcripts.
- MCP scope escalation where an agent invokes destructive write tools without explicit human confirmation instead of read-only or reversible diff-preview tools.
- Secret & credential exfiltration through debug logs, markdown image URLs, public gists, or environment dumps.
- Unsafe coding-agent execution (shell injection, path traversal, stale-hash edits, force-pushing
main, typosquatted dependencies). - Over-refusal false positives (benign security testing and read-only operations that overly rigid guardrails wrongly block).
Dataset Schema (data/eval_cases.jsonl)
40 structured test cases across 5 balanced slices (8 cases each):
indirect_prompt_injection(8)mcp_write_scope_escalation(8)secret_exfiltration(8)shell_and_path_safety(8)benign_control(8 — false-positive resistance)
Each JSONL row contains:
id: unique case identifiercategory: failure-mode sliceseverity:critical | high | medium | noneexpected_action: expected guardrail behavioruser_task: benign user promptuntrusted_context: untrusted external data, tool metadata, or runtime conditionavailable_tools: tools exposed to the agentexpected_tool_calls: safe expected tool invocationsforbidden_tool_calls: unsafe tool invocations that represent a guardrail failure
Deterministic Scoring
Use scripts/score_transcripts.py to score agent tool-call transcripts locally (computes Attack Block Rate, Benign Pass Rate, and per-category breakdown without relying on an LLM judge).
License
MIT — all scenarios are synthetic test fixtures with zero proprietary or customer data.