code-auditor-mcp 3.5.0 → 3.6.0
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/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +31 -0
- package/dist/analyzers/applicability.d.ts +6 -5
- package/dist/analyzers/applicability.d.ts.map +1 -1
- package/dist/analyzers/applicability.js +1 -26
- package/dist/analyzers/applicability.js.map +1 -1
- package/dist/analyzers/ruleRegistry.d.ts +14 -12
- package/dist/analyzers/ruleRegistry.d.ts.map +1 -1
- package/dist/analyzers/ruleRegistry.js +5 -96
- package/dist/analyzers/ruleRegistry.js.map +1 -1
- package/dist/analyzers/ruleTiming.d.ts +2 -2
- package/dist/analyzers/ruleTiming.js +2 -2
- package/dist/analyzers/universal/UniversalSchemaAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/universal/UniversalSchemaAnalyzer.js +5 -2
- package/dist/analyzers/universal/UniversalSchemaAnalyzer.js.map +1 -1
- package/dist/analyzers/universal/schema/discovery.d.ts +29 -1
- package/dist/analyzers/universal/schema/discovery.d.ts.map +1 -1
- package/dist/analyzers/universal/schema/discovery.js +76 -21
- package/dist/analyzers/universal/schema/discovery.js.map +1 -1
- package/dist/auditRunner.d.ts.map +1 -1
- package/dist/auditRunner.js +0 -27
- package/dist/auditRunner.js.map +1 -1
- package/dist/cli.js +69 -79
- package/dist/cli.js.map +1 -1
- package/dist/codeIndexDB.js +6 -6
- package/dist/codeIndexDB.js.map +1 -1
- package/dist/config/configLoader.d.ts.map +1 -1
- package/dist/config/configLoader.js +15 -0
- package/dist/config/configLoader.js.map +1 -1
- package/dist/config/defaults.d.ts +8 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +10 -1
- package/dist/config/defaults.js.map +1 -1
- package/dist/dataPaths.js +18 -1
- package/dist/dataPaths.js.map +1 -1
- package/dist/enforcement/gate.d.ts +14 -19
- package/dist/enforcement/gate.d.ts.map +1 -1
- package/dist/enforcement/gate.js +27 -45
- package/dist/enforcement/gate.js.map +1 -1
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +21 -3
- package/dist/pipeline.js.map +1 -1
- package/dist/styles/styleExtractor.js +2 -2
- package/dist/styles/styleExtractor.js.map +1 -1
- package/dist/styles/styleIndexer.js +7 -6
- package/dist/styles/styleIndexer.js.map +1 -1
- package/dist/styles/types.d.ts +3 -2
- package/dist/styles/types.d.ts.map +1 -1
- package/dist/types.d.ts +16 -30
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +12 -4
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/README.md +5 -3
- package/plugin/scripts/hook-audit.sh +20 -30
- package/plugin/scripts/hook-common.sh +63 -0
- package/plugin/scripts/hook-self-audit.sh +23 -31
- package/plugin/skills/code-auditor/SKILL.md +2 -2
|
@@ -11,7 +11,6 @@ export const RULE_REGISTRY = {
|
|
|
11
11
|
analyzer: 'solid',
|
|
12
12
|
field: 'rule',
|
|
13
13
|
input: ['files'],
|
|
14
|
-
gating: true,
|
|
15
14
|
resolvable: true,
|
|
16
15
|
message: 'Class "{name}" has {methods} methods, exceeding the maximum of {max}. Consider splitting responsibilities.',
|
|
17
16
|
docs: 'solid/class-size',
|
|
@@ -32,7 +31,6 @@ export const RULE_REGISTRY = {
|
|
|
32
31
|
analyzer: 'solid',
|
|
33
32
|
field: 'rule',
|
|
34
33
|
input: ['files'],
|
|
35
|
-
gating: false,
|
|
36
34
|
resolvable: false,
|
|
37
35
|
message: 'Method "{name}" has cyclomatic complexity {complexity}, exceeding the maximum of {max}.',
|
|
38
36
|
docs: 'solid/method-complexity',
|
|
@@ -50,7 +48,6 @@ export const RULE_REGISTRY = {
|
|
|
50
48
|
analyzer: 'solid',
|
|
51
49
|
field: 'rule',
|
|
52
50
|
input: ['files'],
|
|
53
|
-
gating: false,
|
|
54
51
|
resolvable: false,
|
|
55
52
|
message: 'Class "{name}" violates the Open/Closed Principle.',
|
|
56
53
|
docs: 'solid/open-closed',
|
|
@@ -68,7 +65,6 @@ export const RULE_REGISTRY = {
|
|
|
68
65
|
analyzer: 'solid',
|
|
69
66
|
field: 'rule',
|
|
70
67
|
input: ['files'],
|
|
71
|
-
gating: true,
|
|
72
68
|
resolvable: true,
|
|
73
69
|
message: 'Function "{name}" has {count} {metric}, exceeding the maximum of {max}. Break it down.',
|
|
74
70
|
docs: 'solid/single-responsibility',
|
|
@@ -89,7 +85,6 @@ export const RULE_REGISTRY = {
|
|
|
89
85
|
analyzer: 'solid',
|
|
90
86
|
field: 'rule',
|
|
91
87
|
input: ['files'],
|
|
92
|
-
gating: false,
|
|
93
88
|
resolvable: false,
|
|
94
89
|
message: 'Interface "{name}" has many members.',
|
|
95
90
|
docs: 'solid/interface-segregation',
|
|
@@ -107,7 +102,6 @@ export const RULE_REGISTRY = {
|
|
|
107
102
|
analyzer: 'solid',
|
|
108
103
|
field: 'rule',
|
|
109
104
|
input: ['files'],
|
|
110
|
-
gating: false,
|
|
111
105
|
resolvable: false,
|
|
112
106
|
message: 'Method "{name}" overrides a parent method and throws where the parent does not.',
|
|
113
107
|
docs: 'solid/liskov-substitution',
|
|
@@ -125,7 +119,6 @@ export const RULE_REGISTRY = {
|
|
|
125
119
|
analyzer: 'solid',
|
|
126
120
|
field: 'rule',
|
|
127
121
|
input: ['files'],
|
|
128
|
-
gating: false,
|
|
129
122
|
resolvable: false,
|
|
130
123
|
message: 'Module "{name}" violates the Dependency Inversion Principle.',
|
|
131
124
|
docs: 'solid/dependency-inversion',
|
|
@@ -144,7 +137,6 @@ export const RULE_REGISTRY = {
|
|
|
144
137
|
analyzer: 'dry',
|
|
145
138
|
field: 'rule',
|
|
146
139
|
input: ['files'],
|
|
147
|
-
gating: true,
|
|
148
140
|
resolvable: true,
|
|
149
141
|
message: 'Duplicate code block detected ({lines} lines). First occurrence at {file}:{line}.',
|
|
150
142
|
docs: 'dry/duplicate',
|
|
@@ -166,7 +158,6 @@ export const RULE_REGISTRY = {
|
|
|
166
158
|
field: 'rule',
|
|
167
159
|
configGate: 'checkStructuralSimilarity',
|
|
168
160
|
input: ['files'],
|
|
169
|
-
gating: false,
|
|
170
161
|
resolvable: false,
|
|
171
162
|
message: 'Structurally similar code block detected ({similarity}% similar to {file}:{line}).',
|
|
172
163
|
docs: 'dry/structural-similarity',
|
|
@@ -185,7 +176,6 @@ export const RULE_REGISTRY = {
|
|
|
185
176
|
field: 'rule',
|
|
186
177
|
configGate: 'checkStrings',
|
|
187
178
|
input: ['files'],
|
|
188
|
-
gating: false,
|
|
189
179
|
resolvable: false,
|
|
190
180
|
message: 'String literal "{text}" is duplicated {count} times.',
|
|
191
181
|
docs: 'duplicate-string-literal',
|
|
@@ -204,7 +194,6 @@ export const RULE_REGISTRY = {
|
|
|
204
194
|
field: 'rule',
|
|
205
195
|
configGate: 'checkImports',
|
|
206
196
|
input: ['files'],
|
|
207
|
-
gating: false,
|
|
208
197
|
resolvable: false,
|
|
209
198
|
message: 'Duplicate import of "{module}".',
|
|
210
199
|
docs: 'duplicate-import',
|
|
@@ -223,7 +212,6 @@ export const RULE_REGISTRY = {
|
|
|
223
212
|
analyzer: 'data-access',
|
|
224
213
|
field: 'rule',
|
|
225
214
|
input: ['files'],
|
|
226
|
-
gating: true,
|
|
227
215
|
resolvable: true,
|
|
228
216
|
message: 'Potential SQL injection risk in {method}. Use parameterized queries.',
|
|
229
217
|
docs: 'sql-injection-risk',
|
|
@@ -244,7 +232,6 @@ export const RULE_REGISTRY = {
|
|
|
244
232
|
analyzer: 'data-access',
|
|
245
233
|
field: 'rule',
|
|
246
234
|
input: ['schema'],
|
|
247
|
-
gating: false,
|
|
248
235
|
resolvable: false,
|
|
249
236
|
message: 'Query on {tables} is missing an organization/tenant filter.',
|
|
250
237
|
docs: 'missing-org-filter',
|
|
@@ -262,7 +249,6 @@ export const RULE_REGISTRY = {
|
|
|
262
249
|
analyzer: 'data-access',
|
|
263
250
|
field: 'rule',
|
|
264
251
|
input: ['files'],
|
|
265
|
-
gating: false,
|
|
266
252
|
resolvable: false,
|
|
267
253
|
message: 'Query references {tables} tables.',
|
|
268
254
|
docs: 'complex-query',
|
|
@@ -280,7 +266,6 @@ export const RULE_REGISTRY = {
|
|
|
280
266
|
analyzer: 'data-access',
|
|
281
267
|
field: 'rule',
|
|
282
268
|
input: ['files'],
|
|
283
|
-
gating: false,
|
|
284
269
|
resolvable: false,
|
|
285
270
|
message: 'Query on {tables} has no filter.',
|
|
286
271
|
docs: 'unfiltered-query',
|
|
@@ -298,7 +283,6 @@ export const RULE_REGISTRY = {
|
|
|
298
283
|
analyzer: 'data-access',
|
|
299
284
|
field: 'rule',
|
|
300
285
|
input: ['files'],
|
|
301
|
-
gating: false,
|
|
302
286
|
resolvable: false,
|
|
303
287
|
message: 'Hardcoded database connection string detected.',
|
|
304
288
|
docs: 'hardcoded-connection',
|
|
@@ -316,7 +300,6 @@ export const RULE_REGISTRY = {
|
|
|
316
300
|
analyzer: 'data-access',
|
|
317
301
|
field: 'rule',
|
|
318
302
|
input: ['files'],
|
|
319
|
-
gating: false,
|
|
320
303
|
resolvable: false,
|
|
321
304
|
message: 'Database query inside a loop detected in {method}.',
|
|
322
305
|
docs: 'loop-query',
|
|
@@ -335,7 +318,6 @@ export const RULE_REGISTRY = {
|
|
|
335
318
|
analyzer: 'documentation',
|
|
336
319
|
field: 'rule',
|
|
337
320
|
input: ['files'],
|
|
338
|
-
gating: false,
|
|
339
321
|
resolvable: false,
|
|
340
322
|
message: 'File is missing a leading documentation comment.',
|
|
341
323
|
docs: 'file-documentation',
|
|
@@ -353,7 +335,6 @@ export const RULE_REGISTRY = {
|
|
|
353
335
|
analyzer: 'documentation',
|
|
354
336
|
field: 'rule',
|
|
355
337
|
input: ['files'],
|
|
356
|
-
gating: false,
|
|
357
338
|
resolvable: false,
|
|
358
339
|
message: 'Function "{name}" is missing a doc comment.',
|
|
359
340
|
docs: 'function-documentation',
|
|
@@ -371,7 +352,6 @@ export const RULE_REGISTRY = {
|
|
|
371
352
|
analyzer: 'documentation',
|
|
372
353
|
field: 'rule',
|
|
373
354
|
input: ['files'],
|
|
374
|
-
gating: false,
|
|
375
355
|
resolvable: false,
|
|
376
356
|
message: 'Parameter "{name}" in function "{func}" is missing a @param tag.',
|
|
377
357
|
docs: 'parameter-documentation',
|
|
@@ -389,7 +369,6 @@ export const RULE_REGISTRY = {
|
|
|
389
369
|
analyzer: 'documentation',
|
|
390
370
|
field: 'rule',
|
|
391
371
|
input: ['files'],
|
|
392
|
-
gating: false,
|
|
393
372
|
resolvable: false,
|
|
394
373
|
message: 'Function "{name}" is missing a @returns tag.',
|
|
395
374
|
docs: 'return-documentation',
|
|
@@ -407,7 +386,6 @@ export const RULE_REGISTRY = {
|
|
|
407
386
|
analyzer: 'documentation',
|
|
408
387
|
field: 'rule',
|
|
409
388
|
input: ['files'],
|
|
410
|
-
gating: false,
|
|
411
389
|
resolvable: false,
|
|
412
390
|
message: 'Class "{name}" is missing a doc comment.',
|
|
413
391
|
docs: 'class-documentation',
|
|
@@ -425,7 +403,6 @@ export const RULE_REGISTRY = {
|
|
|
425
403
|
analyzer: 'documentation',
|
|
426
404
|
field: 'rule',
|
|
427
405
|
input: ['files'],
|
|
428
|
-
gating: false,
|
|
429
406
|
resolvable: false,
|
|
430
407
|
message: 'Method "{name}" is missing a doc comment.',
|
|
431
408
|
docs: 'method-documentation',
|
|
@@ -445,7 +422,6 @@ export const RULE_REGISTRY = {
|
|
|
445
422
|
analyzer: 'schema',
|
|
446
423
|
field: 'rule',
|
|
447
424
|
input: ['schema-json'],
|
|
448
|
-
gating: false,
|
|
449
425
|
resolvable: false,
|
|
450
426
|
message: 'Invalid JSON: {error}.',
|
|
451
427
|
docs: 'invalid-json',
|
|
@@ -463,7 +439,6 @@ export const RULE_REGISTRY = {
|
|
|
463
439
|
analyzer: 'schema',
|
|
464
440
|
field: 'rule',
|
|
465
441
|
input: ['schema-json'],
|
|
466
|
-
gating: false,
|
|
467
442
|
resolvable: false,
|
|
468
443
|
message: 'Missing JSON schema declaration.',
|
|
469
444
|
docs: 'missing-schema-declaration',
|
|
@@ -481,7 +456,6 @@ export const RULE_REGISTRY = {
|
|
|
481
456
|
analyzer: 'schema',
|
|
482
457
|
field: 'rule',
|
|
483
458
|
input: ['schema-json'],
|
|
484
|
-
gating: false,
|
|
485
459
|
resolvable: false,
|
|
486
460
|
message: 'Undefined required field "{field}".',
|
|
487
461
|
docs: 'undefined-required-field',
|
|
@@ -499,7 +473,6 @@ export const RULE_REGISTRY = {
|
|
|
499
473
|
analyzer: 'schema',
|
|
500
474
|
field: 'rule',
|
|
501
475
|
input: ['schema-json'],
|
|
502
|
-
gating: false,
|
|
503
476
|
resolvable: false,
|
|
504
477
|
message: 'Invalid type for field "{field}".',
|
|
505
478
|
docs: 'invalid-type',
|
|
@@ -517,7 +490,6 @@ export const RULE_REGISTRY = {
|
|
|
517
490
|
analyzer: 'schema',
|
|
518
491
|
field: 'rule',
|
|
519
492
|
input: ['schema-json'],
|
|
520
|
-
gating: false,
|
|
521
493
|
resolvable: false,
|
|
522
494
|
message: 'Invalid range for field "{field}".',
|
|
523
495
|
docs: 'invalid-range',
|
|
@@ -535,7 +507,6 @@ export const RULE_REGISTRY = {
|
|
|
535
507
|
analyzer: 'schema',
|
|
536
508
|
field: 'rule',
|
|
537
509
|
input: ['schema-json'],
|
|
538
|
-
gating: false,
|
|
539
510
|
resolvable: false,
|
|
540
511
|
message: 'Error processing schema file: {error}.',
|
|
541
512
|
docs: 'file-error',
|
|
@@ -553,7 +524,6 @@ export const RULE_REGISTRY = {
|
|
|
553
524
|
analyzer: 'schema',
|
|
554
525
|
field: 'rule',
|
|
555
526
|
input: ['schema-json'],
|
|
556
|
-
gating: false,
|
|
557
527
|
resolvable: false,
|
|
558
528
|
message: 'Type mismatch for field "{field}".',
|
|
559
529
|
docs: 'type-mismatch',
|
|
@@ -571,7 +541,6 @@ export const RULE_REGISTRY = {
|
|
|
571
541
|
analyzer: 'schema',
|
|
572
542
|
field: 'rule',
|
|
573
543
|
input: ['schema-json'],
|
|
574
|
-
gating: false,
|
|
575
544
|
resolvable: false,
|
|
576
545
|
message: 'String value too short for field "{field}".',
|
|
577
546
|
docs: 'string-too-short',
|
|
@@ -589,7 +558,6 @@ export const RULE_REGISTRY = {
|
|
|
589
558
|
analyzer: 'schema',
|
|
590
559
|
field: 'rule',
|
|
591
560
|
input: ['schema-json'],
|
|
592
|
-
gating: false,
|
|
593
561
|
resolvable: false,
|
|
594
562
|
message: 'String value too long for field "{field}".',
|
|
595
563
|
docs: 'string-too-long',
|
|
@@ -607,7 +575,6 @@ export const RULE_REGISTRY = {
|
|
|
607
575
|
analyzer: 'schema',
|
|
608
576
|
field: 'rule',
|
|
609
577
|
input: ['schema-json'],
|
|
610
|
-
gating: false,
|
|
611
578
|
resolvable: false,
|
|
612
579
|
message: 'Value does not match pattern for field "{field}".',
|
|
613
580
|
docs: 'pattern-mismatch',
|
|
@@ -625,7 +592,6 @@ export const RULE_REGISTRY = {
|
|
|
625
592
|
analyzer: 'schema',
|
|
626
593
|
field: 'rule',
|
|
627
594
|
input: ['schema-json'],
|
|
628
|
-
gating: false,
|
|
629
595
|
resolvable: false,
|
|
630
596
|
message: 'Invalid format for field "{field}".',
|
|
631
597
|
docs: 'invalid-format',
|
|
@@ -643,7 +609,6 @@ export const RULE_REGISTRY = {
|
|
|
643
609
|
analyzer: 'schema',
|
|
644
610
|
field: 'rule',
|
|
645
611
|
input: ['schema-json'],
|
|
646
|
-
gating: false,
|
|
647
612
|
resolvable: false,
|
|
648
613
|
message: 'Value below minimum for field "{field}".',
|
|
649
614
|
docs: 'below-minimum',
|
|
@@ -661,7 +626,6 @@ export const RULE_REGISTRY = {
|
|
|
661
626
|
analyzer: 'schema',
|
|
662
627
|
field: 'rule',
|
|
663
628
|
input: ['schema-json'],
|
|
664
|
-
gating: false,
|
|
665
629
|
resolvable: false,
|
|
666
630
|
message: 'Value above maximum for field "{field}".',
|
|
667
631
|
docs: 'above-maximum',
|
|
@@ -679,7 +643,6 @@ export const RULE_REGISTRY = {
|
|
|
679
643
|
analyzer: 'schema',
|
|
680
644
|
field: 'rule',
|
|
681
645
|
input: ['schema-json'],
|
|
682
|
-
gating: false,
|
|
683
646
|
resolvable: false,
|
|
684
647
|
message: 'Too few items for field "{field}".',
|
|
685
648
|
docs: 'too-few-items',
|
|
@@ -697,7 +660,6 @@ export const RULE_REGISTRY = {
|
|
|
697
660
|
analyzer: 'schema',
|
|
698
661
|
field: 'rule',
|
|
699
662
|
input: ['schema-json'],
|
|
700
|
-
gating: false,
|
|
701
663
|
resolvable: false,
|
|
702
664
|
message: 'Too many items for field "{field}".',
|
|
703
665
|
docs: 'too-many-items',
|
|
@@ -715,7 +677,6 @@ export const RULE_REGISTRY = {
|
|
|
715
677
|
analyzer: 'schema',
|
|
716
678
|
field: 'rule',
|
|
717
679
|
input: ['schema-json'],
|
|
718
|
-
gating: false,
|
|
719
680
|
resolvable: false,
|
|
720
681
|
message: 'Missing required field "{field}".',
|
|
721
682
|
docs: 'missing-required-field',
|
|
@@ -733,7 +694,6 @@ export const RULE_REGISTRY = {
|
|
|
733
694
|
analyzer: 'schema',
|
|
734
695
|
field: 'rule',
|
|
735
696
|
input: ['schema-json'],
|
|
736
|
-
gating: false,
|
|
737
697
|
resolvable: false,
|
|
738
698
|
message: 'Unexpected property "{property}".',
|
|
739
699
|
docs: 'unexpected-property',
|
|
@@ -751,7 +711,6 @@ export const RULE_REGISTRY = {
|
|
|
751
711
|
analyzer: 'schema',
|
|
752
712
|
field: 'rule',
|
|
753
713
|
input: ['schema-json'],
|
|
754
|
-
gating: false,
|
|
755
714
|
resolvable: false,
|
|
756
715
|
message: 'Value does not match any enum value for field "{field}".',
|
|
757
716
|
docs: 'enum-mismatch',
|
|
@@ -770,7 +729,6 @@ export const RULE_REGISTRY = {
|
|
|
770
729
|
analyzer: 'schema',
|
|
771
730
|
field: 'rule',
|
|
772
731
|
input: ['schema-code'],
|
|
773
|
-
gating: false,
|
|
774
732
|
resolvable: false,
|
|
775
733
|
message: 'Potential SQL injection via string interpolation in {method}.',
|
|
776
734
|
docs: 'sql-injection',
|
|
@@ -791,7 +749,6 @@ export const RULE_REGISTRY = {
|
|
|
791
749
|
field: 'rule',
|
|
792
750
|
configGate: 'checkNamingConventions',
|
|
793
751
|
input: ['schema-code'],
|
|
794
|
-
gating: false,
|
|
795
752
|
resolvable: false,
|
|
796
753
|
message: 'Table name "{table}" should use snake_case convention.',
|
|
797
754
|
docs: 'table-naming-convention',
|
|
@@ -810,7 +767,6 @@ export const RULE_REGISTRY = {
|
|
|
810
767
|
analyzer: 'schema',
|
|
811
768
|
field: 'rule',
|
|
812
769
|
input: ['schema-code'],
|
|
813
|
-
gating: true,
|
|
814
770
|
resolvable: true,
|
|
815
771
|
message: 'Reference to unknown table "{table}" ({type}). Did you mean: {suggestions}?',
|
|
816
772
|
docs: 'unknown-table',
|
|
@@ -832,7 +788,6 @@ export const RULE_REGISTRY = {
|
|
|
832
788
|
analyzer: 'react',
|
|
833
789
|
field: 'rule',
|
|
834
790
|
input: ['files'],
|
|
835
|
-
gating: false,
|
|
836
791
|
resolvable: false,
|
|
837
792
|
message: 'React hook "{name}" does not follow the "use*" naming convention.',
|
|
838
793
|
docs: 'hooks-naming',
|
|
@@ -850,7 +805,6 @@ export const RULE_REGISTRY = {
|
|
|
850
805
|
analyzer: 'react',
|
|
851
806
|
field: 'rule',
|
|
852
807
|
input: ['files'],
|
|
853
|
-
gating: false,
|
|
854
808
|
resolvable: false,
|
|
855
809
|
message: 'React component "{name}" has complexity {complexity}, exceeding the maximum.',
|
|
856
810
|
docs: 'complexity',
|
|
@@ -869,7 +823,6 @@ export const RULE_REGISTRY = {
|
|
|
869
823
|
field: 'rule',
|
|
870
824
|
configGate: 'requirePropTypes',
|
|
871
825
|
input: ['files'],
|
|
872
|
-
gating: false,
|
|
873
826
|
resolvable: false,
|
|
874
827
|
message: 'React component "{name}" is missing prop-types.',
|
|
875
828
|
docs: 'missing-props',
|
|
@@ -887,7 +840,6 @@ export const RULE_REGISTRY = {
|
|
|
887
840
|
analyzer: 'react',
|
|
888
841
|
field: 'rule',
|
|
889
842
|
input: ['files'],
|
|
890
|
-
gating: false,
|
|
891
843
|
resolvable: false,
|
|
892
844
|
message: 'React component tree is missing an error boundary.',
|
|
893
845
|
docs: 'no-error-boundary',
|
|
@@ -906,7 +858,6 @@ export const RULE_REGISTRY = {
|
|
|
906
858
|
field: 'rule',
|
|
907
859
|
configGate: 'requireMemoization',
|
|
908
860
|
input: ['files'],
|
|
909
|
-
gating: false,
|
|
910
861
|
resolvable: false,
|
|
911
862
|
message: 'React component "{name}" is missing memoization.',
|
|
912
863
|
docs: 'performance',
|
|
@@ -924,7 +875,6 @@ export const RULE_REGISTRY = {
|
|
|
924
875
|
analyzer: 'react',
|
|
925
876
|
field: 'rule',
|
|
926
877
|
input: ['files'],
|
|
927
|
-
gating: false,
|
|
928
878
|
resolvable: false,
|
|
929
879
|
message: 'Accessibility issue in component "{name}": {issue}.',
|
|
930
880
|
docs: 'accessibility',
|
|
@@ -942,7 +892,6 @@ export const RULE_REGISTRY = {
|
|
|
942
892
|
analyzer: 'react',
|
|
943
893
|
field: 'rule',
|
|
944
894
|
input: ['files'],
|
|
945
|
-
gating: true,
|
|
946
895
|
resolvable: true,
|
|
947
896
|
message: 'raw `<{element}>` — this project uses `<{wrapper}>` ({file}).',
|
|
948
897
|
docs: 'raw-element',
|
|
@@ -965,7 +914,6 @@ export const RULE_REGISTRY = {
|
|
|
965
914
|
analyzer: 'invariants',
|
|
966
915
|
field: 'rule',
|
|
967
916
|
input: ['files'],
|
|
968
|
-
gating: false,
|
|
969
917
|
resolvable: false,
|
|
970
918
|
message: 'Invalid invariant config: {error}.',
|
|
971
919
|
docs: 'config-error',
|
|
@@ -983,7 +931,6 @@ export const RULE_REGISTRY = {
|
|
|
983
931
|
analyzer: 'invariants',
|
|
984
932
|
field: 'rule',
|
|
985
933
|
input: ['files'],
|
|
986
|
-
gating: false,
|
|
987
934
|
resolvable: false,
|
|
988
935
|
message: 'Invariant rule engine error: {error}.',
|
|
989
936
|
docs: 'engine-error',
|
|
@@ -1002,7 +949,6 @@ export const RULE_REGISTRY = {
|
|
|
1002
949
|
analyzer: 'schema-validator',
|
|
1003
950
|
field: 'rule',
|
|
1004
951
|
input: ['cross-language-entities'],
|
|
1005
|
-
gating: false,
|
|
1006
952
|
resolvable: false,
|
|
1007
953
|
message: 'Field mismatch: {detail}.',
|
|
1008
954
|
docs: 'field-mismatch',
|
|
@@ -1020,7 +966,6 @@ export const RULE_REGISTRY = {
|
|
|
1020
966
|
analyzer: 'schema-validator',
|
|
1021
967
|
field: 'rule',
|
|
1022
968
|
input: ['cross-language-entities'],
|
|
1023
|
-
gating: false,
|
|
1024
969
|
resolvable: false,
|
|
1025
970
|
message: 'Schema field type-name strings differ: {detail}.',
|
|
1026
971
|
docs: 'schema-field-mismatch',
|
|
@@ -1038,7 +983,6 @@ export const RULE_REGISTRY = {
|
|
|
1038
983
|
analyzer: 'schema-validator',
|
|
1039
984
|
field: 'rule',
|
|
1040
985
|
input: ['cross-language-entities'],
|
|
1041
|
-
gating: false,
|
|
1042
986
|
resolvable: false,
|
|
1043
987
|
message: 'Missing field: {field}.',
|
|
1044
988
|
docs: 'missing-field',
|
|
@@ -1056,7 +1000,6 @@ export const RULE_REGISTRY = {
|
|
|
1056
1000
|
analyzer: 'schema-validator',
|
|
1057
1001
|
field: 'rule',
|
|
1058
1002
|
input: ['cross-language-entities'],
|
|
1059
|
-
gating: false,
|
|
1060
1003
|
resolvable: false,
|
|
1061
1004
|
message: 'Extra field: {field}.',
|
|
1062
1005
|
docs: 'extra-field',
|
|
@@ -1074,7 +1017,6 @@ export const RULE_REGISTRY = {
|
|
|
1074
1017
|
analyzer: 'schema-validator',
|
|
1075
1018
|
field: 'rule',
|
|
1076
1019
|
input: ['cross-language-entities'],
|
|
1077
|
-
gating: false,
|
|
1078
1020
|
resolvable: false,
|
|
1079
1021
|
message: 'Constraint mismatch: {detail}.',
|
|
1080
1022
|
docs: 'constraint-mismatch',
|
|
@@ -1092,7 +1034,6 @@ export const RULE_REGISTRY = {
|
|
|
1092
1034
|
analyzer: 'schema-validator',
|
|
1093
1035
|
field: 'rule',
|
|
1094
1036
|
input: ['cross-language-entities'],
|
|
1095
|
-
gating: false,
|
|
1096
1037
|
resolvable: false,
|
|
1097
1038
|
message: 'Version mismatch: {detail}.',
|
|
1098
1039
|
docs: 'version-mismatch',
|
|
@@ -1111,7 +1052,6 @@ export const RULE_REGISTRY = {
|
|
|
1111
1052
|
analyzer: 'api-contract',
|
|
1112
1053
|
field: 'rule',
|
|
1113
1054
|
input: ['cross-language-entities'],
|
|
1114
|
-
gating: false,
|
|
1115
1055
|
resolvable: false,
|
|
1116
1056
|
message: 'API type mismatch: {detail}.',
|
|
1117
1057
|
docs: 'api-type-mismatch',
|
|
@@ -1129,7 +1069,6 @@ export const RULE_REGISTRY = {
|
|
|
1129
1069
|
analyzer: 'api-contract',
|
|
1130
1070
|
field: 'rule',
|
|
1131
1071
|
input: ['cross-language-entities'],
|
|
1132
|
-
gating: false,
|
|
1133
1072
|
resolvable: false,
|
|
1134
1073
|
message: 'Missing API endpoint: {endpoint}.',
|
|
1135
1074
|
docs: 'missing-endpoint',
|
|
@@ -1147,7 +1086,6 @@ export const RULE_REGISTRY = {
|
|
|
1147
1086
|
analyzer: 'api-contract',
|
|
1148
1087
|
field: 'rule',
|
|
1149
1088
|
input: ['cross-language-entities'],
|
|
1150
|
-
gating: false,
|
|
1151
1089
|
resolvable: false,
|
|
1152
1090
|
message: 'Extra field in API response: {field}.',
|
|
1153
1091
|
docs: 'api-extra-field',
|
|
@@ -1165,7 +1103,6 @@ export const RULE_REGISTRY = {
|
|
|
1165
1103
|
analyzer: 'api-contract',
|
|
1166
1104
|
field: 'rule',
|
|
1167
1105
|
input: ['cross-language-entities'],
|
|
1168
|
-
gating: false,
|
|
1169
1106
|
resolvable: false,
|
|
1170
1107
|
message: 'Missing field in API response: {field}.',
|
|
1171
1108
|
docs: 'api-missing-field',
|
|
@@ -1183,7 +1120,6 @@ export const RULE_REGISTRY = {
|
|
|
1183
1120
|
analyzer: 'api-contract',
|
|
1184
1121
|
field: 'rule',
|
|
1185
1122
|
input: ['cross-language-entities'],
|
|
1186
|
-
gating: false,
|
|
1187
1123
|
resolvable: false,
|
|
1188
1124
|
message: 'HTTP method mismatch: {detail}.',
|
|
1189
1125
|
docs: 'method-mismatch',
|
|
@@ -1201,7 +1137,6 @@ export const RULE_REGISTRY = {
|
|
|
1201
1137
|
analyzer: 'api-contract',
|
|
1202
1138
|
field: 'rule',
|
|
1203
1139
|
input: ['cross-language-entities'],
|
|
1204
|
-
gating: false,
|
|
1205
1140
|
resolvable: false,
|
|
1206
1141
|
message: 'Authentication mismatch: {detail}.',
|
|
1207
1142
|
docs: 'auth-mismatch',
|
|
@@ -1220,7 +1155,6 @@ export const RULE_REGISTRY = {
|
|
|
1220
1155
|
analyzer: 'dependency-graph',
|
|
1221
1156
|
field: 'type',
|
|
1222
1157
|
input: ['cross-language-entities'],
|
|
1223
|
-
gating: false,
|
|
1224
1158
|
resolvable: false,
|
|
1225
1159
|
message: 'Circular dependency detected: {cycle}.',
|
|
1226
1160
|
docs: 'circular-dependency',
|
|
@@ -1238,7 +1172,6 @@ export const RULE_REGISTRY = {
|
|
|
1238
1172
|
analyzer: 'dependency-graph',
|
|
1239
1173
|
field: 'type',
|
|
1240
1174
|
input: ['cross-language-entities'],
|
|
1241
|
-
gating: false,
|
|
1242
1175
|
resolvable: false,
|
|
1243
1176
|
message: 'Break dependency cycle: {cycle}.',
|
|
1244
1177
|
docs: 'break-cycles',
|
|
@@ -1256,7 +1189,6 @@ export const RULE_REGISTRY = {
|
|
|
1256
1189
|
analyzer: 'dependency-graph',
|
|
1257
1190
|
field: 'type',
|
|
1258
1191
|
input: ['cross-language-entities'],
|
|
1259
|
-
gating: false,
|
|
1260
1192
|
resolvable: false,
|
|
1261
1193
|
message: 'Tight coupling detected between {a} and {b}.',
|
|
1262
1194
|
docs: 'tight-coupling',
|
|
@@ -1274,7 +1206,6 @@ export const RULE_REGISTRY = {
|
|
|
1274
1206
|
analyzer: 'dependency-graph',
|
|
1275
1207
|
field: 'type',
|
|
1276
1208
|
input: ['cross-language-entities'],
|
|
1277
|
-
gating: false,
|
|
1278
1209
|
resolvable: false,
|
|
1279
1210
|
message: 'Reduce coupling between {a} and {b}.',
|
|
1280
1211
|
docs: 'reduce-coupling',
|
|
@@ -1292,7 +1223,6 @@ export const RULE_REGISTRY = {
|
|
|
1292
1223
|
analyzer: 'dependency-graph',
|
|
1293
1224
|
field: 'type',
|
|
1294
1225
|
input: ['cross-language-entities'],
|
|
1295
|
-
gating: false,
|
|
1296
1226
|
resolvable: false,
|
|
1297
1227
|
message: 'Hub node "{node}" has {count} dependencies.',
|
|
1298
1228
|
docs: 'hub-nodes',
|
|
@@ -1310,7 +1240,6 @@ export const RULE_REGISTRY = {
|
|
|
1310
1240
|
analyzer: 'dependency-graph',
|
|
1311
1241
|
field: 'type',
|
|
1312
1242
|
input: ['cross-language-entities'],
|
|
1313
|
-
gating: false,
|
|
1314
1243
|
resolvable: false,
|
|
1315
1244
|
message: 'Split responsibilities of node "{node}".',
|
|
1316
1245
|
docs: 'split-responsibilities',
|
|
@@ -1328,7 +1257,6 @@ export const RULE_REGISTRY = {
|
|
|
1328
1257
|
analyzer: 'dependency-graph',
|
|
1329
1258
|
field: 'type',
|
|
1330
1259
|
input: ['cross-language-entities'],
|
|
1331
|
-
gating: false,
|
|
1332
1260
|
resolvable: false,
|
|
1333
1261
|
message: 'Orphaned node "{node}" has no connections.',
|
|
1334
1262
|
docs: 'orphaned-nodes',
|
|
@@ -1346,7 +1274,6 @@ export const RULE_REGISTRY = {
|
|
|
1346
1274
|
analyzer: 'dependency-graph',
|
|
1347
1275
|
field: 'type',
|
|
1348
1276
|
input: ['cross-language-entities'],
|
|
1349
|
-
gating: false,
|
|
1350
1277
|
resolvable: false,
|
|
1351
1278
|
message: 'Review orphaned nodes: {nodes}.',
|
|
1352
1279
|
docs: 'review-orphans',
|
|
@@ -1365,7 +1292,6 @@ export const RULE_REGISTRY = {
|
|
|
1365
1292
|
analyzer: 'styles',
|
|
1366
1293
|
field: 'rule',
|
|
1367
1294
|
input: ['styles-css'],
|
|
1368
|
-
gating: false,
|
|
1369
1295
|
resolvable: false,
|
|
1370
1296
|
message: 'Color value "{value}" drifts from the dominant token.',
|
|
1371
1297
|
docs: 'styles/value-drift',
|
|
@@ -1383,7 +1309,6 @@ export const RULE_REGISTRY = {
|
|
|
1383
1309
|
analyzer: 'styles',
|
|
1384
1310
|
field: 'rule',
|
|
1385
1311
|
input: ['styles-css'],
|
|
1386
|
-
gating: false,
|
|
1387
1312
|
resolvable: false,
|
|
1388
1313
|
message: 'Value "{value}" is off the project\'s design scale.',
|
|
1389
1314
|
docs: 'styles/off-scale',
|
|
@@ -1401,7 +1326,6 @@ export const RULE_REGISTRY = {
|
|
|
1401
1326
|
analyzer: 'styles',
|
|
1402
1327
|
field: 'rule',
|
|
1403
1328
|
input: ['styles-css'],
|
|
1404
|
-
gating: true,
|
|
1405
1329
|
resolvable: true,
|
|
1406
1330
|
message: 'Undefined CSS class: "{class}" has no matching definition.',
|
|
1407
1331
|
docs: 'styles/undefined-class',
|
|
@@ -1422,7 +1346,6 @@ export const RULE_REGISTRY = {
|
|
|
1422
1346
|
analyzer: 'styles',
|
|
1423
1347
|
field: 'rule',
|
|
1424
1348
|
input: ['styles-css'],
|
|
1425
|
-
gating: false,
|
|
1426
1349
|
resolvable: false,
|
|
1427
1350
|
message: 'Undefined-class detection skipped: {reason}.',
|
|
1428
1351
|
docs: 'styles/undefined-class-disabled',
|
|
@@ -1440,7 +1363,6 @@ export const RULE_REGISTRY = {
|
|
|
1440
1363
|
analyzer: 'styles',
|
|
1441
1364
|
field: 'rule',
|
|
1442
1365
|
input: ['styles-css'],
|
|
1443
|
-
gating: false,
|
|
1444
1366
|
resolvable: false,
|
|
1445
1367
|
message: 'Token bypass: raw value "{value}" used instead of a design token.',
|
|
1446
1368
|
docs: 'styles/token-bypass',
|
|
@@ -1458,7 +1380,6 @@ export const RULE_REGISTRY = {
|
|
|
1458
1380
|
analyzer: 'styles',
|
|
1459
1381
|
field: 'rule',
|
|
1460
1382
|
input: ['styles-css'],
|
|
1461
|
-
gating: false,
|
|
1462
1383
|
resolvable: false,
|
|
1463
1384
|
message: 'Styling mechanism fragmented across {count} mechanisms.',
|
|
1464
1385
|
docs: 'styles/mechanism-fragmentation',
|
|
@@ -1476,7 +1397,6 @@ export const RULE_REGISTRY = {
|
|
|
1476
1397
|
analyzer: 'styles',
|
|
1477
1398
|
field: 'rule',
|
|
1478
1399
|
input: ['styles-css'],
|
|
1479
|
-
gating: false,
|
|
1480
1400
|
resolvable: false,
|
|
1481
1401
|
message: 'Mixing styling mechanisms in one file.',
|
|
1482
1402
|
docs: 'styles/mechanism-mixing',
|
|
@@ -1494,7 +1414,6 @@ export const RULE_REGISTRY = {
|
|
|
1494
1414
|
analyzer: 'styles',
|
|
1495
1415
|
field: 'rule',
|
|
1496
1416
|
input: ['styles-css'],
|
|
1497
|
-
gating: false,
|
|
1498
1417
|
resolvable: false,
|
|
1499
1418
|
message: 'Declaration set similar to another block ({similarity}%).',
|
|
1500
1419
|
docs: 'styles/declaration-set-similarity',
|
|
@@ -1512,7 +1431,6 @@ export const RULE_REGISTRY = {
|
|
|
1512
1431
|
analyzer: 'styles',
|
|
1513
1432
|
field: 'rule',
|
|
1514
1433
|
input: ['styles-css'],
|
|
1515
|
-
gating: false,
|
|
1516
1434
|
resolvable: false,
|
|
1517
1435
|
message: 'Z-index sprawl: {count} distinct z-index values.',
|
|
1518
1436
|
docs: 'styles/z-index-sprawl',
|
|
@@ -1530,7 +1448,6 @@ export const RULE_REGISTRY = {
|
|
|
1530
1448
|
analyzer: 'styles',
|
|
1531
1449
|
field: 'rule',
|
|
1532
1450
|
input: ['styles-css'],
|
|
1533
|
-
gating: false,
|
|
1534
1451
|
resolvable: false,
|
|
1535
1452
|
message: 'Z-index value "{value}" appears only once.',
|
|
1536
1453
|
docs: 'styles/z-index-singleton',
|
|
@@ -1549,7 +1466,6 @@ export const RULE_REGISTRY = {
|
|
|
1549
1466
|
analyzer: 'conventions',
|
|
1550
1467
|
field: 'rule',
|
|
1551
1468
|
input: ['function-index'],
|
|
1552
|
-
gating: true,
|
|
1553
1469
|
resolvable: true,
|
|
1554
1470
|
message: '{pct}% of `{antecedent}` callers also call `{consequent}`.',
|
|
1555
1471
|
docs: 'conventions/usage-pair',
|
|
@@ -1570,7 +1486,6 @@ export const RULE_REGISTRY = {
|
|
|
1570
1486
|
analyzer: 'conventions',
|
|
1571
1487
|
field: 'rule',
|
|
1572
1488
|
input: ['function-index'],
|
|
1573
|
-
gating: false,
|
|
1574
1489
|
resolvable: false,
|
|
1575
1490
|
message: 'Import form mismatch: use {form} for "{source}".',
|
|
1576
1491
|
docs: 'conventions/import-form',
|
|
@@ -1588,7 +1503,6 @@ export const RULE_REGISTRY = {
|
|
|
1588
1503
|
analyzer: 'conventions',
|
|
1589
1504
|
field: 'rule',
|
|
1590
1505
|
input: ['function-index'],
|
|
1591
|
-
gating: false,
|
|
1592
1506
|
resolvable: false,
|
|
1593
1507
|
message: 'Error-handling convention mismatch: {detail}.',
|
|
1594
1508
|
docs: 'conventions/error-handling',
|
|
@@ -1606,7 +1520,6 @@ export const RULE_REGISTRY = {
|
|
|
1606
1520
|
analyzer: 'conventions',
|
|
1607
1521
|
field: 'rule',
|
|
1608
1522
|
input: ['function-index'],
|
|
1609
|
-
gating: false,
|
|
1610
1523
|
resolvable: false,
|
|
1611
1524
|
message: 'Export shape mismatch: {detail}.',
|
|
1612
1525
|
docs: 'conventions/export-shape',
|
|
@@ -1624,7 +1537,6 @@ export const RULE_REGISTRY = {
|
|
|
1624
1537
|
analyzer: 'conventions',
|
|
1625
1538
|
field: 'rule',
|
|
1626
1539
|
input: ['function-index'],
|
|
1627
|
-
gating: false,
|
|
1628
1540
|
resolvable: false,
|
|
1629
1541
|
message: 'Naming convention mismatch: {detail}.',
|
|
1630
1542
|
docs: 'conventions/naming',
|
|
@@ -1643,7 +1555,6 @@ export const RULE_REGISTRY = {
|
|
|
1643
1555
|
analyzer: 'cross-domain',
|
|
1644
1556
|
field: 'rule',
|
|
1645
1557
|
input: ['schema_usage', 'functions'],
|
|
1646
|
-
gating: false,
|
|
1647
1558
|
resolvable: false,
|
|
1648
1559
|
message: 'Table "{table}" is written but never read.',
|
|
1649
1560
|
docs: 'cross-domain/written-never-read',
|
|
@@ -1661,7 +1572,6 @@ export const RULE_REGISTRY = {
|
|
|
1661
1572
|
analyzer: 'cross-domain',
|
|
1662
1573
|
field: 'rule',
|
|
1663
1574
|
input: ['schema_usage', 'functions'],
|
|
1664
|
-
gating: false,
|
|
1665
1575
|
resolvable: false,
|
|
1666
1576
|
message: 'Table "{table}" is read but never written.',
|
|
1667
1577
|
docs: 'cross-domain/read-never-written',
|
|
@@ -1679,7 +1589,6 @@ export const RULE_REGISTRY = {
|
|
|
1679
1589
|
analyzer: 'cross-domain',
|
|
1680
1590
|
field: 'rule',
|
|
1681
1591
|
input: ['schema_usage', 'functions'],
|
|
1682
|
-
gating: false,
|
|
1683
1592
|
resolvable: false,
|
|
1684
1593
|
message: 'Transaction boundary spans {count} tables.',
|
|
1685
1594
|
docs: 'cross-domain/transaction-boundary',
|
|
@@ -1697,7 +1606,6 @@ export const RULE_REGISTRY = {
|
|
|
1697
1606
|
analyzer: 'cross-domain',
|
|
1698
1607
|
field: 'rule',
|
|
1699
1608
|
input: ['schema_usage', 'functions'],
|
|
1700
|
-
gating: false,
|
|
1701
1609
|
resolvable: false,
|
|
1702
1610
|
message: 'Validation bypass: {detail}.',
|
|
1703
1611
|
docs: 'cross-domain/validation-bypass',
|
|
@@ -1715,7 +1623,6 @@ export const RULE_REGISTRY = {
|
|
|
1715
1623
|
analyzer: 'cross-domain',
|
|
1716
1624
|
field: 'rule',
|
|
1717
1625
|
input: ['schema_usage', 'functions'],
|
|
1718
|
-
gating: false,
|
|
1719
1626
|
resolvable: false,
|
|
1720
1627
|
message: 'Uncovered risk: {detail}.',
|
|
1721
1628
|
docs: 'cross-domain/uncovered-risk',
|
|
@@ -1765,11 +1672,13 @@ export const MCP_DEFAULT_ANALYZERS = [
|
|
|
1765
1672
|
* The registry records which field on the Violation carries the rule ID
|
|
1766
1673
|
* (`field` — `rule` for almost every analyzer, `type` for dependency-graph).
|
|
1767
1674
|
* This helper reads that field off the violation and matches it against the
|
|
1768
|
-
* registry key, so gate
|
|
1675
|
+
* registry key, so the gate's resolution-gap detection (Spec 45 R1) never
|
|
1676
|
+
* hard-codes a field.
|
|
1769
1677
|
*
|
|
1770
1678
|
* Invariant violations (user-defined rule IDs) have no registry entry and
|
|
1771
|
-
* return `undefined
|
|
1772
|
-
*
|
|
1679
|
+
* return `undefined`. They still gate (Spec 45 R1) — the gate blocks on every
|
|
1680
|
+
* finding at a blocking severity; the registry only determines whether a
|
|
1681
|
+
* missing resolution is a recorded gap.
|
|
1773
1682
|
*/
|
|
1774
1683
|
export function getViolationRuleEntry(v) {
|
|
1775
1684
|
if (!v.analyzer)
|