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,927 @@
|
|
|
1
|
+
# GENERATED by scripts/generate_corpus.py (seed 20261024). Do not edit by hand.
|
|
2
|
+
cases:
|
|
3
|
+
- id: GEN-XFORM-s1-comments
|
|
4
|
+
role: support_analyst
|
|
5
|
+
sql: 'SELECT o.id, o.status /* source */ FROM orders o
|
|
6
|
+
|
|
7
|
+
-- filter follows
|
|
8
|
+
|
|
9
|
+
WHERE o.tenant_id = 1'
|
|
10
|
+
category: comments_formatting
|
|
11
|
+
expected: allow
|
|
12
|
+
reason: none
|
|
13
|
+
provenance: generated:transform/comments@20261024
|
|
14
|
+
explanation: Semantics-preserving 'comments' rewrite of base query s1 (allow).
|
|
15
|
+
dialects: &id001
|
|
16
|
+
- postgres
|
|
17
|
+
- sqlite
|
|
18
|
+
- id: GEN-XFORM-s1-whitespace
|
|
19
|
+
role: support_analyst
|
|
20
|
+
sql: "SELECT\n\t o.id,\n\t o.status\n\t FROM\n\t orders\n\t o\n\t WHERE\n\t o.tenant_id\n\t =\n\t 1"
|
|
21
|
+
category: comments_formatting
|
|
22
|
+
expected: allow
|
|
23
|
+
reason: none
|
|
24
|
+
provenance: generated:transform/whitespace@20261024
|
|
25
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query s1 (allow).
|
|
26
|
+
dialects: *id001
|
|
27
|
+
- id: GEN-XFORM-s1-lowercase
|
|
28
|
+
role: support_analyst
|
|
29
|
+
sql: select o.id, o.status from orders o where o.tenant_id = 1
|
|
30
|
+
category: comments_formatting
|
|
31
|
+
expected: allow
|
|
32
|
+
reason: none
|
|
33
|
+
provenance: generated:transform/lowercase@20261024
|
|
34
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query s1 (allow).
|
|
35
|
+
dialects: *id001
|
|
36
|
+
- id: GEN-XFORM-s1-mixedcase
|
|
37
|
+
role: support_analyst
|
|
38
|
+
sql: sElEcT o.id, o.status fRoM orders o wHeRe o.tenant_id = 1
|
|
39
|
+
category: comments_formatting
|
|
40
|
+
expected: allow
|
|
41
|
+
reason: none
|
|
42
|
+
provenance: generated:transform/mixedcase@20261024
|
|
43
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query s1 (allow).
|
|
44
|
+
dialects: *id001
|
|
45
|
+
- id: GEN-XFORM-s1-paren_where
|
|
46
|
+
role: support_analyst
|
|
47
|
+
sql: SELECT o.id, o.status FROM orders o WHERE (o.tenant_id = 1)
|
|
48
|
+
category: comments_formatting
|
|
49
|
+
expected: allow
|
|
50
|
+
reason: none
|
|
51
|
+
provenance: generated:transform/paren_where@20261024
|
|
52
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query s1 (allow).
|
|
53
|
+
dialects: *id001
|
|
54
|
+
- id: GEN-XFORM-s1-derived
|
|
55
|
+
role: support_analyst
|
|
56
|
+
sql: SELECT w.* FROM (SELECT o.id, o.status FROM orders o WHERE o.tenant_id = 1) AS w
|
|
57
|
+
category: nested_query
|
|
58
|
+
expected: allow
|
|
59
|
+
reason: none
|
|
60
|
+
provenance: generated:transform/derived@20261024
|
|
61
|
+
explanation: Semantics-preserving 'derived' rewrite of base query s1 (allow).
|
|
62
|
+
dialects: *id001
|
|
63
|
+
- id: GEN-XFORM-s1-cte
|
|
64
|
+
role: support_analyst
|
|
65
|
+
sql: WITH w AS (SELECT o.id, o.status FROM orders o WHERE o.tenant_id = 1) SELECT * FROM w
|
|
66
|
+
category: nested_query
|
|
67
|
+
expected: allow
|
|
68
|
+
reason: none
|
|
69
|
+
provenance: generated:transform/cte@20261024
|
|
70
|
+
explanation: Semantics-preserving 'cte' rewrite of base query s1 (allow).
|
|
71
|
+
dialects: *id001
|
|
72
|
+
- id: GEN-XFORM-s2-comments
|
|
73
|
+
role: support_analyst
|
|
74
|
+
sql: 'SELECT s.carrier, COUNT(*) AS n /* source */ FROM shipments s
|
|
75
|
+
|
|
76
|
+
-- filter follows
|
|
77
|
+
|
|
78
|
+
WHERE s.tenant_id = 1 GROUP BY s.carrier'
|
|
79
|
+
category: comments_formatting
|
|
80
|
+
expected: allow
|
|
81
|
+
reason: none
|
|
82
|
+
provenance: generated:transform/comments@20261024
|
|
83
|
+
explanation: Semantics-preserving 'comments' rewrite of base query s2 (allow).
|
|
84
|
+
dialects: *id001
|
|
85
|
+
- id: GEN-XFORM-s2-whitespace
|
|
86
|
+
role: support_analyst
|
|
87
|
+
sql: "SELECT\n\t s.carrier,\n\t COUNT(*)\n\t AS\n\t n\n\t FROM\n\t shipments\n\t s\n\t WHERE\n\t s.tenant_id\n\t\
|
|
88
|
+
\ =\n\t 1\n\t GROUP\n\t BY\n\t s.carrier"
|
|
89
|
+
category: comments_formatting
|
|
90
|
+
expected: allow
|
|
91
|
+
reason: none
|
|
92
|
+
provenance: generated:transform/whitespace@20261024
|
|
93
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query s2 (allow).
|
|
94
|
+
dialects: *id001
|
|
95
|
+
- id: GEN-XFORM-s2-lowercase
|
|
96
|
+
role: support_analyst
|
|
97
|
+
sql: select s.carrier, count(*) as n from shipments s where s.tenant_id = 1 group by s.carrier
|
|
98
|
+
category: comments_formatting
|
|
99
|
+
expected: allow
|
|
100
|
+
reason: none
|
|
101
|
+
provenance: generated:transform/lowercase@20261024
|
|
102
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query s2 (allow).
|
|
103
|
+
dialects: *id001
|
|
104
|
+
- id: GEN-XFORM-s2-mixedcase
|
|
105
|
+
role: support_analyst
|
|
106
|
+
sql: sElEcT s.carrier, cOuNt(*) aS n fRoM shipments s wHeRe s.tenant_id = 1 gRoUp bY s.carrier
|
|
107
|
+
category: comments_formatting
|
|
108
|
+
expected: allow
|
|
109
|
+
reason: none
|
|
110
|
+
provenance: generated:transform/mixedcase@20261024
|
|
111
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query s2 (allow).
|
|
112
|
+
dialects: *id001
|
|
113
|
+
- id: GEN-XFORM-s2-paren_where
|
|
114
|
+
role: support_analyst
|
|
115
|
+
sql: SELECT s.carrier, COUNT(*) AS n FROM shipments s WHERE (s.tenant_id = 1) GROUP BY s.carrier
|
|
116
|
+
category: comments_formatting
|
|
117
|
+
expected: allow
|
|
118
|
+
reason: none
|
|
119
|
+
provenance: generated:transform/paren_where@20261024
|
|
120
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query s2 (allow).
|
|
121
|
+
dialects: *id001
|
|
122
|
+
- id: GEN-XFORM-s2-derived
|
|
123
|
+
role: support_analyst
|
|
124
|
+
sql: SELECT w.* FROM (SELECT s.carrier, COUNT(*) AS n FROM shipments s WHERE s.tenant_id = 1 GROUP BY s.carrier) AS w
|
|
125
|
+
category: nested_query
|
|
126
|
+
expected: allow
|
|
127
|
+
reason: none
|
|
128
|
+
provenance: generated:transform/derived@20261024
|
|
129
|
+
explanation: Semantics-preserving 'derived' rewrite of base query s2 (allow).
|
|
130
|
+
dialects: *id001
|
|
131
|
+
- id: GEN-XFORM-s2-cte
|
|
132
|
+
role: support_analyst
|
|
133
|
+
sql: WITH w AS (SELECT s.carrier, COUNT(*) AS n FROM shipments s WHERE s.tenant_id = 1 GROUP BY s.carrier) SELECT * FROM
|
|
134
|
+
w
|
|
135
|
+
category: nested_query
|
|
136
|
+
expected: allow
|
|
137
|
+
reason: none
|
|
138
|
+
provenance: generated:transform/cte@20261024
|
|
139
|
+
explanation: Semantics-preserving 'cte' rewrite of base query s2 (allow).
|
|
140
|
+
dialects: *id001
|
|
141
|
+
- id: GEN-XFORM-s3-comments
|
|
142
|
+
role: hr_analyst
|
|
143
|
+
sql: SELECT e.department, AVG(e.salary) AS a /* source */ FROM employees e GROUP BY e.department
|
|
144
|
+
category: comments_formatting
|
|
145
|
+
expected: allow
|
|
146
|
+
reason: none
|
|
147
|
+
provenance: generated:transform/comments@20261024
|
|
148
|
+
explanation: Semantics-preserving 'comments' rewrite of base query s3 (allow).
|
|
149
|
+
dialects: *id001
|
|
150
|
+
- id: GEN-XFORM-s3-whitespace
|
|
151
|
+
role: hr_analyst
|
|
152
|
+
sql: "SELECT\n\t e.department,\n\t AVG(e.salary)\n\t AS\n\t a\n\t FROM\n\t employees\n\t e\n\t GROUP\n\t BY\n\t\
|
|
153
|
+
\ e.department"
|
|
154
|
+
category: comments_formatting
|
|
155
|
+
expected: allow
|
|
156
|
+
reason: none
|
|
157
|
+
provenance: generated:transform/whitespace@20261024
|
|
158
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query s3 (allow).
|
|
159
|
+
dialects: *id001
|
|
160
|
+
- id: GEN-XFORM-s3-lowercase
|
|
161
|
+
role: hr_analyst
|
|
162
|
+
sql: select e.department, avg(e.salary) as a from employees e group by e.department
|
|
163
|
+
category: comments_formatting
|
|
164
|
+
expected: allow
|
|
165
|
+
reason: none
|
|
166
|
+
provenance: generated:transform/lowercase@20261024
|
|
167
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query s3 (allow).
|
|
168
|
+
dialects: *id001
|
|
169
|
+
- id: GEN-XFORM-s3-mixedcase
|
|
170
|
+
role: hr_analyst
|
|
171
|
+
sql: sElEcT e.department, aVg(e.salary) aS a fRoM employees e gRoUp bY e.department
|
|
172
|
+
category: comments_formatting
|
|
173
|
+
expected: allow
|
|
174
|
+
reason: none
|
|
175
|
+
provenance: generated:transform/mixedcase@20261024
|
|
176
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query s3 (allow).
|
|
177
|
+
dialects: *id001
|
|
178
|
+
- id: GEN-XFORM-s3-derived
|
|
179
|
+
role: hr_analyst
|
|
180
|
+
sql: SELECT w.* FROM (SELECT e.department, AVG(e.salary) AS a FROM employees e GROUP BY e.department) AS w
|
|
181
|
+
category: nested_query
|
|
182
|
+
expected: allow
|
|
183
|
+
reason: none
|
|
184
|
+
provenance: generated:transform/derived@20261024
|
|
185
|
+
explanation: Semantics-preserving 'derived' rewrite of base query s3 (allow).
|
|
186
|
+
dialects: *id001
|
|
187
|
+
- id: GEN-XFORM-s3-cte
|
|
188
|
+
role: hr_analyst
|
|
189
|
+
sql: WITH w AS (SELECT e.department, AVG(e.salary) AS a FROM employees e GROUP BY e.department) SELECT * FROM w
|
|
190
|
+
category: nested_query
|
|
191
|
+
expected: allow
|
|
192
|
+
reason: none
|
|
193
|
+
provenance: generated:transform/cte@20261024
|
|
194
|
+
explanation: Semantics-preserving 'cte' rewrite of base query s3 (allow).
|
|
195
|
+
dialects: *id001
|
|
196
|
+
- id: GEN-XFORM-s4-comments
|
|
197
|
+
role: finance_analyst
|
|
198
|
+
sql: 'SELECT p.status, SUM(p.amount) AS total /* source */ FROM payments p
|
|
199
|
+
|
|
200
|
+
-- filter follows
|
|
201
|
+
|
|
202
|
+
WHERE p.tenant_id = 1 GROUP BY p.status'
|
|
203
|
+
category: comments_formatting
|
|
204
|
+
expected: allow
|
|
205
|
+
reason: none
|
|
206
|
+
provenance: generated:transform/comments@20261024
|
|
207
|
+
explanation: Semantics-preserving 'comments' rewrite of base query s4 (allow).
|
|
208
|
+
dialects: *id001
|
|
209
|
+
- id: GEN-XFORM-s4-whitespace
|
|
210
|
+
role: finance_analyst
|
|
211
|
+
sql: "SELECT\n\t p.status,\n\t SUM(p.amount)\n\t AS\n\t total\n\t FROM\n\t payments\n\t p\n\t WHERE\n\t p.tenant_id\n\
|
|
212
|
+
\t =\n\t 1\n\t GROUP\n\t BY\n\t p.status"
|
|
213
|
+
category: comments_formatting
|
|
214
|
+
expected: allow
|
|
215
|
+
reason: none
|
|
216
|
+
provenance: generated:transform/whitespace@20261024
|
|
217
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query s4 (allow).
|
|
218
|
+
dialects: *id001
|
|
219
|
+
- id: GEN-XFORM-s4-lowercase
|
|
220
|
+
role: finance_analyst
|
|
221
|
+
sql: select p.status, sum(p.amount) as total from payments p where p.tenant_id = 1 group by p.status
|
|
222
|
+
category: comments_formatting
|
|
223
|
+
expected: allow
|
|
224
|
+
reason: none
|
|
225
|
+
provenance: generated:transform/lowercase@20261024
|
|
226
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query s4 (allow).
|
|
227
|
+
dialects: *id001
|
|
228
|
+
- id: GEN-XFORM-s4-mixedcase
|
|
229
|
+
role: finance_analyst
|
|
230
|
+
sql: sElEcT p.status, sUm(p.amount) aS total fRoM payments p wHeRe p.tenant_id = 1 gRoUp bY p.status
|
|
231
|
+
category: comments_formatting
|
|
232
|
+
expected: allow
|
|
233
|
+
reason: none
|
|
234
|
+
provenance: generated:transform/mixedcase@20261024
|
|
235
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query s4 (allow).
|
|
236
|
+
dialects: *id001
|
|
237
|
+
- id: GEN-XFORM-s4-paren_where
|
|
238
|
+
role: finance_analyst
|
|
239
|
+
sql: SELECT p.status, SUM(p.amount) AS total FROM payments p WHERE (p.tenant_id = 1) GROUP BY p.status
|
|
240
|
+
category: comments_formatting
|
|
241
|
+
expected: allow
|
|
242
|
+
reason: none
|
|
243
|
+
provenance: generated:transform/paren_where@20261024
|
|
244
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query s4 (allow).
|
|
245
|
+
dialects: *id001
|
|
246
|
+
- id: GEN-XFORM-s4-derived
|
|
247
|
+
role: finance_analyst
|
|
248
|
+
sql: SELECT w.* FROM (SELECT p.status, SUM(p.amount) AS total FROM payments p WHERE p.tenant_id = 1 GROUP BY p.status) AS
|
|
249
|
+
w
|
|
250
|
+
category: nested_query
|
|
251
|
+
expected: allow
|
|
252
|
+
reason: none
|
|
253
|
+
provenance: generated:transform/derived@20261024
|
|
254
|
+
explanation: Semantics-preserving 'derived' rewrite of base query s4 (allow).
|
|
255
|
+
dialects: *id001
|
|
256
|
+
- id: GEN-XFORM-s4-cte
|
|
257
|
+
role: finance_analyst
|
|
258
|
+
sql: WITH w AS (SELECT p.status, SUM(p.amount) AS total FROM payments p WHERE p.tenant_id = 1 GROUP BY p.status) SELECT
|
|
259
|
+
* FROM w
|
|
260
|
+
category: nested_query
|
|
261
|
+
expected: allow
|
|
262
|
+
reason: none
|
|
263
|
+
provenance: generated:transform/cte@20261024
|
|
264
|
+
explanation: Semantics-preserving 'cte' rewrite of base query s4 (allow).
|
|
265
|
+
dialects: *id001
|
|
266
|
+
- id: GEN-XFORM-s5-comments
|
|
267
|
+
role: support_analyst
|
|
268
|
+
sql: 'SELECT c.id, c.email_domain /* source */ FROM customers c
|
|
269
|
+
|
|
270
|
+
-- filter follows
|
|
271
|
+
|
|
272
|
+
WHERE c.tenant_id = 1 ORDER BY c.id LIMIT 10'
|
|
273
|
+
category: comments_formatting
|
|
274
|
+
expected: allow
|
|
275
|
+
reason: none
|
|
276
|
+
provenance: generated:transform/comments@20261024
|
|
277
|
+
explanation: Semantics-preserving 'comments' rewrite of base query s5 (allow).
|
|
278
|
+
dialects: *id001
|
|
279
|
+
- id: GEN-XFORM-s5-whitespace
|
|
280
|
+
role: support_analyst
|
|
281
|
+
sql: "SELECT\n\t c.id,\n\t c.email_domain\n\t FROM\n\t customers\n\t c\n\t WHERE\n\t c.tenant_id\n\t =\n\t 1\n\t\
|
|
282
|
+
\ ORDER\n\t BY\n\t c.id\n\t LIMIT\n\t 10"
|
|
283
|
+
category: comments_formatting
|
|
284
|
+
expected: allow
|
|
285
|
+
reason: none
|
|
286
|
+
provenance: generated:transform/whitespace@20261024
|
|
287
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query s5 (allow).
|
|
288
|
+
dialects: *id001
|
|
289
|
+
- id: GEN-XFORM-s5-lowercase
|
|
290
|
+
role: support_analyst
|
|
291
|
+
sql: select c.id, c.email_domain from customers c where c.tenant_id = 1 order by c.id limit 10
|
|
292
|
+
category: comments_formatting
|
|
293
|
+
expected: allow
|
|
294
|
+
reason: none
|
|
295
|
+
provenance: generated:transform/lowercase@20261024
|
|
296
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query s5 (allow).
|
|
297
|
+
dialects: *id001
|
|
298
|
+
- id: GEN-XFORM-s5-mixedcase
|
|
299
|
+
role: support_analyst
|
|
300
|
+
sql: sElEcT c.id, c.email_domain fRoM customers c wHeRe c.tenant_id = 1 oRdEr bY c.id lImIt 10
|
|
301
|
+
category: comments_formatting
|
|
302
|
+
expected: allow
|
|
303
|
+
reason: none
|
|
304
|
+
provenance: generated:transform/mixedcase@20261024
|
|
305
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query s5 (allow).
|
|
306
|
+
dialects: *id001
|
|
307
|
+
- id: GEN-XFORM-s5-paren_where
|
|
308
|
+
role: support_analyst
|
|
309
|
+
sql: SELECT c.id, c.email_domain FROM customers c WHERE (c.tenant_id = 1) ORDER BY c.id LIMIT 10
|
|
310
|
+
category: comments_formatting
|
|
311
|
+
expected: allow
|
|
312
|
+
reason: none
|
|
313
|
+
provenance: generated:transform/paren_where@20261024
|
|
314
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query s5 (allow).
|
|
315
|
+
dialects: *id001
|
|
316
|
+
- id: GEN-XFORM-s5-derived
|
|
317
|
+
role: support_analyst
|
|
318
|
+
sql: SELECT w.* FROM (SELECT c.id, c.email_domain FROM customers c WHERE c.tenant_id = 1 ORDER BY c.id LIMIT 10) AS w
|
|
319
|
+
category: nested_query
|
|
320
|
+
expected: allow
|
|
321
|
+
reason: none
|
|
322
|
+
provenance: generated:transform/derived@20261024
|
|
323
|
+
explanation: Semantics-preserving 'derived' rewrite of base query s5 (allow).
|
|
324
|
+
dialects: *id001
|
|
325
|
+
- id: GEN-XFORM-s5-cte
|
|
326
|
+
role: support_analyst
|
|
327
|
+
sql: WITH w AS (SELECT c.id, c.email_domain FROM customers c WHERE c.tenant_id = 1 ORDER BY c.id LIMIT 10) SELECT * FROM
|
|
328
|
+
w
|
|
329
|
+
category: nested_query
|
|
330
|
+
expected: allow
|
|
331
|
+
reason: none
|
|
332
|
+
provenance: generated:transform/cte@20261024
|
|
333
|
+
explanation: Semantics-preserving 'cte' rewrite of base query s5 (allow).
|
|
334
|
+
dialects: *id001
|
|
335
|
+
- id: GEN-XFORM-s6-comments
|
|
336
|
+
role: warehouse_analyst
|
|
337
|
+
sql: 'SELECT w.region, COUNT(*) AS n /* source */ FROM shipments s JOIN warehouses w ON w.id = s.warehouse_id
|
|
338
|
+
|
|
339
|
+
-- filter follows
|
|
340
|
+
|
|
341
|
+
WHERE s.tenant_id = 1 GROUP BY w.region'
|
|
342
|
+
category: comments_formatting
|
|
343
|
+
expected: allow
|
|
344
|
+
reason: none
|
|
345
|
+
provenance: generated:transform/comments@20261024
|
|
346
|
+
explanation: Semantics-preserving 'comments' rewrite of base query s6 (allow).
|
|
347
|
+
dialects: *id001
|
|
348
|
+
- id: GEN-XFORM-s6-whitespace
|
|
349
|
+
role: warehouse_analyst
|
|
350
|
+
sql: "SELECT\n\t w.region,\n\t COUNT(*)\n\t AS\n\t n\n\t FROM\n\t shipments\n\t s\n\t JOIN\n\t warehouses\n\t \
|
|
351
|
+
\ w\n\t ON\n\t w.id\n\t =\n\t s.warehouse_id\n\t WHERE\n\t s.tenant_id\n\t =\n\t 1\n\t GROUP\n\t BY\n\t w.region"
|
|
352
|
+
category: comments_formatting
|
|
353
|
+
expected: allow
|
|
354
|
+
reason: none
|
|
355
|
+
provenance: generated:transform/whitespace@20261024
|
|
356
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query s6 (allow).
|
|
357
|
+
dialects: *id001
|
|
358
|
+
- id: GEN-XFORM-s6-lowercase
|
|
359
|
+
role: warehouse_analyst
|
|
360
|
+
sql: select w.region, count(*) as n from shipments s join warehouses w on w.id = s.warehouse_id where s.tenant_id = 1 group
|
|
361
|
+
by w.region
|
|
362
|
+
category: comments_formatting
|
|
363
|
+
expected: allow
|
|
364
|
+
reason: none
|
|
365
|
+
provenance: generated:transform/lowercase@20261024
|
|
366
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query s6 (allow).
|
|
367
|
+
dialects: *id001
|
|
368
|
+
- id: GEN-XFORM-s6-mixedcase
|
|
369
|
+
role: warehouse_analyst
|
|
370
|
+
sql: sElEcT w.region, cOuNt(*) aS n fRoM shipments s jOiN warehouses w oN w.id = s.warehouse_id wHeRe s.tenant_id = 1 gRoUp
|
|
371
|
+
bY w.region
|
|
372
|
+
category: comments_formatting
|
|
373
|
+
expected: allow
|
|
374
|
+
reason: none
|
|
375
|
+
provenance: generated:transform/mixedcase@20261024
|
|
376
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query s6 (allow).
|
|
377
|
+
dialects: *id001
|
|
378
|
+
- id: GEN-XFORM-s6-paren_where
|
|
379
|
+
role: warehouse_analyst
|
|
380
|
+
sql: SELECT w.region, COUNT(*) AS n FROM shipments s JOIN warehouses w ON w.id = s.warehouse_id WHERE (s.tenant_id = 1)
|
|
381
|
+
GROUP BY w.region
|
|
382
|
+
category: comments_formatting
|
|
383
|
+
expected: allow
|
|
384
|
+
reason: none
|
|
385
|
+
provenance: generated:transform/paren_where@20261024
|
|
386
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query s6 (allow).
|
|
387
|
+
dialects: *id001
|
|
388
|
+
- id: GEN-XFORM-s6-derived
|
|
389
|
+
role: warehouse_analyst
|
|
390
|
+
sql: SELECT w.* FROM (SELECT w.region, COUNT(*) AS n FROM shipments s JOIN warehouses w ON w.id = s.warehouse_id WHERE s.tenant_id
|
|
391
|
+
= 1 GROUP BY w.region) AS w
|
|
392
|
+
category: nested_query
|
|
393
|
+
expected: allow
|
|
394
|
+
reason: none
|
|
395
|
+
provenance: generated:transform/derived@20261024
|
|
396
|
+
explanation: Semantics-preserving 'derived' rewrite of base query s6 (allow).
|
|
397
|
+
dialects: *id001
|
|
398
|
+
- id: GEN-XFORM-s6-cte
|
|
399
|
+
role: warehouse_analyst
|
|
400
|
+
sql: WITH w AS (SELECT w.region, COUNT(*) AS n FROM shipments s JOIN warehouses w ON w.id = s.warehouse_id WHERE s.tenant_id
|
|
401
|
+
= 1 GROUP BY w.region) SELECT * FROM w
|
|
402
|
+
category: nested_query
|
|
403
|
+
expected: allow
|
|
404
|
+
reason: none
|
|
405
|
+
provenance: generated:transform/cte@20261024
|
|
406
|
+
explanation: Semantics-preserving 'cte' rewrite of base query s6 (allow).
|
|
407
|
+
dialects: *id001
|
|
408
|
+
- id: GEN-XFORM-u1-comments
|
|
409
|
+
role: support_analyst
|
|
410
|
+
sql: 'SELECT p.card_number /* source */ FROM payments p
|
|
411
|
+
|
|
412
|
+
-- filter follows
|
|
413
|
+
|
|
414
|
+
WHERE p.tenant_id = 1'
|
|
415
|
+
category: comments_formatting
|
|
416
|
+
expected: deny
|
|
417
|
+
reason: sensitive_data
|
|
418
|
+
provenance: generated:transform/comments@20261024
|
|
419
|
+
explanation: Semantics-preserving 'comments' rewrite of base query u1 (deny).
|
|
420
|
+
dialects: *id001
|
|
421
|
+
- id: GEN-XFORM-u1-whitespace
|
|
422
|
+
role: support_analyst
|
|
423
|
+
sql: "SELECT\n\t p.card_number\n\t FROM\n\t payments\n\t p\n\t WHERE\n\t p.tenant_id\n\t =\n\t 1"
|
|
424
|
+
category: comments_formatting
|
|
425
|
+
expected: deny
|
|
426
|
+
reason: sensitive_data
|
|
427
|
+
provenance: generated:transform/whitespace@20261024
|
|
428
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query u1 (deny).
|
|
429
|
+
dialects: *id001
|
|
430
|
+
- id: GEN-XFORM-u1-lowercase
|
|
431
|
+
role: support_analyst
|
|
432
|
+
sql: select p.card_number from payments p where p.tenant_id = 1
|
|
433
|
+
category: comments_formatting
|
|
434
|
+
expected: deny
|
|
435
|
+
reason: sensitive_data
|
|
436
|
+
provenance: generated:transform/lowercase@20261024
|
|
437
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query u1 (deny).
|
|
438
|
+
dialects: *id001
|
|
439
|
+
- id: GEN-XFORM-u1-mixedcase
|
|
440
|
+
role: support_analyst
|
|
441
|
+
sql: sElEcT p.card_number fRoM payments p wHeRe p.tenant_id = 1
|
|
442
|
+
category: comments_formatting
|
|
443
|
+
expected: deny
|
|
444
|
+
reason: sensitive_data
|
|
445
|
+
provenance: generated:transform/mixedcase@20261024
|
|
446
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query u1 (deny).
|
|
447
|
+
dialects: *id001
|
|
448
|
+
- id: GEN-XFORM-u1-paren_where
|
|
449
|
+
role: support_analyst
|
|
450
|
+
sql: SELECT p.card_number FROM payments p WHERE (p.tenant_id = 1)
|
|
451
|
+
category: comments_formatting
|
|
452
|
+
expected: deny
|
|
453
|
+
reason: sensitive_data
|
|
454
|
+
provenance: generated:transform/paren_where@20261024
|
|
455
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query u1 (deny).
|
|
456
|
+
dialects: *id001
|
|
457
|
+
- id: GEN-XFORM-u1-derived
|
|
458
|
+
role: support_analyst
|
|
459
|
+
sql: SELECT w.* FROM (SELECT p.card_number FROM payments p WHERE p.tenant_id = 1) AS w
|
|
460
|
+
category: nested_query
|
|
461
|
+
expected: deny
|
|
462
|
+
reason: sensitive_data
|
|
463
|
+
provenance: generated:transform/derived@20261024
|
|
464
|
+
explanation: Semantics-preserving 'derived' rewrite of base query u1 (deny).
|
|
465
|
+
dialects: *id001
|
|
466
|
+
- id: GEN-XFORM-u1-cte
|
|
467
|
+
role: support_analyst
|
|
468
|
+
sql: WITH w AS (SELECT p.card_number FROM payments p WHERE p.tenant_id = 1) SELECT * FROM w
|
|
469
|
+
category: nested_query
|
|
470
|
+
expected: deny
|
|
471
|
+
reason: sensitive_data
|
|
472
|
+
provenance: generated:transform/cte@20261024
|
|
473
|
+
explanation: Semantics-preserving 'cte' rewrite of base query u1 (deny).
|
|
474
|
+
dialects: *id001
|
|
475
|
+
- id: GEN-XFORM-u2-comments
|
|
476
|
+
role: support_analyst
|
|
477
|
+
sql: 'SELECT o.id /* source */ FROM orders o
|
|
478
|
+
|
|
479
|
+
-- filter follows
|
|
480
|
+
|
|
481
|
+
WHERE o.tenant_id = 2'
|
|
482
|
+
category: comments_formatting
|
|
483
|
+
expected: deny
|
|
484
|
+
reason: tenant_isolation
|
|
485
|
+
provenance: generated:transform/comments@20261024
|
|
486
|
+
explanation: Semantics-preserving 'comments' rewrite of base query u2 (deny).
|
|
487
|
+
dialects: *id001
|
|
488
|
+
- id: GEN-XFORM-u2-whitespace
|
|
489
|
+
role: support_analyst
|
|
490
|
+
sql: "SELECT\n\t o.id\n\t FROM\n\t orders\n\t o\n\t WHERE\n\t o.tenant_id\n\t =\n\t 2"
|
|
491
|
+
category: comments_formatting
|
|
492
|
+
expected: deny
|
|
493
|
+
reason: tenant_isolation
|
|
494
|
+
provenance: generated:transform/whitespace@20261024
|
|
495
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query u2 (deny).
|
|
496
|
+
dialects: *id001
|
|
497
|
+
- id: GEN-XFORM-u2-lowercase
|
|
498
|
+
role: support_analyst
|
|
499
|
+
sql: select o.id from orders o where o.tenant_id = 2
|
|
500
|
+
category: comments_formatting
|
|
501
|
+
expected: deny
|
|
502
|
+
reason: tenant_isolation
|
|
503
|
+
provenance: generated:transform/lowercase@20261024
|
|
504
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query u2 (deny).
|
|
505
|
+
dialects: *id001
|
|
506
|
+
- id: GEN-XFORM-u2-mixedcase
|
|
507
|
+
role: support_analyst
|
|
508
|
+
sql: sElEcT o.id fRoM orders o wHeRe o.tenant_id = 2
|
|
509
|
+
category: comments_formatting
|
|
510
|
+
expected: deny
|
|
511
|
+
reason: tenant_isolation
|
|
512
|
+
provenance: generated:transform/mixedcase@20261024
|
|
513
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query u2 (deny).
|
|
514
|
+
dialects: *id001
|
|
515
|
+
- id: GEN-XFORM-u2-paren_where
|
|
516
|
+
role: support_analyst
|
|
517
|
+
sql: SELECT o.id FROM orders o WHERE (o.tenant_id = 2)
|
|
518
|
+
category: comments_formatting
|
|
519
|
+
expected: deny
|
|
520
|
+
reason: tenant_isolation
|
|
521
|
+
provenance: generated:transform/paren_where@20261024
|
|
522
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query u2 (deny).
|
|
523
|
+
dialects: *id001
|
|
524
|
+
- id: GEN-XFORM-u2-derived
|
|
525
|
+
role: support_analyst
|
|
526
|
+
sql: SELECT w.* FROM (SELECT o.id FROM orders o WHERE o.tenant_id = 2) AS w
|
|
527
|
+
category: nested_query
|
|
528
|
+
expected: deny
|
|
529
|
+
reason: tenant_isolation
|
|
530
|
+
provenance: generated:transform/derived@20261024
|
|
531
|
+
explanation: Semantics-preserving 'derived' rewrite of base query u2 (deny).
|
|
532
|
+
dialects: *id001
|
|
533
|
+
- id: GEN-XFORM-u2-cte
|
|
534
|
+
role: support_analyst
|
|
535
|
+
sql: WITH w AS (SELECT o.id FROM orders o WHERE o.tenant_id = 2) SELECT * FROM w
|
|
536
|
+
category: nested_query
|
|
537
|
+
expected: deny
|
|
538
|
+
reason: tenant_isolation
|
|
539
|
+
provenance: generated:transform/cte@20261024
|
|
540
|
+
explanation: Semantics-preserving 'cte' rewrite of base query u2 (deny).
|
|
541
|
+
dialects: *id001
|
|
542
|
+
- id: GEN-XFORM-u3-comments
|
|
543
|
+
role: support_analyst
|
|
544
|
+
sql: 'SELECT o.id /* source */ FROM orders o
|
|
545
|
+
|
|
546
|
+
-- filter follows
|
|
547
|
+
|
|
548
|
+
WHERE o.tenant_id = 1 OR 1 = 1'
|
|
549
|
+
category: comments_formatting
|
|
550
|
+
expected: deny
|
|
551
|
+
reason: tenant_isolation
|
|
552
|
+
provenance: generated:transform/comments@20261024
|
|
553
|
+
explanation: Semantics-preserving 'comments' rewrite of base query u3 (deny).
|
|
554
|
+
dialects: *id001
|
|
555
|
+
- id: GEN-XFORM-u3-whitespace
|
|
556
|
+
role: support_analyst
|
|
557
|
+
sql: "SELECT\n\t o.id\n\t FROM\n\t orders\n\t o\n\t WHERE\n\t o.tenant_id\n\t =\n\t 1\n\t OR\n\t 1\n\t =\n\t\
|
|
558
|
+
\ 1"
|
|
559
|
+
category: comments_formatting
|
|
560
|
+
expected: deny
|
|
561
|
+
reason: tenant_isolation
|
|
562
|
+
provenance: generated:transform/whitespace@20261024
|
|
563
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query u3 (deny).
|
|
564
|
+
dialects: *id001
|
|
565
|
+
- id: GEN-XFORM-u3-lowercase
|
|
566
|
+
role: support_analyst
|
|
567
|
+
sql: select o.id from orders o where o.tenant_id = 1 or 1 = 1
|
|
568
|
+
category: comments_formatting
|
|
569
|
+
expected: deny
|
|
570
|
+
reason: tenant_isolation
|
|
571
|
+
provenance: generated:transform/lowercase@20261024
|
|
572
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query u3 (deny).
|
|
573
|
+
dialects: *id001
|
|
574
|
+
- id: GEN-XFORM-u3-mixedcase
|
|
575
|
+
role: support_analyst
|
|
576
|
+
sql: sElEcT o.id fRoM orders o wHeRe o.tenant_id = 1 oR 1 = 1
|
|
577
|
+
category: comments_formatting
|
|
578
|
+
expected: deny
|
|
579
|
+
reason: tenant_isolation
|
|
580
|
+
provenance: generated:transform/mixedcase@20261024
|
|
581
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query u3 (deny).
|
|
582
|
+
dialects: *id001
|
|
583
|
+
- id: GEN-XFORM-u3-paren_where
|
|
584
|
+
role: support_analyst
|
|
585
|
+
sql: SELECT o.id FROM orders o WHERE (o.tenant_id = 1 OR 1 = 1)
|
|
586
|
+
category: comments_formatting
|
|
587
|
+
expected: deny
|
|
588
|
+
reason: tenant_isolation
|
|
589
|
+
provenance: generated:transform/paren_where@20261024
|
|
590
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query u3 (deny).
|
|
591
|
+
dialects: *id001
|
|
592
|
+
- id: GEN-XFORM-u3-derived
|
|
593
|
+
role: support_analyst
|
|
594
|
+
sql: SELECT w.* FROM (SELECT o.id FROM orders o WHERE o.tenant_id = 1 OR 1 = 1) AS w
|
|
595
|
+
category: nested_query
|
|
596
|
+
expected: deny
|
|
597
|
+
reason: tenant_isolation
|
|
598
|
+
provenance: generated:transform/derived@20261024
|
|
599
|
+
explanation: Semantics-preserving 'derived' rewrite of base query u3 (deny).
|
|
600
|
+
dialects: *id001
|
|
601
|
+
- id: GEN-XFORM-u3-cte
|
|
602
|
+
role: support_analyst
|
|
603
|
+
sql: WITH w AS (SELECT o.id FROM orders o WHERE o.tenant_id = 1 OR 1 = 1) SELECT * FROM w
|
|
604
|
+
category: nested_query
|
|
605
|
+
expected: deny
|
|
606
|
+
reason: tenant_isolation
|
|
607
|
+
provenance: generated:transform/cte@20261024
|
|
608
|
+
explanation: Semantics-preserving 'cte' rewrite of base query u3 (deny).
|
|
609
|
+
dialects: *id001
|
|
610
|
+
- id: GEN-XFORM-u4-comments
|
|
611
|
+
role: hr_analyst
|
|
612
|
+
sql: 'SELECT e.full_name, e.salary /* source */ FROM employees e
|
|
613
|
+
|
|
614
|
+
-- filter follows
|
|
615
|
+
|
|
616
|
+
WHERE e.id > 0'
|
|
617
|
+
category: comments_formatting
|
|
618
|
+
expected: deny
|
|
619
|
+
reason: aggregate_only
|
|
620
|
+
provenance: generated:transform/comments@20261024
|
|
621
|
+
explanation: Semantics-preserving 'comments' rewrite of base query u4 (deny).
|
|
622
|
+
dialects: *id001
|
|
623
|
+
- id: GEN-XFORM-u4-whitespace
|
|
624
|
+
role: hr_analyst
|
|
625
|
+
sql: "SELECT\n\t e.full_name,\n\t e.salary\n\t FROM\n\t employees\n\t e\n\t WHERE\n\t e.id\n\t >\n\t 0"
|
|
626
|
+
category: comments_formatting
|
|
627
|
+
expected: deny
|
|
628
|
+
reason: aggregate_only
|
|
629
|
+
provenance: generated:transform/whitespace@20261024
|
|
630
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query u4 (deny).
|
|
631
|
+
dialects: *id001
|
|
632
|
+
- id: GEN-XFORM-u4-lowercase
|
|
633
|
+
role: hr_analyst
|
|
634
|
+
sql: select e.full_name, e.salary from employees e where e.id > 0
|
|
635
|
+
category: comments_formatting
|
|
636
|
+
expected: deny
|
|
637
|
+
reason: aggregate_only
|
|
638
|
+
provenance: generated:transform/lowercase@20261024
|
|
639
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query u4 (deny).
|
|
640
|
+
dialects: *id001
|
|
641
|
+
- id: GEN-XFORM-u4-mixedcase
|
|
642
|
+
role: hr_analyst
|
|
643
|
+
sql: sElEcT e.full_name, e.salary fRoM employees e wHeRe e.id > 0
|
|
644
|
+
category: comments_formatting
|
|
645
|
+
expected: deny
|
|
646
|
+
reason: aggregate_only
|
|
647
|
+
provenance: generated:transform/mixedcase@20261024
|
|
648
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query u4 (deny).
|
|
649
|
+
dialects: *id001
|
|
650
|
+
- id: GEN-XFORM-u4-paren_where
|
|
651
|
+
role: hr_analyst
|
|
652
|
+
sql: SELECT e.full_name, e.salary FROM employees e WHERE (e.id > 0)
|
|
653
|
+
category: comments_formatting
|
|
654
|
+
expected: deny
|
|
655
|
+
reason: aggregate_only
|
|
656
|
+
provenance: generated:transform/paren_where@20261024
|
|
657
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query u4 (deny).
|
|
658
|
+
dialects: *id001
|
|
659
|
+
- id: GEN-XFORM-u4-derived
|
|
660
|
+
role: hr_analyst
|
|
661
|
+
sql: SELECT w.* FROM (SELECT e.full_name, e.salary FROM employees e WHERE e.id > 0) AS w
|
|
662
|
+
category: nested_query
|
|
663
|
+
expected: deny
|
|
664
|
+
reason: aggregate_only
|
|
665
|
+
provenance: generated:transform/derived@20261024
|
|
666
|
+
explanation: Semantics-preserving 'derived' rewrite of base query u4 (deny).
|
|
667
|
+
dialects: *id001
|
|
668
|
+
- id: GEN-XFORM-u4-cte
|
|
669
|
+
role: hr_analyst
|
|
670
|
+
sql: WITH w AS (SELECT e.full_name, e.salary FROM employees e WHERE e.id > 0) SELECT * FROM w
|
|
671
|
+
category: nested_query
|
|
672
|
+
expected: deny
|
|
673
|
+
reason: aggregate_only
|
|
674
|
+
provenance: generated:transform/cte@20261024
|
|
675
|
+
explanation: Semantics-preserving 'cte' rewrite of base query u4 (deny).
|
|
676
|
+
dialects: *id001
|
|
677
|
+
- id: GEN-XFORM-u5-comments
|
|
678
|
+
role: warehouse_analyst
|
|
679
|
+
sql: 'SELECT e.id /* source */ FROM employees e
|
|
680
|
+
|
|
681
|
+
-- filter follows
|
|
682
|
+
|
|
683
|
+
WHERE e.id > 0'
|
|
684
|
+
category: comments_formatting
|
|
685
|
+
expected: deny
|
|
686
|
+
reason: unauthorized_table
|
|
687
|
+
provenance: generated:transform/comments@20261024
|
|
688
|
+
explanation: Semantics-preserving 'comments' rewrite of base query u5 (deny).
|
|
689
|
+
dialects: *id001
|
|
690
|
+
- id: GEN-XFORM-u5-whitespace
|
|
691
|
+
role: warehouse_analyst
|
|
692
|
+
sql: "SELECT\n\t e.id\n\t FROM\n\t employees\n\t e\n\t WHERE\n\t e.id\n\t >\n\t 0"
|
|
693
|
+
category: comments_formatting
|
|
694
|
+
expected: deny
|
|
695
|
+
reason: unauthorized_table
|
|
696
|
+
provenance: generated:transform/whitespace@20261024
|
|
697
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query u5 (deny).
|
|
698
|
+
dialects: *id001
|
|
699
|
+
- id: GEN-XFORM-u5-lowercase
|
|
700
|
+
role: warehouse_analyst
|
|
701
|
+
sql: select e.id from employees e where e.id > 0
|
|
702
|
+
category: comments_formatting
|
|
703
|
+
expected: deny
|
|
704
|
+
reason: unauthorized_table
|
|
705
|
+
provenance: generated:transform/lowercase@20261024
|
|
706
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query u5 (deny).
|
|
707
|
+
dialects: *id001
|
|
708
|
+
- id: GEN-XFORM-u5-mixedcase
|
|
709
|
+
role: warehouse_analyst
|
|
710
|
+
sql: sElEcT e.id fRoM employees e wHeRe e.id > 0
|
|
711
|
+
category: comments_formatting
|
|
712
|
+
expected: deny
|
|
713
|
+
reason: unauthorized_table
|
|
714
|
+
provenance: generated:transform/mixedcase@20261024
|
|
715
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query u5 (deny).
|
|
716
|
+
dialects: *id001
|
|
717
|
+
- id: GEN-XFORM-u5-paren_where
|
|
718
|
+
role: warehouse_analyst
|
|
719
|
+
sql: SELECT e.id FROM employees e WHERE (e.id > 0)
|
|
720
|
+
category: comments_formatting
|
|
721
|
+
expected: deny
|
|
722
|
+
reason: unauthorized_table
|
|
723
|
+
provenance: generated:transform/paren_where@20261024
|
|
724
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query u5 (deny).
|
|
725
|
+
dialects: *id001
|
|
726
|
+
- id: GEN-XFORM-u5-derived
|
|
727
|
+
role: warehouse_analyst
|
|
728
|
+
sql: SELECT w.* FROM (SELECT e.id FROM employees e WHERE e.id > 0) AS w
|
|
729
|
+
category: nested_query
|
|
730
|
+
expected: deny
|
|
731
|
+
reason: unauthorized_table
|
|
732
|
+
provenance: generated:transform/derived@20261024
|
|
733
|
+
explanation: Semantics-preserving 'derived' rewrite of base query u5 (deny).
|
|
734
|
+
dialects: *id001
|
|
735
|
+
- id: GEN-XFORM-u5-cte
|
|
736
|
+
role: warehouse_analyst
|
|
737
|
+
sql: WITH w AS (SELECT e.id FROM employees e WHERE e.id > 0) SELECT * FROM w
|
|
738
|
+
category: nested_query
|
|
739
|
+
expected: deny
|
|
740
|
+
reason: unauthorized_table
|
|
741
|
+
provenance: generated:transform/cte@20261024
|
|
742
|
+
explanation: Semantics-preserving 'cte' rewrite of base query u5 (deny).
|
|
743
|
+
dialects: *id001
|
|
744
|
+
- id: GEN-XFORM-u6-comments
|
|
745
|
+
role: support_analyst
|
|
746
|
+
sql: 'DELETE /* source */ FROM orders
|
|
747
|
+
|
|
748
|
+
-- filter follows
|
|
749
|
+
|
|
750
|
+
WHERE tenant_id = 1'
|
|
751
|
+
category: comments_formatting
|
|
752
|
+
expected: deny
|
|
753
|
+
reason: write_statement
|
|
754
|
+
provenance: generated:transform/comments@20261024
|
|
755
|
+
explanation: Semantics-preserving 'comments' rewrite of base query u6 (deny).
|
|
756
|
+
dialects: *id001
|
|
757
|
+
- id: GEN-XFORM-u6-whitespace
|
|
758
|
+
role: support_analyst
|
|
759
|
+
sql: "DELETE\n\t FROM\n\t orders\n\t WHERE\n\t tenant_id\n\t =\n\t 1"
|
|
760
|
+
category: comments_formatting
|
|
761
|
+
expected: deny
|
|
762
|
+
reason: write_statement
|
|
763
|
+
provenance: generated:transform/whitespace@20261024
|
|
764
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query u6 (deny).
|
|
765
|
+
dialects: *id001
|
|
766
|
+
- id: GEN-XFORM-u6-lowercase
|
|
767
|
+
role: support_analyst
|
|
768
|
+
sql: delete from orders where tenant_id = 1
|
|
769
|
+
category: comments_formatting
|
|
770
|
+
expected: deny
|
|
771
|
+
reason: write_statement
|
|
772
|
+
provenance: generated:transform/lowercase@20261024
|
|
773
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query u6 (deny).
|
|
774
|
+
dialects: *id001
|
|
775
|
+
- id: GEN-XFORM-u6-mixedcase
|
|
776
|
+
role: support_analyst
|
|
777
|
+
sql: dElEtE fRoM orders wHeRe tenant_id = 1
|
|
778
|
+
category: comments_formatting
|
|
779
|
+
expected: deny
|
|
780
|
+
reason: write_statement
|
|
781
|
+
provenance: generated:transform/mixedcase@20261024
|
|
782
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query u6 (deny).
|
|
783
|
+
dialects: *id001
|
|
784
|
+
- id: GEN-XFORM-u6-paren_where
|
|
785
|
+
role: support_analyst
|
|
786
|
+
sql: DELETE FROM orders WHERE (tenant_id = 1)
|
|
787
|
+
category: comments_formatting
|
|
788
|
+
expected: deny
|
|
789
|
+
reason: write_statement
|
|
790
|
+
provenance: generated:transform/paren_where@20261024
|
|
791
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query u6 (deny).
|
|
792
|
+
dialects: *id001
|
|
793
|
+
- id: GEN-XFORM-u7-comments
|
|
794
|
+
role: support_analyst
|
|
795
|
+
sql: 'SELECT o.id /* source */ FROM orders o JOIN shipments s ON s.order_id = o.id
|
|
796
|
+
|
|
797
|
+
-- filter follows
|
|
798
|
+
|
|
799
|
+
WHERE o.tenant_id = 1'
|
|
800
|
+
category: comments_formatting
|
|
801
|
+
expected: deny
|
|
802
|
+
reason: tenant_isolation
|
|
803
|
+
provenance: generated:transform/comments@20261024
|
|
804
|
+
explanation: Semantics-preserving 'comments' rewrite of base query u7 (deny).
|
|
805
|
+
dialects: *id001
|
|
806
|
+
- id: GEN-XFORM-u7-whitespace
|
|
807
|
+
role: support_analyst
|
|
808
|
+
sql: "SELECT\n\t o.id\n\t FROM\n\t orders\n\t o\n\t JOIN\n\t shipments\n\t s\n\t ON\n\t s.order_id\n\t =\n\t \
|
|
809
|
+
\ o.id\n\t WHERE\n\t o.tenant_id\n\t =\n\t 1"
|
|
810
|
+
category: comments_formatting
|
|
811
|
+
expected: deny
|
|
812
|
+
reason: tenant_isolation
|
|
813
|
+
provenance: generated:transform/whitespace@20261024
|
|
814
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query u7 (deny).
|
|
815
|
+
dialects: *id001
|
|
816
|
+
- id: GEN-XFORM-u7-lowercase
|
|
817
|
+
role: support_analyst
|
|
818
|
+
sql: select o.id from orders o join shipments s on s.order_id = o.id where o.tenant_id = 1
|
|
819
|
+
category: comments_formatting
|
|
820
|
+
expected: deny
|
|
821
|
+
reason: tenant_isolation
|
|
822
|
+
provenance: generated:transform/lowercase@20261024
|
|
823
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query u7 (deny).
|
|
824
|
+
dialects: *id001
|
|
825
|
+
- id: GEN-XFORM-u7-mixedcase
|
|
826
|
+
role: support_analyst
|
|
827
|
+
sql: sElEcT o.id fRoM orders o jOiN shipments s oN s.order_id = o.id wHeRe o.tenant_id = 1
|
|
828
|
+
category: comments_formatting
|
|
829
|
+
expected: deny
|
|
830
|
+
reason: tenant_isolation
|
|
831
|
+
provenance: generated:transform/mixedcase@20261024
|
|
832
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query u7 (deny).
|
|
833
|
+
dialects: *id001
|
|
834
|
+
- id: GEN-XFORM-u7-paren_where
|
|
835
|
+
role: support_analyst
|
|
836
|
+
sql: SELECT o.id FROM orders o JOIN shipments s ON s.order_id = o.id WHERE (o.tenant_id = 1)
|
|
837
|
+
category: comments_formatting
|
|
838
|
+
expected: deny
|
|
839
|
+
reason: tenant_isolation
|
|
840
|
+
provenance: generated:transform/paren_where@20261024
|
|
841
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query u7 (deny).
|
|
842
|
+
dialects: *id001
|
|
843
|
+
- id: GEN-XFORM-u7-derived
|
|
844
|
+
role: support_analyst
|
|
845
|
+
sql: SELECT w.* FROM (SELECT o.id FROM orders o JOIN shipments s ON s.order_id = o.id WHERE o.tenant_id = 1) AS w
|
|
846
|
+
category: nested_query
|
|
847
|
+
expected: deny
|
|
848
|
+
reason: tenant_isolation
|
|
849
|
+
provenance: generated:transform/derived@20261024
|
|
850
|
+
explanation: Semantics-preserving 'derived' rewrite of base query u7 (deny).
|
|
851
|
+
dialects: *id001
|
|
852
|
+
- id: GEN-XFORM-u7-cte
|
|
853
|
+
role: support_analyst
|
|
854
|
+
sql: WITH w AS (SELECT o.id FROM orders o JOIN shipments s ON s.order_id = o.id WHERE o.tenant_id = 1) SELECT * FROM w
|
|
855
|
+
category: nested_query
|
|
856
|
+
expected: deny
|
|
857
|
+
reason: tenant_isolation
|
|
858
|
+
provenance: generated:transform/cte@20261024
|
|
859
|
+
explanation: Semantics-preserving 'cte' rewrite of base query u7 (deny).
|
|
860
|
+
dialects: *id001
|
|
861
|
+
- id: GEN-XFORM-u8-comments
|
|
862
|
+
role: support_analyst
|
|
863
|
+
sql: 'SELECT c.phone /* source */ FROM customers c
|
|
864
|
+
|
|
865
|
+
-- filter follows
|
|
866
|
+
|
|
867
|
+
WHERE c.tenant_id = 1'
|
|
868
|
+
category: comments_formatting
|
|
869
|
+
expected: deny
|
|
870
|
+
reason: unauthorized_column
|
|
871
|
+
provenance: generated:transform/comments@20261024
|
|
872
|
+
explanation: Semantics-preserving 'comments' rewrite of base query u8 (deny).
|
|
873
|
+
dialects: *id001
|
|
874
|
+
- id: GEN-XFORM-u8-whitespace
|
|
875
|
+
role: support_analyst
|
|
876
|
+
sql: "SELECT\n\t c.phone\n\t FROM\n\t customers\n\t c\n\t WHERE\n\t c.tenant_id\n\t =\n\t 1"
|
|
877
|
+
category: comments_formatting
|
|
878
|
+
expected: deny
|
|
879
|
+
reason: unauthorized_column
|
|
880
|
+
provenance: generated:transform/whitespace@20261024
|
|
881
|
+
explanation: Semantics-preserving 'whitespace' rewrite of base query u8 (deny).
|
|
882
|
+
dialects: *id001
|
|
883
|
+
- id: GEN-XFORM-u8-lowercase
|
|
884
|
+
role: support_analyst
|
|
885
|
+
sql: select c.phone from customers c where c.tenant_id = 1
|
|
886
|
+
category: comments_formatting
|
|
887
|
+
expected: deny
|
|
888
|
+
reason: unauthorized_column
|
|
889
|
+
provenance: generated:transform/lowercase@20261024
|
|
890
|
+
explanation: Semantics-preserving 'lowercase' rewrite of base query u8 (deny).
|
|
891
|
+
dialects: *id001
|
|
892
|
+
- id: GEN-XFORM-u8-mixedcase
|
|
893
|
+
role: support_analyst
|
|
894
|
+
sql: sElEcT c.phone fRoM customers c wHeRe c.tenant_id = 1
|
|
895
|
+
category: comments_formatting
|
|
896
|
+
expected: deny
|
|
897
|
+
reason: unauthorized_column
|
|
898
|
+
provenance: generated:transform/mixedcase@20261024
|
|
899
|
+
explanation: Semantics-preserving 'mixedcase' rewrite of base query u8 (deny).
|
|
900
|
+
dialects: *id001
|
|
901
|
+
- id: GEN-XFORM-u8-paren_where
|
|
902
|
+
role: support_analyst
|
|
903
|
+
sql: SELECT c.phone FROM customers c WHERE (c.tenant_id = 1)
|
|
904
|
+
category: comments_formatting
|
|
905
|
+
expected: deny
|
|
906
|
+
reason: unauthorized_column
|
|
907
|
+
provenance: generated:transform/paren_where@20261024
|
|
908
|
+
explanation: Semantics-preserving 'paren_where' rewrite of base query u8 (deny).
|
|
909
|
+
dialects: *id001
|
|
910
|
+
- id: GEN-XFORM-u8-derived
|
|
911
|
+
role: support_analyst
|
|
912
|
+
sql: SELECT w.* FROM (SELECT c.phone FROM customers c WHERE c.tenant_id = 1) AS w
|
|
913
|
+
category: nested_query
|
|
914
|
+
expected: deny
|
|
915
|
+
reason: unauthorized_column
|
|
916
|
+
provenance: generated:transform/derived@20261024
|
|
917
|
+
explanation: Semantics-preserving 'derived' rewrite of base query u8 (deny).
|
|
918
|
+
dialects: *id001
|
|
919
|
+
- id: GEN-XFORM-u8-cte
|
|
920
|
+
role: support_analyst
|
|
921
|
+
sql: WITH w AS (SELECT c.phone FROM customers c WHERE c.tenant_id = 1) SELECT * FROM w
|
|
922
|
+
category: nested_query
|
|
923
|
+
expected: deny
|
|
924
|
+
reason: unauthorized_column
|
|
925
|
+
provenance: generated:transform/cte@20261024
|
|
926
|
+
explanation: Semantics-preserving 'cte' rewrite of base query u8 (deny).
|
|
927
|
+
dialects: *id001
|