How it works

Every text-to-SQL demo generates a query and prays. SQL Sentinel is the verification layer those demos skip: generate, then prove the SQL is safe and correct — against your real schema, before anything runs.

The two tabs

The checks

CheckSeverityWhat it does
UNKNOWN_TABLE / UNKNOWN_COLUMNerrorEvery table and column must exist in your schema. Misspellings get a did-you-mean suggestion (Levenshtein).
DESTRUCTIVE_NO_WHEREerrorDELETE/UPDATE without WHERE is blocked. DROP/TRUNCATE are always blocked.
DESTRUCTIVE_WHEREwarningDELETE/UPDATE with WHERE passes with a warning — preview with SELECT first.
CROSS_JOIN / IMPLICIT_CROSS_JOINwarningJoins with no ON condition pair every row with every row.
TYPE_MISMATCHwarningComparing a number column to a string literal, etc. (Date literals vs datetime columns are allowed — that's idiomatic.)
AMBIGUOUS_COLUMNwarningA column name exists in two joined tables — qualify it.
PII_ACCESSwarningFlags likely-PII columns (email, phone, SSN, …) by name heuristic.
MISSING_LIMITwarningNo LIMIT on a non-aggregated query — could return the whole table.
SELECT_STARinfoSELECT * returns everything, including future schema surprises.

The verdict

Honest limits

Privacy

100% client-side. Your schema and SQL never leave this browser. The only network call in the entire app is the one you trigger on the Generate tab, to your chosen provider's API, with your key. The Verify tab works fully offline.

Phase 2 — done

SQL Sentinel as a GitHub Action — the code reviewer for AI-written SQL. It validates SQL in pull requests (dbt models, migrations), explains the diff in plain English, and flags dangerous changes before merge. k1sh0r3/sql-sentinel-action