sqlguard-ninja 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sqlguard_ninja/__init__.py +35 -0
- sqlguard_ninja/_data/benchmarks/datasets/v1/cases/01_destructive.yaml +169 -0
- sqlguard_ninja/_data/benchmarks/datasets/v1/cases/02_multi_statement_and_formatting.yaml +155 -0
- sqlguard_ninja/_data/benchmarks/datasets/v1/cases/03_table_and_column_access.yaml +205 -0
- sqlguard_ninja/_data/benchmarks/datasets/v1/cases/04_privacy.yaml +245 -0
- sqlguard_ninja/_data/benchmarks/datasets/v1/cases/05_tenant_isolation.yaml +167 -0
- sqlguard_ninja/_data/benchmarks/datasets/v1/cases/06_cte_nested_unicode.yaml +168 -0
- sqlguard_ninja/_data/benchmarks/datasets/v1/cases/07_legitimate_lookalike_cost_dialect.yaml +243 -0
- sqlguard_ninja/_data/benchmarks/datasets/v1/generated/grant_matrix.yaml +573 -0
- sqlguard_ninja/_data/benchmarks/datasets/v1/generated/label_matrix.yaml +403 -0
- sqlguard_ninja/_data/benchmarks/datasets/v1/generated/tenant_matrix.yaml +684 -0
- sqlguard_ninja/_data/benchmarks/datasets/v1/generated/transforms.yaml +927 -0
- sqlguard_ninja/_data/benchmarks/datasets/v1/manifest.yaml +15 -0
- sqlguard_ninja/_data/benchmarks/policies/retail_saas.yaml +259 -0
- sqlguard_ninja/_version.py +1 -0
- sqlguard_ninja/benchmarking/__init__.py +1 -0
- sqlguard_ninja/benchmarking/adapters.py +303 -0
- sqlguard_ninja/benchmarking/builtin.py +39 -0
- sqlguard_ninja/benchmarking/compare.py +168 -0
- sqlguard_ninja/benchmarking/dataset.py +265 -0
- sqlguard_ninja/benchmarking/fixtures.py +274 -0
- sqlguard_ninja/benchmarking/metrics.py +114 -0
- sqlguard_ninja/benchmarking/runner.py +126 -0
- sqlguard_ninja/benchmarking/translate.py +64 -0
- sqlguard_ninja/benchmarking/workers/_protocol.py +53 -0
- sqlguard_ninja/benchmarking/workers/agent_sql_guard_worker.py +40 -0
- sqlguard_ninja/benchmarking/workers/krish_sqlguard_worker.py +25 -0
- sqlguard_ninja/benchmarking/workers/sql_guardrail_worker.py +48 -0
- sqlguard_ninja/cli/__init__.py +1 -0
- sqlguard_ninja/cli/config.py +76 -0
- sqlguard_ninja/cli/main.py +433 -0
- sqlguard_ninja/cli/templates.py +91 -0
- sqlguard_ninja/core/__init__.py +1 -0
- sqlguard_ninja/core/analysis.py +581 -0
- sqlguard_ninja/core/findings.py +133 -0
- sqlguard_ninja/core/guard.py +256 -0
- sqlguard_ninja/core/rules/__init__.py +1 -0
- sqlguard_ninja/core/rules/access.py +127 -0
- sqlguard_ninja/core/rules/base.py +40 -0
- sqlguard_ninja/core/rules/catalog.py +61 -0
- sqlguard_ninja/core/rules/functions.py +197 -0
- sqlguard_ninja/core/rules/statements.py +99 -0
- sqlguard_ninja/core/rules/structure.py +72 -0
- sqlguard_ninja/core/rules/tenant.py +196 -0
- sqlguard_ninja/integrations/__init__.py +43 -0
- sqlguard_ninja/integrations/audit.py +109 -0
- sqlguard_ninja/integrations/checkpoint.py +342 -0
- sqlguard_ninja/integrations/executors.py +64 -0
- sqlguard_ninja/integrations/fastapi.py +89 -0
- sqlguard_ninja/integrations/langchain.py +67 -0
- sqlguard_ninja/integrations/langgraph.py +87 -0
- sqlguard_ninja/policy/__init__.py +39 -0
- sqlguard_ninja/policy/model.py +370 -0
- sqlguard_ninja/privacy/__init__.py +9 -0
- sqlguard_ninja/privacy/rules.py +286 -0
- sqlguard_ninja/privacy/suggest.py +46 -0
- sqlguard_ninja/py.typed +0 -0
- sqlguard_ninja/query_cost/__init__.py +1 -0
- sqlguard_ninja/query_cost/postgres.py +226 -0
- sqlguard_ninja/query_cost/static.py +241 -0
- sqlguard_ninja/reporting/__init__.py +1 -0
- sqlguard_ninja/reporting/markdown.py +137 -0
- sqlguard_ninja-0.1.0.dist-info/METADATA +370 -0
- sqlguard_ninja-0.1.0.dist-info/RECORD +68 -0
- sqlguard_ninja-0.1.0.dist-info/WHEEL +4 -0
- sqlguard_ninja-0.1.0.dist-info/entry_points.txt +2 -0
- sqlguard_ninja-0.1.0.dist-info/licenses/LICENSE +202 -0
- sqlguard_ninja-0.1.0.dist-info/licenses/THIRD_PARTY_NOTICES.md +56 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
SQLGuard Ninja is licensed under Apache-2.0. **It does not vendor or copy third-party source
|
|
4
|
+
code.** The projects below are used as ordinary dependencies, installed by the package
|
|
5
|
+
manager under their own licences. Licences were read from installed package metadata on
|
|
6
|
+
2026-10-24. Always check the version you install.
|
|
7
|
+
|
|
8
|
+
## Runtime dependencies (core install)
|
|
9
|
+
|
|
10
|
+
| Package | Version tested | Licence | Use |
|
|
11
|
+
|---|---|---|---|
|
|
12
|
+
| [sqlglot](https://github.com/tobymao/sqlglot) | 30.24.0 | MIT | SQL parsing, dialects, scope analysis, column qualification |
|
|
13
|
+
| [pydantic](https://github.com/pydantic/pydantic) (+ pydantic-core) | 2.14.1 | MIT | Policy/config schema validation |
|
|
14
|
+
| [PyYAML](https://pyyaml.org/) | 6.0.3 | MIT | Policy and dataset files |
|
|
15
|
+
|
|
16
|
+
## Optional extras
|
|
17
|
+
|
|
18
|
+
| Extra | Package | Version tested | Licence |
|
|
19
|
+
|---|---|---|---|
|
|
20
|
+
| `langchain` | langchain-core | 1.7.0 | MIT |
|
|
21
|
+
| `langgraph` | langgraph | 1.2.17 | MIT |
|
|
22
|
+
| `fastapi` | fastapi / starlette | 0.162.0 / 1.9.0 | MIT / BSD-3-Clause |
|
|
23
|
+
| `postgres` | psycopg (+ psycopg-binary) | 3.3.6 | LGPL-3.0-only |
|
|
24
|
+
|
|
25
|
+
psycopg is LGPL-3.0. SQLGuard Ninja only imports it at runtime when the `postgres` extra is
|
|
26
|
+
installed. It is not modified or bundled, which is compatible with distributing SQLGuard Ninja
|
|
27
|
+
under Apache-2.0.
|
|
28
|
+
|
|
29
|
+
## Development and test tools (not distributed)
|
|
30
|
+
|
|
31
|
+
pytest (MIT), pytest-cov (MIT), hypothesis (MPL-2.0), httpx (BSD-3-Clause), ruff (MIT),
|
|
32
|
+
mypy (MIT), build (MIT). `pgserver` is optionally used for local PostgreSQL tests. It is not a
|
|
33
|
+
declared dependency, and its package metadata on PyPI does not declare a licence. It bundles
|
|
34
|
+
PostgreSQL binaries (PostgreSQL License).
|
|
35
|
+
|
|
36
|
+
## External validators used for benchmarking only
|
|
37
|
+
|
|
38
|
+
Installed into isolated virtual environments by `scripts/setup_external_adapters.py`, never
|
|
39
|
+
redistributed:
|
|
40
|
+
|
|
41
|
+
| Tool | Version | Licence | Source |
|
|
42
|
+
|---|---|---|---|
|
|
43
|
+
| sql-guardrail | 0.5.2 | MIT | https://github.com/nickusevich/sql-guardrail |
|
|
44
|
+
| agent-sql-guard | 0.2.0 | Apache-2.0 declared in `pyproject.toml`; the repository contains no LICENSE file | https://github.com/sakura-sky/sql-guard |
|
|
45
|
+
| sqlguard (krish2105) | git 62327f2 | MIT | https://github.com/krish2105/sqlguard |
|
|
46
|
+
|
|
47
|
+
## GitHub Actions
|
|
48
|
+
|
|
49
|
+
`actions/checkout`, `actions/setup-python` and `actions/upload-artifact` (MIT, GitHub) are
|
|
50
|
+
referenced by commit SHA in the workflows and the composite action.
|
|
51
|
+
|
|
52
|
+
## Data
|
|
53
|
+
|
|
54
|
+
All benchmark data and fixture rows are synthetic and were written for this project. Card
|
|
55
|
+
numbers are the published test PAN `4111111111111111`. Emails use the reserved
|
|
56
|
+
`example.com`/`example.org` domains. No third-party datasets were used.
|