SQLGuard Ninja v0.5.0
Highlights
- MySQL 8, tested within a documented scope. A MySQL 8.4 service container in CI loads the synthetic fixture and executes every MySQL
allow case in the corpus as a SELECT-only account through the new read-only executor (sqlguard_ninja.integrations.mysql, extra [mysql]).
- Conservative MySQL semantics. Identifiers are compared exactly and never case-folded. Mixed-case references such as
o.ID are denied: a documented, fail-closed false positive. Named placeholders are bound through the AST (ADR-013); unknown or anonymous placeholders and values containing backslash or NUL are refused. The executor also refuses sessions whose sql_mode would make the server read validated SQL differently (ANSI_QUOTES, NO_BACKSLASH_ESCAPES, PIPES_AS_CONCAT, HIGH_NOT_PRECEDENCE, ANSI).
- Corpus 1.2.0. It adds 26 MySQL cases, with no existing labels changed. The results are in
docs/benchmarks/RESULTS_v1.2.md.
- Compatibility matrix.
docs/guides/DATABASE_COMPATIBILITY.md covers the dialects. SQL Server and Oracle remain parser-level experimental. Oracle denies everything against a lower-case catalog.
Notes
- All benchmark results are still internal (issues #5 and #6). There is no MySQL plan inspection. There is no guarantee against SQL injection or data leakage. Use least-privilege accounts and row-level controls.
Installation
python -m pip install "sqlguard-ninja[mysql]==0.5.0"
PyPI: https://pypi.org/project/sqlguard-ninja/0.5.0/