feat(sqlguard): v1.1.0 AST, permissions, risk score, DataPilot API - #1
Merged
Conversation
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.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sql-write-gate(package/CLI names unchanged).WHEREas full-table write, DDL/DML flags onParsedSQL.findings.permissions.tablesallowlists + schema hallucination blocks (schema_hallucination) with CTE-aware SELECT checks.risk_score(0–100) +risk_factorson everyDecision; optional EXPLAIN cost guard with offline degrade.actor,model_id,prompt_summary,risk_score,latency_ms,success.datapilot/serve, MCP tools, HTTP (/v1/check,/v1/execute),write_gate.datapilot+sqlguardalias.tests/test_v110.py.Test plan
make test(offline DuckDB) — greenmake demo— AST / hallucination / risk / audit + walkthrough greensql-write-gate serve+POST /v1/checklocally if desired