Skip to content

feat(sqlguard): v1.1.0 AST, permissions, risk score, DataPilot API - #1

Merged
tangyf07 merged 1 commit into
mainfrom
feat/sqlguard-1.1
Sep 6, 2026
Merged

feat(sqlguard): v1.1.0 AST, permissions, risk score, DataPilot API#1
tangyf07 merged 1 commit into
mainfrom
feat/sqlguard-1.1

Conversation

@tangyf07

@tangyf07 tangyf07 commented Sep 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • SQLGuard 1.1.0 upgrade in place on sql-write-gate (package/CLI names unchanged).
  • Stronger sqlglot AST analysis: cartesian / missing-predicate JOINs, tautology WHERE as full-table write, DDL/DML flags on ParsedSQL.findings.
  • GameStream-style permissions.tables allowlists + schema hallucination blocks (schema_hallucination) with CTE-aware SELECT checks.
  • Numeric risk_score (0–100) + risk_factors on every Decision; optional EXPLAIN cost guard with offline degrade.
  • Richer audit JSONL: actor, model_id, prompt_summary, risk_score, latency_ms, success.
  • DataPilot BLOCK/EXECUTE surface: CLI datapilot / serve, MCP tools, HTTP (/v1/check, /v1/execute), write_gate.datapilot + sqlguard alias.
  • Pluggable guard registry; demo + tests/test_v110.py.

Test plan

  • make test (offline DuckDB) — green
  • make demo — AST / hallucination / risk / audit + walkthrough green
  • Spot-check sql-write-gate serve + POST /v1/check locally if desired

Evolve sql-write-gate in place as SQLGuard: stronger sqlglot AST analysis
(cartesian joins, tautology WHERE), GameStream-style table permissions,
numeric risk_score on Decision, schema hallucination blocks, richer audit
fields, pluggable guard registry, DataPilot BLOCK/EXECUTE HTTP+MCP+CLI,
and demo coverage. Package/CLI names unchanged.
@tangyf07
tangyf07 merged commit fdcc8d4 into main Sep 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant