@postgres-language-server/cli-aarch64-linux-gnu 0.18.0 → 0.20.1
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.
- package/package.json +1 -1
- package/postgres-language-server +0 -0
- package/schema.json +1056 -131
package/schema.json
CHANGED
|
@@ -44,6 +44,17 @@
|
|
|
44
44
|
}
|
|
45
45
|
]
|
|
46
46
|
},
|
|
47
|
+
"format": {
|
|
48
|
+
"description": "The configuration for the SQL formatter",
|
|
49
|
+
"anyOf": [
|
|
50
|
+
{
|
|
51
|
+
"$ref": "#/definitions/FormatConfiguration"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"type": "null"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
},
|
|
47
58
|
"linter": {
|
|
48
59
|
"description": "The configuration for the linter",
|
|
49
60
|
"anyOf": [
|
|
@@ -66,6 +77,17 @@
|
|
|
66
77
|
}
|
|
67
78
|
]
|
|
68
79
|
},
|
|
80
|
+
"pglinter": {
|
|
81
|
+
"description": "The configuration for pglinter",
|
|
82
|
+
"anyOf": [
|
|
83
|
+
{
|
|
84
|
+
"$ref": "#/definitions/PglinterConfiguration"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"type": "null"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
69
91
|
"plpgsqlCheck": {
|
|
70
92
|
"description": "The configuration for type checking",
|
|
71
93
|
"anyOf": [
|
|
@@ -77,6 +99,17 @@
|
|
|
77
99
|
}
|
|
78
100
|
]
|
|
79
101
|
},
|
|
102
|
+
"splinter": {
|
|
103
|
+
"description": "The configuration for splinter",
|
|
104
|
+
"anyOf": [
|
|
105
|
+
{
|
|
106
|
+
"$ref": "#/definitions/SplinterConfiguration"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "null"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
80
113
|
"typecheck": {
|
|
81
114
|
"description": "The configuration for type checking",
|
|
82
115
|
"anyOf": [
|
|
@@ -102,6 +135,213 @@
|
|
|
102
135
|
},
|
|
103
136
|
"additionalProperties": false,
|
|
104
137
|
"definitions": {
|
|
138
|
+
"Base": {
|
|
139
|
+
"description": "A list of rules that belong to this group",
|
|
140
|
+
"type": "object",
|
|
141
|
+
"properties": {
|
|
142
|
+
"all": {
|
|
143
|
+
"description": "It enables ALL rules for this group.",
|
|
144
|
+
"type": [
|
|
145
|
+
"boolean",
|
|
146
|
+
"null"
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"compositePrimaryKeyTooManyColumns": {
|
|
150
|
+
"description": "CompositePrimaryKeyTooManyColumns (B012): Detect tables with composite primary keys involving more than 4 columns",
|
|
151
|
+
"anyOf": [
|
|
152
|
+
{
|
|
153
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"type": "null"
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"howManyObjectsWithUppercase": {
|
|
161
|
+
"description": "HowManyObjectsWithUppercase (B005): Count number of objects with uppercase in name or in columns.",
|
|
162
|
+
"anyOf": [
|
|
163
|
+
{
|
|
164
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"type": "null"
|
|
168
|
+
}
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
"howManyRedudantIndex": {
|
|
172
|
+
"description": "HowManyRedudantIndex (B002): Count number of redundant index vs nb index.",
|
|
173
|
+
"anyOf": [
|
|
174
|
+
{
|
|
175
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"type": "null"
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
"howManyTableWithoutIndexOnFk": {
|
|
183
|
+
"description": "HowManyTableWithoutIndexOnFk (B003): Count number of tables without index on foreign key.",
|
|
184
|
+
"anyOf": [
|
|
185
|
+
{
|
|
186
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"type": "null"
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"howManyTableWithoutPrimaryKey": {
|
|
194
|
+
"description": "HowManyTableWithoutPrimaryKey (B001): Count number of tables without primary key.",
|
|
195
|
+
"anyOf": [
|
|
196
|
+
{
|
|
197
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "null"
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
},
|
|
204
|
+
"howManyTablesNeverSelected": {
|
|
205
|
+
"description": "HowManyTablesNeverSelected (B006): Count number of table(s) that has never been selected.",
|
|
206
|
+
"anyOf": [
|
|
207
|
+
{
|
|
208
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"type": "null"
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
"howManyTablesWithFkMismatch": {
|
|
216
|
+
"description": "HowManyTablesWithFkMismatch (B008): Count number of tables with foreign keys that do not match the key reference type.",
|
|
217
|
+
"anyOf": [
|
|
218
|
+
{
|
|
219
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"type": "null"
|
|
223
|
+
}
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"howManyTablesWithFkOutsideSchema": {
|
|
227
|
+
"description": "HowManyTablesWithFkOutsideSchema (B007): Count number of tables with foreign keys outside their schema.",
|
|
228
|
+
"anyOf": [
|
|
229
|
+
{
|
|
230
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"type": "null"
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
"howManyTablesWithReservedKeywords": {
|
|
238
|
+
"description": "HowManyTablesWithReservedKeywords (B010): Count number of database objects using reserved keywords in their names.",
|
|
239
|
+
"anyOf": [
|
|
240
|
+
{
|
|
241
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"type": "null"
|
|
245
|
+
}
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
"howManyTablesWithSameTrigger": {
|
|
249
|
+
"description": "HowManyTablesWithSameTrigger (B009): Count number of tables using the same trigger vs nb table with their own triggers.",
|
|
250
|
+
"anyOf": [
|
|
251
|
+
{
|
|
252
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"type": "null"
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
"howManyUnusedIndex": {
|
|
260
|
+
"description": "HowManyUnusedIndex (B004): Count number of unused index vs nb index (base on pg_stat_user_indexes, indexes associated to unique constraints are discard.)",
|
|
261
|
+
"anyOf": [
|
|
262
|
+
{
|
|
263
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"type": "null"
|
|
267
|
+
}
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
"recommended": {
|
|
271
|
+
"description": "It enables the recommended rules for this group",
|
|
272
|
+
"type": [
|
|
273
|
+
"boolean",
|
|
274
|
+
"null"
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
"severalTableOwnerInSchema": {
|
|
278
|
+
"description": "SeveralTableOwnerInSchema (B011): In a schema there are several tables owned by different owners.",
|
|
279
|
+
"anyOf": [
|
|
280
|
+
{
|
|
281
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"type": "null"
|
|
285
|
+
}
|
|
286
|
+
]
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"additionalProperties": false
|
|
290
|
+
},
|
|
291
|
+
"Cluster": {
|
|
292
|
+
"description": "A list of rules that belong to this group",
|
|
293
|
+
"type": "object",
|
|
294
|
+
"properties": {
|
|
295
|
+
"all": {
|
|
296
|
+
"description": "It enables ALL rules for this group.",
|
|
297
|
+
"type": [
|
|
298
|
+
"boolean",
|
|
299
|
+
"null"
|
|
300
|
+
]
|
|
301
|
+
},
|
|
302
|
+
"passwordEncryptionIsMd5": {
|
|
303
|
+
"description": "PasswordEncryptionIsMd5 (C003): This configuration is not secure anymore and will prevent an upgrade to Postgres 18. Warning, you will need to reset all passwords after this is changed to scram-sha-256.",
|
|
304
|
+
"anyOf": [
|
|
305
|
+
{
|
|
306
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"type": "null"
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
},
|
|
313
|
+
"pgHbaEntriesWithMethodTrustOrPasswordShouldNotExists": {
|
|
314
|
+
"description": "PgHbaEntriesWithMethodTrustOrPasswordShouldNotExists (C002): This configuration is extremely insecure and should only be used in a controlled, non-production environment for testing purposes. In a production environment, you should use more secure authentication methods such as md5, scram-sha-256, or cert, and restrict access to trusted IP addresses only.",
|
|
315
|
+
"anyOf": [
|
|
316
|
+
{
|
|
317
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"type": "null"
|
|
321
|
+
}
|
|
322
|
+
]
|
|
323
|
+
},
|
|
324
|
+
"pgHbaEntriesWithMethodTrustShouldNotExists": {
|
|
325
|
+
"description": "PgHbaEntriesWithMethodTrustShouldNotExists (C001): This configuration is extremely insecure and should only be used in a controlled, non-production environment for testing purposes. In a production environment, you should use more secure authentication methods such as md5, scram-sha-256, or cert, and restrict access to trusted IP addresses only.",
|
|
326
|
+
"anyOf": [
|
|
327
|
+
{
|
|
328
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"type": "null"
|
|
332
|
+
}
|
|
333
|
+
]
|
|
334
|
+
},
|
|
335
|
+
"recommended": {
|
|
336
|
+
"description": "It enables the recommended rules for this group",
|
|
337
|
+
"type": [
|
|
338
|
+
"boolean",
|
|
339
|
+
"null"
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"additionalProperties": false
|
|
344
|
+
},
|
|
105
345
|
"DatabaseConfiguration": {
|
|
106
346
|
"description": "The configuration of the database connection.",
|
|
107
347
|
"type": "object",
|
|
@@ -210,11 +450,23 @@
|
|
|
210
450
|
},
|
|
211
451
|
"additionalProperties": false
|
|
212
452
|
},
|
|
213
|
-
"
|
|
453
|
+
"FormatConfiguration": {
|
|
454
|
+
"description": "The configuration for SQL formatting.",
|
|
214
455
|
"type": "object",
|
|
215
456
|
"properties": {
|
|
457
|
+
"constantCase": {
|
|
458
|
+
"description": "Constant casing (NULL, TRUE, FALSE): \"upper\" or \"lower\". Default: \"lower\".",
|
|
459
|
+
"anyOf": [
|
|
460
|
+
{
|
|
461
|
+
"$ref": "#/definitions/KeywordCase"
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"type": "null"
|
|
465
|
+
}
|
|
466
|
+
]
|
|
467
|
+
},
|
|
216
468
|
"enabled": {
|
|
217
|
-
"description": "
|
|
469
|
+
"description": "If `false`, it disables the formatter. `true` by default.",
|
|
218
470
|
"type": [
|
|
219
471
|
"boolean",
|
|
220
472
|
"null"
|
|
@@ -242,50 +494,376 @@
|
|
|
242
494
|
}
|
|
243
495
|
]
|
|
244
496
|
},
|
|
245
|
-
"
|
|
246
|
-
"description": "
|
|
497
|
+
"indentSize": {
|
|
498
|
+
"description": "Number of spaces (or tab width) for indentation. Default: 2.",
|
|
499
|
+
"type": [
|
|
500
|
+
"integer",
|
|
501
|
+
"null"
|
|
502
|
+
],
|
|
503
|
+
"format": "uint8",
|
|
504
|
+
"minimum": 0.0
|
|
505
|
+
},
|
|
506
|
+
"indentStyle": {
|
|
507
|
+
"description": "Indentation style: \"spaces\" or \"tabs\". Default: \"spaces\".",
|
|
247
508
|
"anyOf": [
|
|
248
509
|
{
|
|
249
|
-
"$ref": "#/definitions/
|
|
510
|
+
"$ref": "#/definitions/IndentStyle"
|
|
250
511
|
},
|
|
251
512
|
{
|
|
252
513
|
"type": "null"
|
|
253
514
|
}
|
|
254
515
|
]
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
516
|
+
},
|
|
517
|
+
"keywordCase": {
|
|
518
|
+
"description": "Keyword casing: \"upper\" or \"lower\". Default: \"lower\".",
|
|
519
|
+
"anyOf": [
|
|
520
|
+
{
|
|
521
|
+
"$ref": "#/definitions/KeywordCase"
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"type": "null"
|
|
525
|
+
}
|
|
526
|
+
]
|
|
527
|
+
},
|
|
528
|
+
"lineWidth": {
|
|
529
|
+
"description": "Maximum line width before breaking. Default: 100.",
|
|
265
530
|
"type": [
|
|
266
531
|
"integer",
|
|
267
532
|
"null"
|
|
268
533
|
],
|
|
269
|
-
"format": "
|
|
534
|
+
"format": "uint16",
|
|
270
535
|
"minimum": 0.0
|
|
271
536
|
},
|
|
272
|
-
"
|
|
273
|
-
"description": "
|
|
274
|
-
"
|
|
275
|
-
|
|
276
|
-
|
|
537
|
+
"typeCase": {
|
|
538
|
+
"description": "Data type casing (text, varchar, int): \"upper\" or \"lower\". Default: \"lower\".",
|
|
539
|
+
"anyOf": [
|
|
540
|
+
{
|
|
541
|
+
"$ref": "#/definitions/KeywordCase"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"type": "null"
|
|
545
|
+
}
|
|
277
546
|
]
|
|
278
547
|
}
|
|
279
548
|
},
|
|
280
549
|
"additionalProperties": false
|
|
281
550
|
},
|
|
282
|
-
"
|
|
283
|
-
"description": "
|
|
284
|
-
"
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
"
|
|
288
|
-
"
|
|
551
|
+
"IndentStyle": {
|
|
552
|
+
"description": "Indentation style for the formatter.",
|
|
553
|
+
"oneOf": [
|
|
554
|
+
{
|
|
555
|
+
"description": "Use spaces for indentation (default).",
|
|
556
|
+
"type": "string",
|
|
557
|
+
"enum": [
|
|
558
|
+
"spaces"
|
|
559
|
+
]
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
"description": "Use tabs for indentation.",
|
|
563
|
+
"type": "string",
|
|
564
|
+
"enum": [
|
|
565
|
+
"tabs"
|
|
566
|
+
]
|
|
567
|
+
}
|
|
568
|
+
]
|
|
569
|
+
},
|
|
570
|
+
"KeywordCase": {
|
|
571
|
+
"description": "Keyword casing style for the formatter.",
|
|
572
|
+
"oneOf": [
|
|
573
|
+
{
|
|
574
|
+
"description": "Use uppercase keywords (SELECT, FROM, WHERE).",
|
|
575
|
+
"type": "string",
|
|
576
|
+
"enum": [
|
|
577
|
+
"upper"
|
|
578
|
+
]
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"description": "Use lowercase keywords (select, from, where). Default.",
|
|
582
|
+
"type": "string",
|
|
583
|
+
"enum": [
|
|
584
|
+
"lower"
|
|
585
|
+
]
|
|
586
|
+
}
|
|
587
|
+
]
|
|
588
|
+
},
|
|
589
|
+
"LinterConfiguration": {
|
|
590
|
+
"type": "object",
|
|
591
|
+
"properties": {
|
|
592
|
+
"enabled": {
|
|
593
|
+
"description": "if `false`, it disables the feature and the linter won't be executed. `true` by default",
|
|
594
|
+
"type": [
|
|
595
|
+
"boolean",
|
|
596
|
+
"null"
|
|
597
|
+
]
|
|
598
|
+
},
|
|
599
|
+
"ignore": {
|
|
600
|
+
"description": "A list of Unix shell style patterns. The linter will ignore files/folders that will match these patterns.",
|
|
601
|
+
"anyOf": [
|
|
602
|
+
{
|
|
603
|
+
"$ref": "#/definitions/StringSet"
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
"type": "null"
|
|
607
|
+
}
|
|
608
|
+
]
|
|
609
|
+
},
|
|
610
|
+
"include": {
|
|
611
|
+
"description": "A list of Unix shell style patterns. The linter will include files/folders that will match these patterns.",
|
|
612
|
+
"anyOf": [
|
|
613
|
+
{
|
|
614
|
+
"$ref": "#/definitions/StringSet"
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
"type": "null"
|
|
618
|
+
}
|
|
619
|
+
]
|
|
620
|
+
},
|
|
621
|
+
"rules": {
|
|
622
|
+
"description": "List of rules",
|
|
623
|
+
"anyOf": [
|
|
624
|
+
{
|
|
625
|
+
"$ref": "#/definitions/LinterRules"
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"type": "null"
|
|
629
|
+
}
|
|
630
|
+
]
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
"additionalProperties": false
|
|
634
|
+
},
|
|
635
|
+
"LinterRules": {
|
|
636
|
+
"type": "object",
|
|
637
|
+
"properties": {
|
|
638
|
+
"all": {
|
|
639
|
+
"description": "It enables ALL rules. The rules that belong to `nursery` won't be enabled.",
|
|
640
|
+
"type": [
|
|
641
|
+
"boolean",
|
|
642
|
+
"null"
|
|
643
|
+
]
|
|
644
|
+
},
|
|
645
|
+
"recommended": {
|
|
646
|
+
"description": "It enables the lint rules recommended by Postgres Language Server. `true` by default.",
|
|
647
|
+
"type": [
|
|
648
|
+
"boolean",
|
|
649
|
+
"null"
|
|
650
|
+
]
|
|
651
|
+
},
|
|
652
|
+
"safety": {
|
|
653
|
+
"anyOf": [
|
|
654
|
+
{
|
|
655
|
+
"$ref": "#/definitions/Safety"
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
"type": "null"
|
|
659
|
+
}
|
|
660
|
+
]
|
|
661
|
+
}
|
|
662
|
+
},
|
|
663
|
+
"additionalProperties": false
|
|
664
|
+
},
|
|
665
|
+
"MigrationsConfiguration": {
|
|
666
|
+
"description": "The configuration of the filesystem",
|
|
667
|
+
"type": "object",
|
|
668
|
+
"properties": {
|
|
669
|
+
"after": {
|
|
670
|
+
"description": "Ignore any migrations before this timestamp",
|
|
671
|
+
"type": [
|
|
672
|
+
"integer",
|
|
673
|
+
"null"
|
|
674
|
+
],
|
|
675
|
+
"format": "uint64",
|
|
676
|
+
"minimum": 0.0
|
|
677
|
+
},
|
|
678
|
+
"migrationsDir": {
|
|
679
|
+
"description": "The directory where the migration files are stored",
|
|
680
|
+
"type": [
|
|
681
|
+
"string",
|
|
682
|
+
"null"
|
|
683
|
+
]
|
|
684
|
+
}
|
|
685
|
+
},
|
|
686
|
+
"additionalProperties": false
|
|
687
|
+
},
|
|
688
|
+
"Performance": {
|
|
689
|
+
"description": "A list of rules that belong to this group",
|
|
690
|
+
"type": "object",
|
|
691
|
+
"properties": {
|
|
692
|
+
"all": {
|
|
693
|
+
"description": "It enables ALL rules for this group.",
|
|
694
|
+
"type": [
|
|
695
|
+
"boolean",
|
|
696
|
+
"null"
|
|
697
|
+
]
|
|
698
|
+
},
|
|
699
|
+
"authRlsInitplan": {
|
|
700
|
+
"description": "Auth RLS Initialization Plan: Detects if calls to `current_setting()` and `auth.()` in RLS policies are being unnecessarily re-evaluated for each row",
|
|
701
|
+
"anyOf": [
|
|
702
|
+
{
|
|
703
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"type": "null"
|
|
707
|
+
}
|
|
708
|
+
]
|
|
709
|
+
},
|
|
710
|
+
"duplicateIndex": {
|
|
711
|
+
"description": "Duplicate Index: Detects cases where two ore more identical indexes exist.",
|
|
712
|
+
"anyOf": [
|
|
713
|
+
{
|
|
714
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"type": "null"
|
|
718
|
+
}
|
|
719
|
+
]
|
|
720
|
+
},
|
|
721
|
+
"multiplePermissivePolicies": {
|
|
722
|
+
"description": "Multiple Permissive Policies: Detects if multiple permissive row level security policies are present on a table for the same `role` and `action` (e.g. insert). Multiple permissive policies are suboptimal for performance as each policy must be executed for every relevant query.",
|
|
723
|
+
"anyOf": [
|
|
724
|
+
{
|
|
725
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
726
|
+
},
|
|
727
|
+
{
|
|
728
|
+
"type": "null"
|
|
729
|
+
}
|
|
730
|
+
]
|
|
731
|
+
},
|
|
732
|
+
"noPrimaryKey": {
|
|
733
|
+
"description": "No Primary Key: Detects if a table does not have a primary key. Tables without a primary key can be inefficient to interact with at scale.",
|
|
734
|
+
"anyOf": [
|
|
735
|
+
{
|
|
736
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"type": "null"
|
|
740
|
+
}
|
|
741
|
+
]
|
|
742
|
+
},
|
|
743
|
+
"recommended": {
|
|
744
|
+
"description": "It enables the recommended rules for this group",
|
|
745
|
+
"type": [
|
|
746
|
+
"boolean",
|
|
747
|
+
"null"
|
|
748
|
+
]
|
|
749
|
+
},
|
|
750
|
+
"tableBloat": {
|
|
751
|
+
"description": "Table Bloat: Detects if a table has excess bloat and may benefit from maintenance operations like vacuum full or cluster.",
|
|
752
|
+
"anyOf": [
|
|
753
|
+
{
|
|
754
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
"type": "null"
|
|
758
|
+
}
|
|
759
|
+
]
|
|
760
|
+
},
|
|
761
|
+
"unindexedForeignKeys": {
|
|
762
|
+
"description": "Unindexed foreign keys: Identifies foreign key constraints without a covering index, which can impact database performance.",
|
|
763
|
+
"anyOf": [
|
|
764
|
+
{
|
|
765
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
"type": "null"
|
|
769
|
+
}
|
|
770
|
+
]
|
|
771
|
+
},
|
|
772
|
+
"unusedIndex": {
|
|
773
|
+
"description": "Unused Index: Detects if an index has never been used and may be a candidate for removal.",
|
|
774
|
+
"anyOf": [
|
|
775
|
+
{
|
|
776
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"type": "null"
|
|
780
|
+
}
|
|
781
|
+
]
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
"additionalProperties": false
|
|
785
|
+
},
|
|
786
|
+
"PglinterConfiguration": {
|
|
787
|
+
"type": "object",
|
|
788
|
+
"properties": {
|
|
789
|
+
"enabled": {
|
|
790
|
+
"description": "if `false`, it disables the feature and the linter won't be executed. `true` by default",
|
|
791
|
+
"type": [
|
|
792
|
+
"boolean",
|
|
793
|
+
"null"
|
|
794
|
+
]
|
|
795
|
+
},
|
|
796
|
+
"rules": {
|
|
797
|
+
"description": "List of rules",
|
|
798
|
+
"anyOf": [
|
|
799
|
+
{
|
|
800
|
+
"$ref": "#/definitions/PglinterRules"
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"type": "null"
|
|
804
|
+
}
|
|
805
|
+
]
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
"additionalProperties": false
|
|
809
|
+
},
|
|
810
|
+
"PglinterRules": {
|
|
811
|
+
"type": "object",
|
|
812
|
+
"properties": {
|
|
813
|
+
"all": {
|
|
814
|
+
"description": "It enables ALL rules. The rules that belong to `nursery` won't be enabled.",
|
|
815
|
+
"type": [
|
|
816
|
+
"boolean",
|
|
817
|
+
"null"
|
|
818
|
+
]
|
|
819
|
+
},
|
|
820
|
+
"base": {
|
|
821
|
+
"anyOf": [
|
|
822
|
+
{
|
|
823
|
+
"$ref": "#/definitions/Base"
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
"type": "null"
|
|
827
|
+
}
|
|
828
|
+
]
|
|
829
|
+
},
|
|
830
|
+
"cluster": {
|
|
831
|
+
"anyOf": [
|
|
832
|
+
{
|
|
833
|
+
"$ref": "#/definitions/Cluster"
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
"type": "null"
|
|
837
|
+
}
|
|
838
|
+
]
|
|
839
|
+
},
|
|
840
|
+
"recommended": {
|
|
841
|
+
"description": "It enables the lint rules recommended by Postgres Language Server. `true` by default.",
|
|
842
|
+
"type": [
|
|
843
|
+
"boolean",
|
|
844
|
+
"null"
|
|
845
|
+
]
|
|
846
|
+
},
|
|
847
|
+
"schema": {
|
|
848
|
+
"anyOf": [
|
|
849
|
+
{
|
|
850
|
+
"$ref": "#/definitions/Schema"
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
"type": "null"
|
|
854
|
+
}
|
|
855
|
+
]
|
|
856
|
+
}
|
|
857
|
+
},
|
|
858
|
+
"additionalProperties": false
|
|
859
|
+
},
|
|
860
|
+
"PlPgSqlCheckConfiguration": {
|
|
861
|
+
"description": "The configuration for type checking.",
|
|
862
|
+
"type": "object",
|
|
863
|
+
"properties": {
|
|
864
|
+
"enabled": {
|
|
865
|
+
"description": "if `false`, it disables the feature and pglpgsql_check won't be executed. `true` by default",
|
|
866
|
+
"type": [
|
|
289
867
|
"boolean",
|
|
290
868
|
"null"
|
|
291
869
|
]
|
|
@@ -329,42 +907,254 @@
|
|
|
329
907
|
},
|
|
330
908
|
"additionalProperties": false
|
|
331
909
|
},
|
|
332
|
-
"
|
|
910
|
+
"RuleWithSplinterRuleOptions": {
|
|
333
911
|
"type": "object",
|
|
912
|
+
"required": [
|
|
913
|
+
"level",
|
|
914
|
+
"options"
|
|
915
|
+
],
|
|
334
916
|
"properties": {
|
|
917
|
+
"level": {
|
|
918
|
+
"description": "The severity of the emitted diagnostics by the rule",
|
|
919
|
+
"allOf": [
|
|
920
|
+
{
|
|
921
|
+
"$ref": "#/definitions/RulePlainConfiguration"
|
|
922
|
+
}
|
|
923
|
+
]
|
|
924
|
+
},
|
|
925
|
+
"options": {
|
|
926
|
+
"description": "Rule's options",
|
|
927
|
+
"allOf": [
|
|
928
|
+
{
|
|
929
|
+
"$ref": "#/definitions/SplinterRuleOptions"
|
|
930
|
+
}
|
|
931
|
+
]
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
"additionalProperties": false
|
|
935
|
+
},
|
|
936
|
+
"Safety": {
|
|
937
|
+
"description": "A list of rules that belong to this group",
|
|
938
|
+
"type": "object",
|
|
939
|
+
"properties": {
|
|
940
|
+
"addSerialColumn": {
|
|
941
|
+
"description": "Adding a column with a SERIAL type or GENERATED ALWAYS AS ... STORED causes a full table rewrite.",
|
|
942
|
+
"anyOf": [
|
|
943
|
+
{
|
|
944
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
"type": "null"
|
|
948
|
+
}
|
|
949
|
+
]
|
|
950
|
+
},
|
|
951
|
+
"addingFieldWithDefault": {
|
|
952
|
+
"description": "Adding a column with a DEFAULT value may lead to a table rewrite while holding an ACCESS EXCLUSIVE lock.",
|
|
953
|
+
"anyOf": [
|
|
954
|
+
{
|
|
955
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"type": "null"
|
|
959
|
+
}
|
|
960
|
+
]
|
|
961
|
+
},
|
|
962
|
+
"addingForeignKeyConstraint": {
|
|
963
|
+
"description": "Adding a foreign key constraint requires a table scan and a SHARE ROW EXCLUSIVE lock on both tables, which blocks writes.",
|
|
964
|
+
"anyOf": [
|
|
965
|
+
{
|
|
966
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"type": "null"
|
|
970
|
+
}
|
|
971
|
+
]
|
|
972
|
+
},
|
|
973
|
+
"addingNotNullField": {
|
|
974
|
+
"description": "Setting a column NOT NULL blocks reads while the table is scanned.",
|
|
975
|
+
"anyOf": [
|
|
976
|
+
{
|
|
977
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"type": "null"
|
|
981
|
+
}
|
|
982
|
+
]
|
|
983
|
+
},
|
|
984
|
+
"addingPrimaryKeyConstraint": {
|
|
985
|
+
"description": "Adding a primary key constraint results in locks and table rewrites.",
|
|
986
|
+
"anyOf": [
|
|
987
|
+
{
|
|
988
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
"type": "null"
|
|
992
|
+
}
|
|
993
|
+
]
|
|
994
|
+
},
|
|
995
|
+
"addingRequiredField": {
|
|
996
|
+
"description": "Adding a new column that is NOT NULL and has no default value to an existing table effectively makes it required.",
|
|
997
|
+
"anyOf": [
|
|
998
|
+
{
|
|
999
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
"type": "null"
|
|
1003
|
+
}
|
|
1004
|
+
]
|
|
1005
|
+
},
|
|
335
1006
|
"all": {
|
|
336
|
-
"description": "It enables ALL rules
|
|
1007
|
+
"description": "It enables ALL rules for this group.",
|
|
337
1008
|
"type": [
|
|
338
1009
|
"boolean",
|
|
339
1010
|
"null"
|
|
340
1011
|
]
|
|
341
1012
|
},
|
|
342
|
-
"
|
|
343
|
-
"description": "
|
|
344
|
-
"
|
|
345
|
-
|
|
346
|
-
|
|
1013
|
+
"banCharField": {
|
|
1014
|
+
"description": "Using CHAR(n) or CHARACTER(n) types is discouraged.",
|
|
1015
|
+
"anyOf": [
|
|
1016
|
+
{
|
|
1017
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
"type": "null"
|
|
1021
|
+
}
|
|
1022
|
+
]
|
|
1023
|
+
},
|
|
1024
|
+
"banConcurrentIndexCreationInTransaction": {
|
|
1025
|
+
"description": "Concurrent index creation is not allowed within a transaction.",
|
|
1026
|
+
"anyOf": [
|
|
1027
|
+
{
|
|
1028
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
"type": "null"
|
|
1032
|
+
}
|
|
1033
|
+
]
|
|
1034
|
+
},
|
|
1035
|
+
"banDropColumn": {
|
|
1036
|
+
"description": "Dropping a column may break existing clients.",
|
|
1037
|
+
"anyOf": [
|
|
1038
|
+
{
|
|
1039
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
"type": "null"
|
|
1043
|
+
}
|
|
1044
|
+
]
|
|
1045
|
+
},
|
|
1046
|
+
"banDropDatabase": {
|
|
1047
|
+
"description": "Dropping a database may break existing clients (and everything else, really).",
|
|
1048
|
+
"anyOf": [
|
|
1049
|
+
{
|
|
1050
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"type": "null"
|
|
1054
|
+
}
|
|
1055
|
+
]
|
|
1056
|
+
},
|
|
1057
|
+
"banDropNotNull": {
|
|
1058
|
+
"description": "Dropping a NOT NULL constraint may break existing clients.",
|
|
1059
|
+
"anyOf": [
|
|
1060
|
+
{
|
|
1061
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1062
|
+
},
|
|
1063
|
+
{
|
|
1064
|
+
"type": "null"
|
|
1065
|
+
}
|
|
1066
|
+
]
|
|
1067
|
+
},
|
|
1068
|
+
"banDropTable": {
|
|
1069
|
+
"description": "Dropping a table may break existing clients.",
|
|
1070
|
+
"anyOf": [
|
|
1071
|
+
{
|
|
1072
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"type": "null"
|
|
1076
|
+
}
|
|
1077
|
+
]
|
|
1078
|
+
},
|
|
1079
|
+
"banTruncateCascade": {
|
|
1080
|
+
"description": "Using TRUNCATE's CASCADE option will truncate any tables that are also foreign-keyed to the specified tables.",
|
|
1081
|
+
"anyOf": [
|
|
1082
|
+
{
|
|
1083
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
"type": "null"
|
|
1087
|
+
}
|
|
1088
|
+
]
|
|
1089
|
+
},
|
|
1090
|
+
"changingColumnType": {
|
|
1091
|
+
"description": "Changing a column type may break existing clients.",
|
|
1092
|
+
"anyOf": [
|
|
1093
|
+
{
|
|
1094
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
"type": "null"
|
|
1098
|
+
}
|
|
1099
|
+
]
|
|
1100
|
+
},
|
|
1101
|
+
"constraintMissingNotValid": {
|
|
1102
|
+
"description": "Adding constraints without NOT VALID blocks all reads and writes.",
|
|
1103
|
+
"anyOf": [
|
|
1104
|
+
{
|
|
1105
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
"type": "null"
|
|
1109
|
+
}
|
|
1110
|
+
]
|
|
1111
|
+
},
|
|
1112
|
+
"creatingEnum": {
|
|
1113
|
+
"description": "Creating enum types is not recommended for new applications.",
|
|
1114
|
+
"anyOf": [
|
|
1115
|
+
{
|
|
1116
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
"type": "null"
|
|
1120
|
+
}
|
|
1121
|
+
]
|
|
1122
|
+
},
|
|
1123
|
+
"disallowUniqueConstraint": {
|
|
1124
|
+
"description": "Disallow adding a UNIQUE constraint without using an existing index.",
|
|
1125
|
+
"anyOf": [
|
|
1126
|
+
{
|
|
1127
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1128
|
+
},
|
|
1129
|
+
{
|
|
1130
|
+
"type": "null"
|
|
1131
|
+
}
|
|
1132
|
+
]
|
|
1133
|
+
},
|
|
1134
|
+
"lockTimeoutWarning": {
|
|
1135
|
+
"description": "Taking a dangerous lock without setting a lock timeout can cause indefinite blocking.",
|
|
1136
|
+
"anyOf": [
|
|
1137
|
+
{
|
|
1138
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
"type": "null"
|
|
1142
|
+
}
|
|
347
1143
|
]
|
|
348
1144
|
},
|
|
349
|
-
"
|
|
1145
|
+
"multipleAlterTable": {
|
|
1146
|
+
"description": "Multiple ALTER TABLE statements on the same table should be combined into a single statement.",
|
|
350
1147
|
"anyOf": [
|
|
351
1148
|
{
|
|
352
|
-
"$ref": "#/definitions/
|
|
1149
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
353
1150
|
},
|
|
354
1151
|
{
|
|
355
1152
|
"type": "null"
|
|
356
1153
|
}
|
|
357
1154
|
]
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
},
|
|
362
|
-
"Safety": {
|
|
363
|
-
"description": "A list of rules that belong to this group",
|
|
364
|
-
"type": "object",
|
|
365
|
-
"properties": {
|
|
366
|
-
"addSerialColumn": {
|
|
367
|
-
"description": "Adding a column with a SERIAL type or GENERATED ALWAYS AS ... STORED causes a full table rewrite.",
|
|
1155
|
+
},
|
|
1156
|
+
"preferBigInt": {
|
|
1157
|
+
"description": "Prefer BIGINT over smaller integer types.",
|
|
368
1158
|
"anyOf": [
|
|
369
1159
|
{
|
|
370
1160
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -374,8 +1164,8 @@
|
|
|
374
1164
|
}
|
|
375
1165
|
]
|
|
376
1166
|
},
|
|
377
|
-
"
|
|
378
|
-
"description": "
|
|
1167
|
+
"preferBigintOverInt": {
|
|
1168
|
+
"description": "Prefer BIGINT over INT/INTEGER types.",
|
|
379
1169
|
"anyOf": [
|
|
380
1170
|
{
|
|
381
1171
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -385,8 +1175,8 @@
|
|
|
385
1175
|
}
|
|
386
1176
|
]
|
|
387
1177
|
},
|
|
388
|
-
"
|
|
389
|
-
"description": "
|
|
1178
|
+
"preferBigintOverSmallint": {
|
|
1179
|
+
"description": "Prefer BIGINT over SMALLINT types.",
|
|
390
1180
|
"anyOf": [
|
|
391
1181
|
{
|
|
392
1182
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -396,8 +1186,8 @@
|
|
|
396
1186
|
}
|
|
397
1187
|
]
|
|
398
1188
|
},
|
|
399
|
-
"
|
|
400
|
-
"description": "
|
|
1189
|
+
"preferIdentity": {
|
|
1190
|
+
"description": "Prefer using IDENTITY columns over serial columns.",
|
|
401
1191
|
"anyOf": [
|
|
402
1192
|
{
|
|
403
1193
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -407,8 +1197,8 @@
|
|
|
407
1197
|
}
|
|
408
1198
|
]
|
|
409
1199
|
},
|
|
410
|
-
"
|
|
411
|
-
"description": "
|
|
1200
|
+
"preferJsonb": {
|
|
1201
|
+
"description": "Prefer JSONB over JSON types.",
|
|
412
1202
|
"anyOf": [
|
|
413
1203
|
{
|
|
414
1204
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -418,8 +1208,8 @@
|
|
|
418
1208
|
}
|
|
419
1209
|
]
|
|
420
1210
|
},
|
|
421
|
-
"
|
|
422
|
-
"description": "
|
|
1211
|
+
"preferRobustStmts": {
|
|
1212
|
+
"description": "Prefer statements with guards for robustness in migrations.",
|
|
423
1213
|
"anyOf": [
|
|
424
1214
|
{
|
|
425
1215
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -429,15 +1219,19 @@
|
|
|
429
1219
|
}
|
|
430
1220
|
]
|
|
431
1221
|
},
|
|
432
|
-
"
|
|
433
|
-
"description": "
|
|
434
|
-
"
|
|
435
|
-
|
|
436
|
-
|
|
1222
|
+
"preferTextField": {
|
|
1223
|
+
"description": "Prefer using TEXT over VARCHAR(n) types.",
|
|
1224
|
+
"anyOf": [
|
|
1225
|
+
{
|
|
1226
|
+
"$ref": "#/definitions/RuleConfiguration"
|
|
1227
|
+
},
|
|
1228
|
+
{
|
|
1229
|
+
"type": "null"
|
|
1230
|
+
}
|
|
437
1231
|
]
|
|
438
1232
|
},
|
|
439
|
-
"
|
|
440
|
-
"description": "
|
|
1233
|
+
"preferTimestamptz": {
|
|
1234
|
+
"description": "Prefer TIMESTAMPTZ over TIMESTAMP types.",
|
|
441
1235
|
"anyOf": [
|
|
442
1236
|
{
|
|
443
1237
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -447,8 +1241,15 @@
|
|
|
447
1241
|
}
|
|
448
1242
|
]
|
|
449
1243
|
},
|
|
450
|
-
"
|
|
451
|
-
"description": "
|
|
1244
|
+
"recommended": {
|
|
1245
|
+
"description": "It enables the recommended rules for this group",
|
|
1246
|
+
"type": [
|
|
1247
|
+
"boolean",
|
|
1248
|
+
"null"
|
|
1249
|
+
]
|
|
1250
|
+
},
|
|
1251
|
+
"renamingColumn": {
|
|
1252
|
+
"description": "Renaming columns may break existing queries and application code.",
|
|
452
1253
|
"anyOf": [
|
|
453
1254
|
{
|
|
454
1255
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -458,8 +1259,8 @@
|
|
|
458
1259
|
}
|
|
459
1260
|
]
|
|
460
1261
|
},
|
|
461
|
-
"
|
|
462
|
-
"description": "
|
|
1262
|
+
"renamingTable": {
|
|
1263
|
+
"description": "Renaming tables may break existing queries and application code.",
|
|
463
1264
|
"anyOf": [
|
|
464
1265
|
{
|
|
465
1266
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -469,8 +1270,8 @@
|
|
|
469
1270
|
}
|
|
470
1271
|
]
|
|
471
1272
|
},
|
|
472
|
-
"
|
|
473
|
-
"description": "
|
|
1273
|
+
"requireConcurrentIndexCreation": {
|
|
1274
|
+
"description": "Creating indexes non-concurrently can lock the table for writes.",
|
|
474
1275
|
"anyOf": [
|
|
475
1276
|
{
|
|
476
1277
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -480,8 +1281,8 @@
|
|
|
480
1281
|
}
|
|
481
1282
|
]
|
|
482
1283
|
},
|
|
483
|
-
"
|
|
484
|
-
"description": "Dropping
|
|
1284
|
+
"requireConcurrentIndexDeletion": {
|
|
1285
|
+
"description": "Dropping indexes non-concurrently can lock the table for reads.",
|
|
485
1286
|
"anyOf": [
|
|
486
1287
|
{
|
|
487
1288
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -491,8 +1292,8 @@
|
|
|
491
1292
|
}
|
|
492
1293
|
]
|
|
493
1294
|
},
|
|
494
|
-
"
|
|
495
|
-
"description": "
|
|
1295
|
+
"runningStatementWhileHoldingAccessExclusive": {
|
|
1296
|
+
"description": "Running additional statements while holding an ACCESS EXCLUSIVE lock blocks all table access.",
|
|
496
1297
|
"anyOf": [
|
|
497
1298
|
{
|
|
498
1299
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -502,8 +1303,8 @@
|
|
|
502
1303
|
}
|
|
503
1304
|
]
|
|
504
1305
|
},
|
|
505
|
-
"
|
|
506
|
-
"description": "
|
|
1306
|
+
"transactionNesting": {
|
|
1307
|
+
"description": "Detects problematic transaction nesting that could lead to unexpected behavior.",
|
|
507
1308
|
"anyOf": [
|
|
508
1309
|
{
|
|
509
1310
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -512,9 +1313,23 @@
|
|
|
512
1313
|
"type": "null"
|
|
513
1314
|
}
|
|
514
1315
|
]
|
|
1316
|
+
}
|
|
1317
|
+
},
|
|
1318
|
+
"additionalProperties": false
|
|
1319
|
+
},
|
|
1320
|
+
"Schema": {
|
|
1321
|
+
"description": "A list of rules that belong to this group",
|
|
1322
|
+
"type": "object",
|
|
1323
|
+
"properties": {
|
|
1324
|
+
"all": {
|
|
1325
|
+
"description": "It enables ALL rules for this group.",
|
|
1326
|
+
"type": [
|
|
1327
|
+
"boolean",
|
|
1328
|
+
"null"
|
|
1329
|
+
]
|
|
515
1330
|
},
|
|
516
|
-
"
|
|
517
|
-
"description": "
|
|
1331
|
+
"ownerSchemaIsInternalRole": {
|
|
1332
|
+
"description": "OwnerSchemaIsInternalRole (S004): Owner of schema should not be any internal pg roles, or owner is a superuser (not sure it is necesary).",
|
|
518
1333
|
"anyOf": [
|
|
519
1334
|
{
|
|
520
1335
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -524,8 +1339,15 @@
|
|
|
524
1339
|
}
|
|
525
1340
|
]
|
|
526
1341
|
},
|
|
527
|
-
"
|
|
528
|
-
"description": "
|
|
1342
|
+
"recommended": {
|
|
1343
|
+
"description": "It enables the recommended rules for this group",
|
|
1344
|
+
"type": [
|
|
1345
|
+
"boolean",
|
|
1346
|
+
"null"
|
|
1347
|
+
]
|
|
1348
|
+
},
|
|
1349
|
+
"schemaOwnerDoNotMatchTableOwner": {
|
|
1350
|
+
"description": "SchemaOwnerDoNotMatchTableOwner (S005): The schema owner and tables in the schema do not match.",
|
|
529
1351
|
"anyOf": [
|
|
530
1352
|
{
|
|
531
1353
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -535,8 +1357,8 @@
|
|
|
535
1357
|
}
|
|
536
1358
|
]
|
|
537
1359
|
},
|
|
538
|
-
"
|
|
539
|
-
"description": "
|
|
1360
|
+
"schemaPrefixedOrSuffixedWithEnvt": {
|
|
1361
|
+
"description": "SchemaPrefixedOrSuffixedWithEnvt (S002): The schema is prefixed with one of staging,stg,preprod,prod,sandbox,sbox string. Means that when you refresh your preprod, staging environments from production, you have to rename the target schema from prod_ to stg_ or something like. It is possible, but it is never easy.",
|
|
540
1362
|
"anyOf": [
|
|
541
1363
|
{
|
|
542
1364
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -546,8 +1368,8 @@
|
|
|
546
1368
|
}
|
|
547
1369
|
]
|
|
548
1370
|
},
|
|
549
|
-
"
|
|
550
|
-
"description": "
|
|
1371
|
+
"schemaWithDefaultRoleNotGranted": {
|
|
1372
|
+
"description": "SchemaWithDefaultRoleNotGranted (S001): The schema has no default role. Means that futur table will not be granted through a role. So you will have to re-execute grants on it.",
|
|
551
1373
|
"anyOf": [
|
|
552
1374
|
{
|
|
553
1375
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -557,8 +1379,8 @@
|
|
|
557
1379
|
}
|
|
558
1380
|
]
|
|
559
1381
|
},
|
|
560
|
-
"
|
|
561
|
-
"description": "
|
|
1382
|
+
"unsecuredPublicSchema": {
|
|
1383
|
+
"description": "UnsecuredPublicSchema (S003): Only authorized users should be allowed to create objects.",
|
|
562
1384
|
"anyOf": [
|
|
563
1385
|
{
|
|
564
1386
|
"$ref": "#/definitions/RuleConfiguration"
|
|
@@ -567,100 +1389,114 @@
|
|
|
567
1389
|
"type": "null"
|
|
568
1390
|
}
|
|
569
1391
|
]
|
|
1392
|
+
}
|
|
1393
|
+
},
|
|
1394
|
+
"additionalProperties": false
|
|
1395
|
+
},
|
|
1396
|
+
"Security": {
|
|
1397
|
+
"description": "A list of rules that belong to this group",
|
|
1398
|
+
"type": "object",
|
|
1399
|
+
"properties": {
|
|
1400
|
+
"all": {
|
|
1401
|
+
"description": "It enables ALL rules for this group.",
|
|
1402
|
+
"type": [
|
|
1403
|
+
"boolean",
|
|
1404
|
+
"null"
|
|
1405
|
+
]
|
|
570
1406
|
},
|
|
571
|
-
"
|
|
572
|
-
"description": "
|
|
1407
|
+
"authUsersExposed": {
|
|
1408
|
+
"description": "Exposed Auth Users: Detects if auth.users is exposed to anon or authenticated roles via a view or materialized view in schemas exposed to PostgREST, potentially compromising user data security.",
|
|
573
1409
|
"anyOf": [
|
|
574
1410
|
{
|
|
575
|
-
"$ref": "#/definitions/
|
|
1411
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
576
1412
|
},
|
|
577
1413
|
{
|
|
578
1414
|
"type": "null"
|
|
579
1415
|
}
|
|
580
1416
|
]
|
|
581
1417
|
},
|
|
582
|
-
"
|
|
583
|
-
"description": "
|
|
1418
|
+
"extensionInPublic": {
|
|
1419
|
+
"description": "Extension in Public: Detects extensions installed in the `public` schema.",
|
|
584
1420
|
"anyOf": [
|
|
585
1421
|
{
|
|
586
|
-
"$ref": "#/definitions/
|
|
1422
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
587
1423
|
},
|
|
588
1424
|
{
|
|
589
1425
|
"type": "null"
|
|
590
1426
|
}
|
|
591
1427
|
]
|
|
592
1428
|
},
|
|
593
|
-
"
|
|
594
|
-
"description": "
|
|
1429
|
+
"extensionVersionsOutdated": {
|
|
1430
|
+
"description": "Extension Versions Outdated: Detects extensions that are not using the default (recommended) version.",
|
|
595
1431
|
"anyOf": [
|
|
596
1432
|
{
|
|
597
|
-
"$ref": "#/definitions/
|
|
1433
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
598
1434
|
},
|
|
599
1435
|
{
|
|
600
1436
|
"type": "null"
|
|
601
1437
|
}
|
|
602
1438
|
]
|
|
603
1439
|
},
|
|
604
|
-
"
|
|
605
|
-
"description": "
|
|
1440
|
+
"fkeyToAuthUnique": {
|
|
1441
|
+
"description": "Foreign Key to Auth Unique Constraint: Detects user defined foreign keys to unique constraints in the auth schema.",
|
|
606
1442
|
"anyOf": [
|
|
607
1443
|
{
|
|
608
|
-
"$ref": "#/definitions/
|
|
1444
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
609
1445
|
},
|
|
610
1446
|
{
|
|
611
1447
|
"type": "null"
|
|
612
1448
|
}
|
|
613
1449
|
]
|
|
614
1450
|
},
|
|
615
|
-
"
|
|
616
|
-
"description": "
|
|
1451
|
+
"foreignTableInApi": {
|
|
1452
|
+
"description": "Foreign Table in API: Detects foreign tables that are accessible over APIs. Foreign tables do not respect row level security policies.",
|
|
617
1453
|
"anyOf": [
|
|
618
1454
|
{
|
|
619
|
-
"$ref": "#/definitions/
|
|
1455
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
620
1456
|
},
|
|
621
1457
|
{
|
|
622
1458
|
"type": "null"
|
|
623
1459
|
}
|
|
624
1460
|
]
|
|
625
1461
|
},
|
|
626
|
-
"
|
|
627
|
-
"description": "
|
|
1462
|
+
"functionSearchPathMutable": {
|
|
1463
|
+
"description": "Function Search Path Mutable: Detects functions where the search_path parameter is not set.",
|
|
628
1464
|
"anyOf": [
|
|
629
1465
|
{
|
|
630
|
-
"$ref": "#/definitions/
|
|
1466
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
631
1467
|
},
|
|
632
1468
|
{
|
|
633
1469
|
"type": "null"
|
|
634
1470
|
}
|
|
635
1471
|
]
|
|
636
1472
|
},
|
|
637
|
-
"
|
|
638
|
-
"description": "
|
|
1473
|
+
"insecureQueueExposedInApi": {
|
|
1474
|
+
"description": "Insecure Queue Exposed in API: Detects cases where an insecure Queue is exposed over Data APIs",
|
|
639
1475
|
"anyOf": [
|
|
640
1476
|
{
|
|
641
|
-
"$ref": "#/definitions/
|
|
1477
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
642
1478
|
},
|
|
643
1479
|
{
|
|
644
1480
|
"type": "null"
|
|
645
1481
|
}
|
|
646
1482
|
]
|
|
647
1483
|
},
|
|
648
|
-
"
|
|
649
|
-
"description": "
|
|
1484
|
+
"materializedViewInApi": {
|
|
1485
|
+
"description": "Materialized View in API: Detects materialized views that are accessible over the Data APIs.",
|
|
650
1486
|
"anyOf": [
|
|
651
1487
|
{
|
|
652
|
-
"$ref": "#/definitions/
|
|
1488
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
653
1489
|
},
|
|
654
1490
|
{
|
|
655
1491
|
"type": "null"
|
|
656
1492
|
}
|
|
657
1493
|
]
|
|
658
1494
|
},
|
|
659
|
-
"
|
|
660
|
-
"description": "
|
|
1495
|
+
"policyExistsRlsDisabled": {
|
|
1496
|
+
"description": "Policy Exists RLS Disabled: Detects cases where row level security (RLS) policies have been created, but RLS has not been enabled for the underlying table.",
|
|
661
1497
|
"anyOf": [
|
|
662
1498
|
{
|
|
663
|
-
"$ref": "#/definitions/
|
|
1499
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
664
1500
|
},
|
|
665
1501
|
{
|
|
666
1502
|
"type": "null"
|
|
@@ -674,66 +1510,155 @@
|
|
|
674
1510
|
"null"
|
|
675
1511
|
]
|
|
676
1512
|
},
|
|
677
|
-
"
|
|
678
|
-
"description": "
|
|
1513
|
+
"rlsDisabledInPublic": {
|
|
1514
|
+
"description": "RLS Disabled in Public: Detects cases where row level security (RLS) has not been enabled on tables in schemas exposed to PostgREST",
|
|
679
1515
|
"anyOf": [
|
|
680
1516
|
{
|
|
681
|
-
"$ref": "#/definitions/
|
|
1517
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
682
1518
|
},
|
|
683
1519
|
{
|
|
684
1520
|
"type": "null"
|
|
685
1521
|
}
|
|
686
1522
|
]
|
|
687
1523
|
},
|
|
688
|
-
"
|
|
689
|
-
"description": "
|
|
1524
|
+
"rlsEnabledNoPolicy": {
|
|
1525
|
+
"description": "RLS Enabled No Policy: Detects cases where row level security (RLS) has been enabled on a table but no RLS policies have been created.",
|
|
690
1526
|
"anyOf": [
|
|
691
1527
|
{
|
|
692
|
-
"$ref": "#/definitions/
|
|
1528
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
693
1529
|
},
|
|
694
1530
|
{
|
|
695
1531
|
"type": "null"
|
|
696
1532
|
}
|
|
697
1533
|
]
|
|
698
1534
|
},
|
|
699
|
-
"
|
|
700
|
-
"description": "
|
|
1535
|
+
"rlsReferencesUserMetadata": {
|
|
1536
|
+
"description": "RLS references user metadata: Detects when Supabase Auth user_metadata is referenced insecurely in a row level security (RLS) policy.",
|
|
701
1537
|
"anyOf": [
|
|
702
1538
|
{
|
|
703
|
-
"$ref": "#/definitions/
|
|
1539
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
704
1540
|
},
|
|
705
1541
|
{
|
|
706
1542
|
"type": "null"
|
|
707
1543
|
}
|
|
708
1544
|
]
|
|
709
1545
|
},
|
|
710
|
-
"
|
|
711
|
-
"description": "
|
|
1546
|
+
"securityDefinerView": {
|
|
1547
|
+
"description": "Security Definer View: Detects views defined with the SECURITY DEFINER property. These views enforce Postgres permissions and row level security policies (RLS) of the view creator, rather than that of the querying user",
|
|
712
1548
|
"anyOf": [
|
|
713
1549
|
{
|
|
714
|
-
"$ref": "#/definitions/
|
|
1550
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
715
1551
|
},
|
|
716
1552
|
{
|
|
717
1553
|
"type": "null"
|
|
718
1554
|
}
|
|
719
1555
|
]
|
|
720
1556
|
},
|
|
721
|
-
"
|
|
722
|
-
"description": "
|
|
1557
|
+
"unsupportedRegTypes": {
|
|
1558
|
+
"description": "Unsupported reg types: Identifies columns using unsupported reg* types outside pg_catalog schema, which prevents database upgrades using pg_upgrade.",
|
|
723
1559
|
"anyOf": [
|
|
724
1560
|
{
|
|
725
|
-
"$ref": "#/definitions/
|
|
1561
|
+
"$ref": "#/definitions/SplinterRuleConfiguration"
|
|
726
1562
|
},
|
|
727
1563
|
{
|
|
728
1564
|
"type": "null"
|
|
729
1565
|
}
|
|
730
1566
|
]
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
1569
|
+
"additionalProperties": false
|
|
1570
|
+
},
|
|
1571
|
+
"SplinterConfiguration": {
|
|
1572
|
+
"type": "object",
|
|
1573
|
+
"properties": {
|
|
1574
|
+
"enabled": {
|
|
1575
|
+
"description": "if `false`, it disables the feature and the linter won't be executed. `true` by default",
|
|
1576
|
+
"type": [
|
|
1577
|
+
"boolean",
|
|
1578
|
+
"null"
|
|
1579
|
+
]
|
|
731
1580
|
},
|
|
732
|
-
"
|
|
733
|
-
"description": "
|
|
1581
|
+
"ignore": {
|
|
1582
|
+
"description": "A list of glob patterns for database objects to ignore across all rules. Patterns use Unix-style globs where `*` matches any sequence of characters. Format: `schema.object_name`, e.g., \"public.my_table\", \"audit.*\"",
|
|
734
1583
|
"anyOf": [
|
|
735
1584
|
{
|
|
736
|
-
"$ref": "#/definitions/
|
|
1585
|
+
"$ref": "#/definitions/StringSet"
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
"type": "null"
|
|
1589
|
+
}
|
|
1590
|
+
]
|
|
1591
|
+
},
|
|
1592
|
+
"rules": {
|
|
1593
|
+
"description": "List of rules",
|
|
1594
|
+
"anyOf": [
|
|
1595
|
+
{
|
|
1596
|
+
"$ref": "#/definitions/SplinterRules"
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
"type": "null"
|
|
1600
|
+
}
|
|
1601
|
+
]
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1604
|
+
"additionalProperties": false
|
|
1605
|
+
},
|
|
1606
|
+
"SplinterRuleConfiguration": {
|
|
1607
|
+
"anyOf": [
|
|
1608
|
+
{
|
|
1609
|
+
"$ref": "#/definitions/RulePlainConfiguration"
|
|
1610
|
+
},
|
|
1611
|
+
{
|
|
1612
|
+
"$ref": "#/definitions/RuleWithSplinterRuleOptions"
|
|
1613
|
+
}
|
|
1614
|
+
]
|
|
1615
|
+
},
|
|
1616
|
+
"SplinterRuleOptions": {
|
|
1617
|
+
"description": "Shared options for all splinter rules.\n\nThese options allow configuring per-rule filtering of database objects.",
|
|
1618
|
+
"type": "object",
|
|
1619
|
+
"properties": {
|
|
1620
|
+
"ignore": {
|
|
1621
|
+
"description": "A list of glob patterns for database objects to ignore.\n\nPatterns use Unix-style globs where: - `*` matches any sequence of characters - `?` matches any single character\n\nEach pattern should be in the format `schema.object_name`, for example: - `\"public.my_table\"` - ignores a specific table - `\"audit.*\"` - ignores all objects in the audit schema - `\"*.audit_*\"` - ignores objects with audit_ prefix in any schema",
|
|
1622
|
+
"default": [],
|
|
1623
|
+
"type": "array",
|
|
1624
|
+
"items": {
|
|
1625
|
+
"type": "string"
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
},
|
|
1629
|
+
"additionalProperties": false
|
|
1630
|
+
},
|
|
1631
|
+
"SplinterRules": {
|
|
1632
|
+
"type": "object",
|
|
1633
|
+
"properties": {
|
|
1634
|
+
"all": {
|
|
1635
|
+
"description": "It enables ALL rules. The rules that belong to `nursery` won't be enabled.",
|
|
1636
|
+
"type": [
|
|
1637
|
+
"boolean",
|
|
1638
|
+
"null"
|
|
1639
|
+
]
|
|
1640
|
+
},
|
|
1641
|
+
"performance": {
|
|
1642
|
+
"anyOf": [
|
|
1643
|
+
{
|
|
1644
|
+
"$ref": "#/definitions/Performance"
|
|
1645
|
+
},
|
|
1646
|
+
{
|
|
1647
|
+
"type": "null"
|
|
1648
|
+
}
|
|
1649
|
+
]
|
|
1650
|
+
},
|
|
1651
|
+
"recommended": {
|
|
1652
|
+
"description": "It enables the lint rules recommended by Postgres Language Server. `true` by default.",
|
|
1653
|
+
"type": [
|
|
1654
|
+
"boolean",
|
|
1655
|
+
"null"
|
|
1656
|
+
]
|
|
1657
|
+
},
|
|
1658
|
+
"security": {
|
|
1659
|
+
"anyOf": [
|
|
1660
|
+
{
|
|
1661
|
+
"$ref": "#/definitions/Security"
|
|
737
1662
|
},
|
|
738
1663
|
{
|
|
739
1664
|
"type": "null"
|