Repository navigation
Description
Objective
Extend sqlguardllm from a read-only SQL firewall into the safety layer for agents that touch databases: controlled writes, prompt injection carried in query results, existing MCP servers, stored procedures, and a public benchmark.
Scope
- P0: FEAT-003 proxy mode · FEAT-005 benchmark harness
- P1: FEAT-001 controlled writes with approval and undo · FEAT-002 tainted sessions
- P2: FEAT-004 allowlisted stored procedures
Principles
- Off by default. Read-only stays the default guarantee.
- Fail closed. Decisions are deterministic: no LLM in the decision path.
- Every feature updates
docs/THREAT_MODEL.md, the adversarial corpus, and the English and Spanish quickstarts.
Acceptance criteria
- Each child ships with docs, corpus cases, engine tests and a short demo.
- Every new violation code is stable and translated (EN / ES).
Children
- FEAT-001 — Controlled writes: write policy, human approval and undo #170 FEAT-001 — Controlled writes: write policy, human approval and undo
- FEAT-002 — Tainted sessions: defend against prompt injection carried in query results #171 FEAT-002 — Tainted sessions: defend against prompt injection carried in query results
- FEAT-003 — Proxy mode: guard any existing database MCP server #172 FEAT-003 — Proxy mode: guard any existing database MCP server
- FEAT-004 — Allowlisted stored procedures with typed, context-bound parameters #173 FEAT-004 — Allowlisted stored procedures with typed, context-bound parameters
- FEAT-005 — Public benchmark of SQL guards for LLM agents #174 FEAT-005 — Public benchmark of SQL guards for LLM agents
- FEAT-006 — Guard benchmark any validator author can run #182 FEAT-006 — Guard benchmark any validator author can run
Epic-level follow-up
All six child issues are closed. The epic still tracks bilingual quickstart coverage and evidence for docs, corpus, engine tests and demos across the full scope. See the child closure comments for the evidence delivered so far.
Bilingual quickstart coverage for the five feature areas shipped in #207 after all seven CI workflows passed. PR #210 shipped the procedure demo and reconciled the EN/ES proxy test documentation after seven green workflows. Seven new policy codes were verified in the EN/ES message catalog. The proxy also returns local protocol and tool errors, whose text is still in English. The all-child corpus, engine-test and demo criterion remains open pending full coverage.
Remaining cross-child evidence
- FEAT-002 — Tainted sessions: defend against prompt injection carried in query results #171: the two-client test establishes session isolation over MCP. The epic still needs a corresponding real-engine run for session taint if that is required for feature-level coverage.
- FEAT-003 — Proxy mode: guard any existing database MCP server #172: real-engine proxy coverage and the bilingual examples are available. The guard corpus and proxy-specific refusal tests are tracked separately.
- FEAT-005 — Public benchmark of SQL guards for LLM agents #174 and FEAT-006 — Guard benchmark any validator author can run #182: the benchmark guide provides runnable examples, corpus and comparison results. The harness measures guard decisions and currently does not require a database engine.
Activity
Document optional agent controls in both quickstarts (#165)
Document optional agent controls in both quickstarts (#165) (#207)
Add a procedure demo and reconcile proxy test evidence (#165)
Add a procedure demo and reconcile proxy test evidence (#165) (#210)