https://github.com/elifuzz/capsa
Rust-powered SQL guardrail that flags unsafe, costly, or brittle queries before they reach production.
https://github.com/elifuzz/capsa
ai-ready dataops preflight-checks reliability sql-parser sql-scanner
Last synced: about 2 months ago
JSON representation
Rust-powered SQL guardrail that flags unsafe, costly, or brittle queries before they reach production.
- Host: GitHub
- URL: https://github.com/elifuzz/capsa
- Owner: EliFuzz
- License: apache-2.0
- Created: 2026-04-26T23:05:38.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-26T23:16:09.000Z (about 2 months ago)
- Last Synced: 2026-04-27T01:17:49.605Z (about 2 months ago)
- Topics: ai-ready, dataops, preflight-checks, reliability, sql-parser, sql-scanner
- Language: Rust
- Homepage:
- Size: 38.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# capsa
SQL validation for teams that want bad queries caught before they ship.
`capsa` parses SQL, validates dialect syntax, and scans the query against rule sets for security, performance, reliability, and data-handling risk. It does not execute SQL. It gives you fast feedback on the query you are about to run, review, or deploy.
## What It Does
- Parses SQL into statements for validation
- Supports dialect-aware validation through parser plugins
- Checks query against compiled rules
- Runs schema validation and rule validation in parallel
- Returns a compact list of findings
## Usage
1. Build: `cargo build --profile release -p cli`
2. Run: `capsa -q "SELECT * FROM users"` - ouputs: `["SELECT *; list required columns", "Unbounded SELECT; add WHERE, LIMIT, or pagination"]`
3. Dialect (optional): `capsa -q "SELECT * FROM users" -d postgres`. Supported dialects: ansi, bigquery, clickhouse, databricks, duckdb, generic, hive, mssql, mysql, postgres, redshift, snowflake, sqlite.
## Build
Dialects are implemented as plugins. To build with a specific dialect: `cargo build -p core-sql --features postgres`.