Repository navigation
Done
Labels
area:securityGuarantees of the threat modelsize:m1-2 daystype:corpusAdversarial corpus casestype:featureNew capability
Description
Parent epic: #165
Priority: P0
Problem
Agent frameworks ship their own SQL validators (keyword lists, first-word checks, regexes for CTEs) and nobody measures them. There is no public, reproducible comparison of how many attacks each one lets through and how many legitimate queries it blocks.
Proposal
bench/harness that runs two corpora: attacks (the existing adversarial corpus, Property-based fuzzing of the guard against real engines, with canary data #62 and LLM red team: Claude generates new attacks against our own guard, and every query is kept #63) and legitimate queries, to measure false positives (columns namedopen,close,version,user,set...).- Adapters run validators locally against pinned versions: sqlguardllm, a keyword-list baseline, and third-party validators.
- Metrics per validator and dialect: bypass rate, false-positive rate, ms per check.
- Publication rule: results for a third-party validator are published only when every finding behind them is already public (published advisory, public issue or released fix), or 90 days after the maintainers acknowledged a private report. Adapters and results that don't meet the rule stay out of this repository.
- Output: docs page, JSON and a reproduction script. It feeds the paper (Paper: add the fuzzing and LLM red-team evaluation, with the full query dataset #64).
Security impact
None on the guard. Disclosure risk is handled by the publication rule.
Acceptance criteria
- Harness, legitimate-query corpus, and sqlguardllm and baseline adapters (public).
- Publication checklist in
docs/BENCHMARK.md. - First public table: sqlguardllm versus the baseline. Third-party columns are added only under the rule.
Relevant files
bench/(new) ·docs/BENCHMARK.md(new)
Size
M
Metadata
Metadata
Assignees
Labels
area:securityGuarantees of the threat modelsize:m1-2 daystype:corpusAdversarial corpus casestype:featureNew capability
Activity
Add public benchmark of SQL guards for LLM agents (#174) (#177)
jmmana commentedon Nov 30, 2026
Delivered in #177 (merged at f4144e6, all PR and main checks green).
benchmarks/guards/run.py(bypass rate, false-positive rate, ms/check, per dialect, JSON output). Reproduce withuv run python benchmarks/guards/run.py.benchmarks/guards/legitimate.yaml(34 queries). Attack corpus: 69 read-only-class cases fromtests/corpus.tests/test_guard_benchmark.py; ruff, mypy and pytest green in CI.All three acceptance criteria are met. Third-party columns will be added later under the publication rule.
Add public benchmark of SQL guards for LLM agents (#174) (#177)