@behavproof/cli 0.0.0-stage → 0.1.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.
Files changed (67) hide show
  1. package/README.md +14 -2
  2. package/dist/api.d.ts +6 -0
  3. package/dist/api.d.ts.map +1 -0
  4. package/dist/api.js +5 -0
  5. package/dist/api.js.map +1 -0
  6. package/dist/check.d.ts +272 -0
  7. package/dist/check.d.ts.map +1 -0
  8. package/dist/check.js +220 -0
  9. package/dist/check.js.map +1 -0
  10. package/dist/formal-evaluation.d.ts +108 -0
  11. package/dist/formal-evaluation.d.ts.map +1 -0
  12. package/dist/formal-evaluation.js +78 -0
  13. package/dist/formal-evaluation.js.map +1 -0
  14. package/dist/formal-worker.d.ts +2 -0
  15. package/dist/formal-worker.d.ts.map +1 -0
  16. package/dist/formal-worker.js +32 -0
  17. package/dist/formal-worker.js.map +1 -0
  18. package/dist/formal.d.ts +148 -0
  19. package/dist/formal.d.ts.map +1 -0
  20. package/dist/formal.js +99 -0
  21. package/dist/formal.js.map +1 -0
  22. package/dist/impact.d.ts +20 -0
  23. package/dist/impact.d.ts.map +1 -0
  24. package/dist/impact.js +23 -0
  25. package/dist/impact.js.map +1 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +151 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/pipeline.d.ts +38 -0
  31. package/dist/pipeline.d.ts.map +1 -0
  32. package/dist/pipeline.js +46 -0
  33. package/dist/pipeline.js.map +1 -0
  34. package/dist/project.d.ts +97 -0
  35. package/dist/project.d.ts.map +1 -0
  36. package/dist/project.js +101 -0
  37. package/dist/project.js.map +1 -0
  38. package/dist/registration.d.ts +595 -0
  39. package/dist/registration.d.ts.map +1 -0
  40. package/dist/registration.js +112 -0
  41. package/dist/registration.js.map +1 -0
  42. package/dist/report.d.ts +23 -0
  43. package/dist/report.d.ts.map +1 -0
  44. package/dist/report.js +34 -0
  45. package/dist/report.js.map +1 -0
  46. package/dist/scopes.d.ts +48 -0
  47. package/dist/scopes.d.ts.map +1 -0
  48. package/dist/scopes.js +60 -0
  49. package/dist/scopes.js.map +1 -0
  50. package/dist/trust.d.ts +533 -0
  51. package/dist/trust.d.ts.map +1 -0
  52. package/dist/trust.js +130 -0
  53. package/dist/trust.js.map +1 -0
  54. package/package.json +51 -4
  55. package/presets/basic-v1.json +21 -0
  56. package/presets/critical-v1.json +39 -0
  57. package/presets/standard-v1.json +21 -0
  58. package/schemas/config.schema.json +492 -0
  59. package/schemas/evidence.schema.json +3612 -0
  60. package/schemas/manifest.schema.json +225 -0
  61. package/schemas/policy.schema.json +21 -0
  62. package/schemas/registration.schema.json +1065 -0
  63. package/schemas/registry.schema.json +307 -0
  64. package/schemas/trust-root.schema.json +1445 -0
  65. package/templates/audit.yml +28 -0
  66. package/templates/protected-github-producer.yml +58 -0
  67. package/templates/protected-github-publisher.yml +111 -0
@@ -0,0 +1,1445 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "type": "number",
7
+ "const": 1
8
+ },
9
+ "policy": {
10
+ "type": "object",
11
+ "properties": {
12
+ "schemaVersion": {
13
+ "type": "number",
14
+ "const": 1
15
+ },
16
+ "profileVersion": {
17
+ "type": "string",
18
+ "const": "1"
19
+ },
20
+ "rules": {}
21
+ },
22
+ "required": [
23
+ "schemaVersion",
24
+ "profileVersion",
25
+ "rules"
26
+ ],
27
+ "additionalProperties": false
28
+ },
29
+ "config": {
30
+ "type": "object",
31
+ "properties": {
32
+ "schemaVersion": {
33
+ "type": "number",
34
+ "const": 1
35
+ },
36
+ "formal": {
37
+ "type": "object",
38
+ "properties": {
39
+ "models": {
40
+ "minItems": 1,
41
+ "maxItems": 100,
42
+ "type": "array",
43
+ "items": {
44
+ "type": "object",
45
+ "properties": {
46
+ "id": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "contractId": {
51
+ "type": "string",
52
+ "minLength": 1
53
+ },
54
+ "model": {
55
+ "type": "string",
56
+ "minLength": 1
57
+ },
58
+ "modelSources": {
59
+ "default": [],
60
+ "maxItems": 10000,
61
+ "type": "array",
62
+ "items": {
63
+ "type": "string",
64
+ "minLength": 1
65
+ }
66
+ },
67
+ "quint": {
68
+ "type": "object",
69
+ "properties": {
70
+ "entry": {
71
+ "type": "string",
72
+ "minLength": 1
73
+ },
74
+ "version": {
75
+ "type": "string",
76
+ "minLength": 1
77
+ },
78
+ "apalacheVersion": {
79
+ "type": "string",
80
+ "minLength": 1
81
+ }
82
+ },
83
+ "required": [
84
+ "entry",
85
+ "version"
86
+ ],
87
+ "additionalProperties": false
88
+ },
89
+ "properties": {
90
+ "maxItems": 10000,
91
+ "type": "array",
92
+ "items": {
93
+ "type": "string",
94
+ "minLength": 1
95
+ }
96
+ },
97
+ "checks": {
98
+ "minItems": 1,
99
+ "maxItems": 10000,
100
+ "type": "array",
101
+ "items": {
102
+ "type": "string",
103
+ "enum": [
104
+ "parse",
105
+ "typecheck",
106
+ "test",
107
+ "run",
108
+ "verify"
109
+ ]
110
+ }
111
+ },
112
+ "maxSteps": {
113
+ "type": "integer",
114
+ "minimum": 1,
115
+ "maximum": 10000
116
+ },
117
+ "maxSamples": {
118
+ "default": 100,
119
+ "type": "integer",
120
+ "minimum": 1,
121
+ "maximum": 100000
122
+ },
123
+ "seed": {
124
+ "type": "string",
125
+ "minLength": 1
126
+ },
127
+ "timeoutMs": {
128
+ "default": 60000,
129
+ "type": "integer",
130
+ "minimum": 1,
131
+ "maximum": 3600000
132
+ },
133
+ "report": {
134
+ "type": "string",
135
+ "minLength": 1
136
+ },
137
+ "driver": {
138
+ "type": "string",
139
+ "minLength": 1
140
+ },
141
+ "driverSources": {
142
+ "maxItems": 10000,
143
+ "type": "array",
144
+ "items": {
145
+ "type": "string",
146
+ "minLength": 1
147
+ }
148
+ },
149
+ "implementation": {
150
+ "type": "string",
151
+ "minLength": 1
152
+ },
153
+ "implementationSources": {
154
+ "default": [],
155
+ "maxItems": 10000,
156
+ "type": "array",
157
+ "items": {
158
+ "type": "string",
159
+ "minLength": 1
160
+ }
161
+ },
162
+ "conformanceReport": {
163
+ "type": "string",
164
+ "minLength": 1
165
+ },
166
+ "traceReceipt": {
167
+ "type": "string",
168
+ "minLength": 1
169
+ },
170
+ "traceDirectory": {
171
+ "type": "string",
172
+ "minLength": 1
173
+ },
174
+ "requiredActions": {
175
+ "default": [],
176
+ "maxItems": 10000,
177
+ "type": "array",
178
+ "items": {
179
+ "type": "string",
180
+ "minLength": 1
181
+ }
182
+ },
183
+ "minTraces": {
184
+ "default": 1,
185
+ "type": "integer",
186
+ "minimum": 1,
187
+ "maximum": 9007199254740991
188
+ },
189
+ "minComparisons": {
190
+ "default": 1,
191
+ "type": "integer",
192
+ "minimum": 1,
193
+ "maximum": 9007199254740991
194
+ },
195
+ "requireCanary": {
196
+ "default": true,
197
+ "type": "boolean"
198
+ },
199
+ "canary": {
200
+ "type": "object",
201
+ "properties": {
202
+ "faultId": {
203
+ "type": "string",
204
+ "minLength": 1
205
+ },
206
+ "implementation": {
207
+ "type": "string",
208
+ "minLength": 1
209
+ },
210
+ "targetRef": {
211
+ "type": "string",
212
+ "minLength": 1
213
+ }
214
+ },
215
+ "required": [
216
+ "faultId",
217
+ "implementation",
218
+ "targetRef"
219
+ ],
220
+ "additionalProperties": false
221
+ }
222
+ },
223
+ "required": [
224
+ "id",
225
+ "contractId",
226
+ "model",
227
+ "quint",
228
+ "properties",
229
+ "checks",
230
+ "maxSteps",
231
+ "seed",
232
+ "report"
233
+ ],
234
+ "additionalProperties": false
235
+ }
236
+ }
237
+ },
238
+ "required": [
239
+ "models"
240
+ ],
241
+ "additionalProperties": false
242
+ },
243
+ "mode": {
244
+ "default": "audit",
245
+ "type": "string",
246
+ "enum": [
247
+ "audit",
248
+ "gate"
249
+ ]
250
+ },
251
+ "profile": {
252
+ "default": "standard",
253
+ "type": "string",
254
+ "enum": [
255
+ "basic",
256
+ "standard",
257
+ "critical"
258
+ ]
259
+ },
260
+ "profileVersion": {
261
+ "default": "1",
262
+ "type": "string",
263
+ "const": "1"
264
+ },
265
+ "riskOverrides": {
266
+ "default": [],
267
+ "type": "array",
268
+ "items": {
269
+ "type": "object",
270
+ "properties": {
271
+ "selector": {
272
+ "oneOf": [
273
+ {
274
+ "type": "object",
275
+ "properties": {
276
+ "kind": {
277
+ "type": "string",
278
+ "const": "path"
279
+ },
280
+ "value": {
281
+ "type": "string",
282
+ "minLength": 1
283
+ }
284
+ },
285
+ "required": [
286
+ "kind",
287
+ "value"
288
+ ],
289
+ "additionalProperties": false
290
+ },
291
+ {
292
+ "type": "object",
293
+ "properties": {
294
+ "kind": {
295
+ "type": "string",
296
+ "const": "module"
297
+ },
298
+ "value": {
299
+ "type": "string",
300
+ "minLength": 1
301
+ }
302
+ },
303
+ "required": [
304
+ "kind",
305
+ "value"
306
+ ],
307
+ "additionalProperties": false
308
+ },
309
+ {
310
+ "type": "object",
311
+ "properties": {
312
+ "kind": {
313
+ "type": "string",
314
+ "const": "contract-kind"
315
+ },
316
+ "value": {
317
+ "type": "string",
318
+ "enum": [
319
+ "examples",
320
+ "invariant",
321
+ "state_machine",
322
+ "api_contract",
323
+ "external"
324
+ ]
325
+ }
326
+ },
327
+ "required": [
328
+ "kind",
329
+ "value"
330
+ ],
331
+ "additionalProperties": false
332
+ }
333
+ ]
334
+ },
335
+ "profile": {
336
+ "type": "string",
337
+ "enum": [
338
+ "basic",
339
+ "standard",
340
+ "critical"
341
+ ]
342
+ }
343
+ },
344
+ "required": [
345
+ "selector",
346
+ "profile"
347
+ ],
348
+ "additionalProperties": false
349
+ }
350
+ },
351
+ "git": {
352
+ "default": {
353
+ "base": "origin/main"
354
+ },
355
+ "type": "object",
356
+ "properties": {
357
+ "base": {
358
+ "default": "origin/main",
359
+ "type": "string",
360
+ "minLength": 1
361
+ }
362
+ },
363
+ "additionalProperties": false
364
+ },
365
+ "reports": {
366
+ "default": {},
367
+ "type": "object",
368
+ "properties": {
369
+ "vitest": {
370
+ "type": "string",
371
+ "minLength": 1
372
+ },
373
+ "coverage": {
374
+ "type": "string",
375
+ "minLength": 1
376
+ },
377
+ "mutation": {
378
+ "type": "string",
379
+ "minLength": 1
380
+ }
381
+ },
382
+ "additionalProperties": false
383
+ },
384
+ "executionManifests": {
385
+ "default": [],
386
+ "type": "array",
387
+ "items": {
388
+ "type": "string",
389
+ "minLength": 1
390
+ }
391
+ },
392
+ "rules": {
393
+ "default": {}
394
+ },
395
+ "contracts": {
396
+ "default": {
397
+ "enabled": false,
398
+ "sources": [],
399
+ "requireExecutionEvidence": true,
400
+ "approval": {
401
+ "provider": "github-protected-review",
402
+ "requiredForRisk": [
403
+ "critical"
404
+ ],
405
+ "onUnverifiable": "unknown"
406
+ },
407
+ "documents": {
408
+ "output": ".behavproof/generated",
409
+ "commit": false
410
+ }
411
+ },
412
+ "type": "object",
413
+ "properties": {
414
+ "enabled": {
415
+ "default": false,
416
+ "type": "boolean"
417
+ },
418
+ "sources": {
419
+ "default": [],
420
+ "type": "array",
421
+ "items": {
422
+ "type": "object",
423
+ "properties": {
424
+ "type": {
425
+ "type": "string",
426
+ "enum": [
427
+ "vitest-inline",
428
+ "manifest",
429
+ "external",
430
+ "gherkin",
431
+ "openapi"
432
+ ]
433
+ },
434
+ "include": {
435
+ "type": "array",
436
+ "items": {
437
+ "type": "string",
438
+ "minLength": 1
439
+ }
440
+ }
441
+ },
442
+ "required": [
443
+ "type",
444
+ "include"
445
+ ],
446
+ "additionalProperties": false
447
+ }
448
+ },
449
+ "requireExecutionEvidence": {
450
+ "default": true,
451
+ "type": "boolean"
452
+ },
453
+ "approval": {
454
+ "default": {
455
+ "provider": "github-protected-review",
456
+ "requiredForRisk": [
457
+ "critical"
458
+ ],
459
+ "onUnverifiable": "unknown"
460
+ },
461
+ "type": "object",
462
+ "properties": {
463
+ "provider": {
464
+ "type": "string",
465
+ "const": "github-protected-review"
466
+ },
467
+ "requiredForRisk": {
468
+ "default": [
469
+ "critical"
470
+ ],
471
+ "type": "array",
472
+ "items": {
473
+ "type": "string",
474
+ "enum": [
475
+ "basic",
476
+ "standard",
477
+ "critical"
478
+ ]
479
+ }
480
+ },
481
+ "onUnverifiable": {
482
+ "default": "unknown",
483
+ "type": "string",
484
+ "const": "unknown"
485
+ }
486
+ },
487
+ "required": [
488
+ "provider"
489
+ ],
490
+ "additionalProperties": false
491
+ },
492
+ "documents": {
493
+ "default": {
494
+ "output": ".behavproof/generated",
495
+ "commit": false
496
+ },
497
+ "type": "object",
498
+ "properties": {
499
+ "output": {
500
+ "default": ".behavproof/generated",
501
+ "type": "string",
502
+ "minLength": 1
503
+ },
504
+ "commit": {
505
+ "default": false,
506
+ "type": "boolean"
507
+ }
508
+ },
509
+ "additionalProperties": false
510
+ }
511
+ },
512
+ "additionalProperties": false
513
+ }
514
+ },
515
+ "required": [
516
+ "schemaVersion"
517
+ ],
518
+ "additionalProperties": false
519
+ },
520
+ "baseline": {
521
+ "type": "object",
522
+ "properties": {
523
+ "schemaVersion": {
524
+ "type": "number",
525
+ "const": 1
526
+ },
527
+ "repositoryId": {
528
+ "type": "string",
529
+ "minLength": 1
530
+ },
531
+ "commitSha": {
532
+ "type": "string",
533
+ "minLength": 1
534
+ },
535
+ "contracts": {
536
+ "type": "array",
537
+ "items": {
538
+ "type": "object",
539
+ "properties": {
540
+ "id": {
541
+ "type": "string",
542
+ "minLength": 1
543
+ },
544
+ "formal": {
545
+ "type": "object",
546
+ "properties": {
547
+ "modelId": {
548
+ "type": "string",
549
+ "minLength": 1
550
+ },
551
+ "modelHash": {
552
+ "type": "string",
553
+ "pattern": "^[a-f0-9]{64}$"
554
+ },
555
+ "driverHash": {
556
+ "type": "string",
557
+ "pattern": "^[a-f0-9]{64}$"
558
+ },
559
+ "propertyIds": {
560
+ "minItems": 1,
561
+ "maxItems": 10000,
562
+ "type": "array",
563
+ "items": {
564
+ "type": "string",
565
+ "minLength": 1
566
+ }
567
+ }
568
+ },
569
+ "required": [
570
+ "modelId",
571
+ "modelHash",
572
+ "propertyIds"
573
+ ],
574
+ "additionalProperties": false
575
+ },
576
+ "kind": {
577
+ "type": "string",
578
+ "enum": [
579
+ "examples",
580
+ "invariant",
581
+ "state_machine",
582
+ "api_contract",
583
+ "external"
584
+ ]
585
+ },
586
+ "intentIds": {
587
+ "type": "array",
588
+ "items": {
589
+ "type": "string",
590
+ "minLength": 1
591
+ }
592
+ },
593
+ "revisionHash": {
594
+ "type": "string",
595
+ "pattern": "^[a-f0-9]{64}$"
596
+ },
597
+ "sourceRef": {
598
+ "type": "string",
599
+ "minLength": 1
600
+ },
601
+ "caseIds": {
602
+ "type": "array",
603
+ "items": {
604
+ "type": "string",
605
+ "minLength": 1
606
+ }
607
+ },
608
+ "risk": {
609
+ "type": "string",
610
+ "enum": [
611
+ "basic",
612
+ "standard",
613
+ "critical"
614
+ ]
615
+ },
616
+ "cases": {
617
+ "type": "array",
618
+ "items": {
619
+ "type": "object",
620
+ "properties": {
621
+ "id": {
622
+ "type": "string",
623
+ "minLength": 1
624
+ },
625
+ "input": {
626
+ "$ref": "#/$defs/__schema0"
627
+ },
628
+ "expected": {
629
+ "$ref": "#/$defs/__schema1"
630
+ },
631
+ "negative": {
632
+ "type": "boolean"
633
+ }
634
+ },
635
+ "required": [
636
+ "id",
637
+ "input",
638
+ "expected"
639
+ ],
640
+ "additionalProperties": false
641
+ }
642
+ }
643
+ },
644
+ "required": [
645
+ "id",
646
+ "kind",
647
+ "intentIds",
648
+ "revisionHash",
649
+ "sourceRef"
650
+ ],
651
+ "additionalProperties": false
652
+ }
653
+ },
654
+ "intents": {
655
+ "type": "array",
656
+ "items": {
657
+ "type": "object",
658
+ "properties": {
659
+ "id": {
660
+ "type": "string",
661
+ "minLength": 1
662
+ },
663
+ "statement": {
664
+ "type": "string",
665
+ "minLength": 1
666
+ },
667
+ "risk": {
668
+ "type": "string",
669
+ "enum": [
670
+ "basic",
671
+ "standard",
672
+ "critical"
673
+ ]
674
+ },
675
+ "contentHash": {
676
+ "type": "string",
677
+ "pattern": "^[a-f0-9]{64}$"
678
+ },
679
+ "origin": {
680
+ "type": "object",
681
+ "properties": {
682
+ "kind": {
683
+ "type": "string",
684
+ "enum": [
685
+ "inline",
686
+ "manifest",
687
+ "external"
688
+ ]
689
+ },
690
+ "ref": {
691
+ "type": "string",
692
+ "minLength": 1
693
+ }
694
+ },
695
+ "required": [
696
+ "kind",
697
+ "ref"
698
+ ],
699
+ "additionalProperties": false
700
+ }
701
+ },
702
+ "required": [
703
+ "id",
704
+ "statement",
705
+ "risk",
706
+ "contentHash",
707
+ "origin"
708
+ ],
709
+ "additionalProperties": false
710
+ }
711
+ },
712
+ "policyHash": {
713
+ "type": "string",
714
+ "pattern": "^[a-f0-9]{64}$"
715
+ },
716
+ "extractorVersion": {
717
+ "type": "string",
718
+ "minLength": 1
719
+ },
720
+ "scope": {
721
+ "type": "array",
722
+ "items": {
723
+ "type": "string",
724
+ "minLength": 1
725
+ }
726
+ },
727
+ "discoveryDiagnostics": {
728
+ "type": "array",
729
+ "items": {
730
+ "type": "object",
731
+ "properties": {
732
+ "code": {
733
+ "type": "string",
734
+ "minLength": 1
735
+ },
736
+ "sourceRef": {
737
+ "type": "string",
738
+ "minLength": 1
739
+ },
740
+ "message": {
741
+ "type": "string",
742
+ "minLength": 1
743
+ }
744
+ },
745
+ "required": [
746
+ "code",
747
+ "sourceRef",
748
+ "message"
749
+ ],
750
+ "additionalProperties": false
751
+ }
752
+ }
753
+ },
754
+ "required": [
755
+ "schemaVersion",
756
+ "commitSha",
757
+ "contracts",
758
+ "intents"
759
+ ],
760
+ "additionalProperties": false
761
+ },
762
+ "policySource": {
763
+ "type": "object",
764
+ "properties": {
765
+ "repository": {
766
+ "type": "string",
767
+ "pattern": "^[\\w-]+\\/[\\w.-]+$"
768
+ },
769
+ "commitSha": {
770
+ "type": "string",
771
+ "pattern": "^[a-f0-9]{40}$"
772
+ },
773
+ "ref": {
774
+ "type": "string",
775
+ "minLength": 1
776
+ },
777
+ "fileHash": {
778
+ "type": "string",
779
+ "pattern": "^[a-f0-9]{64}$"
780
+ },
781
+ "policyHash": {
782
+ "type": "string",
783
+ "pattern": "^[a-f0-9]{64}$"
784
+ }
785
+ },
786
+ "required": [
787
+ "repository",
788
+ "commitSha",
789
+ "ref",
790
+ "fileHash",
791
+ "policyHash"
792
+ ],
793
+ "additionalProperties": false
794
+ },
795
+ "runner": {
796
+ "type": "object",
797
+ "properties": {
798
+ "kind": {
799
+ "type": "string",
800
+ "const": "vitest"
801
+ },
802
+ "version": {
803
+ "type": "string",
804
+ "pattern": "^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$"
805
+ },
806
+ "manifestRef": {
807
+ "type": "string",
808
+ "minLength": 1
809
+ }
810
+ },
811
+ "required": [
812
+ "kind",
813
+ "version",
814
+ "manifestRef"
815
+ ],
816
+ "additionalProperties": false
817
+ },
818
+ "inputs": {
819
+ "minItems": 1,
820
+ "type": "array",
821
+ "items": {
822
+ "type": "string",
823
+ "minLength": 1
824
+ }
825
+ },
826
+ "qualitySources": {
827
+ "minItems": 1,
828
+ "type": "array",
829
+ "items": {
830
+ "type": "string",
831
+ "minLength": 1
832
+ }
833
+ },
834
+ "configPaths": {
835
+ "type": "array",
836
+ "items": {
837
+ "type": "string",
838
+ "minLength": 1
839
+ }
840
+ },
841
+ "dependencyLockPath": {
842
+ "type": "string",
843
+ "minLength": 1
844
+ },
845
+ "manifests": {
846
+ "type": "array",
847
+ "items": {
848
+ "type": "object",
849
+ "properties": {
850
+ "ref": {
851
+ "type": "string",
852
+ "minLength": 1
853
+ },
854
+ "manifestHash": {
855
+ "type": "string",
856
+ "pattern": "^[a-f0-9]{64}$"
857
+ },
858
+ "expected": {
859
+ "type": "object",
860
+ "properties": {
861
+ "executionId": {
862
+ "type": "string",
863
+ "minLength": 1
864
+ },
865
+ "subject": {
866
+ "type": "object",
867
+ "properties": {
868
+ "repositoryId": {
869
+ "type": "string",
870
+ "minLength": 1
871
+ },
872
+ "prHeadSha": {
873
+ "type": "string",
874
+ "minLength": 1
875
+ },
876
+ "testedCommitSha": {
877
+ "type": "string",
878
+ "minLength": 1
879
+ },
880
+ "testedCommitParents": {
881
+ "type": "array",
882
+ "items": {
883
+ "type": "string",
884
+ "minLength": 1
885
+ }
886
+ },
887
+ "sourceTreeHash": {
888
+ "type": "string",
889
+ "pattern": "^[a-f0-9]{64}$"
890
+ },
891
+ "dirty": {
892
+ "type": "boolean"
893
+ },
894
+ "baseSha": {
895
+ "type": "string",
896
+ "minLength": 1
897
+ },
898
+ "diffBaseSha": {
899
+ "type": "string",
900
+ "minLength": 1
901
+ }
902
+ },
903
+ "required": [
904
+ "testedCommitSha",
905
+ "sourceTreeHash",
906
+ "dirty"
907
+ ],
908
+ "additionalProperties": false
909
+ },
910
+ "commandHash": {
911
+ "type": "string",
912
+ "pattern": "^[a-f0-9]{64}$"
913
+ },
914
+ "configHashes": {
915
+ "type": "object",
916
+ "propertyNames": {
917
+ "type": "string",
918
+ "minLength": 1
919
+ },
920
+ "additionalProperties": {
921
+ "type": "string",
922
+ "pattern": "^[a-f0-9]{64}$"
923
+ }
924
+ },
925
+ "dependencyLockHash": {
926
+ "type": "string",
927
+ "pattern": "^[a-f0-9]{64}$"
928
+ },
929
+ "artifacts": {
930
+ "type": "array",
931
+ "items": {
932
+ "type": "object",
933
+ "properties": {
934
+ "ref": {
935
+ "type": "string",
936
+ "minLength": 1
937
+ },
938
+ "kind": {
939
+ "type": "string",
940
+ "minLength": 1
941
+ },
942
+ "scope": {
943
+ "type": "array",
944
+ "items": {
945
+ "type": "string",
946
+ "minLength": 1
947
+ }
948
+ }
949
+ },
950
+ "required": [
951
+ "ref",
952
+ "kind",
953
+ "scope"
954
+ ],
955
+ "additionalProperties": false
956
+ }
957
+ }
958
+ },
959
+ "required": [
960
+ "executionId",
961
+ "subject",
962
+ "commandHash",
963
+ "configHashes",
964
+ "artifacts"
965
+ ],
966
+ "additionalProperties": false
967
+ },
968
+ "authority": {
969
+ "oneOf": [
970
+ {
971
+ "type": "object",
972
+ "properties": {
973
+ "kind": {
974
+ "type": "string",
975
+ "const": "ci"
976
+ },
977
+ "producer": {
978
+ "type": "object",
979
+ "properties": {
980
+ "tool": {
981
+ "type": "string",
982
+ "minLength": 1
983
+ },
984
+ "version": {
985
+ "type": "string",
986
+ "minLength": 1
987
+ },
988
+ "collectorVersion": {
989
+ "type": "string",
990
+ "minLength": 1
991
+ }
992
+ },
993
+ "required": [
994
+ "tool",
995
+ "version",
996
+ "collectorVersion"
997
+ ],
998
+ "additionalProperties": false
999
+ },
1000
+ "ci": {
1001
+ "type": "object",
1002
+ "properties": {
1003
+ "repositoryId": {
1004
+ "type": "string",
1005
+ "minLength": 1
1006
+ },
1007
+ "workflowRef": {
1008
+ "type": "string",
1009
+ "minLength": 1
1010
+ },
1011
+ "runId": {
1012
+ "type": "string",
1013
+ "minLength": 1
1014
+ },
1015
+ "runAttempt": {
1016
+ "type": "integer",
1017
+ "minimum": 1,
1018
+ "maximum": 9007199254740991
1019
+ },
1020
+ "jobId": {
1021
+ "type": "string",
1022
+ "minLength": 1
1023
+ },
1024
+ "eventName": {
1025
+ "type": "string",
1026
+ "minLength": 1
1027
+ }
1028
+ },
1029
+ "required": [
1030
+ "repositoryId",
1031
+ "workflowRef",
1032
+ "runId",
1033
+ "runAttempt",
1034
+ "jobId",
1035
+ "eventName"
1036
+ ],
1037
+ "additionalProperties": false
1038
+ }
1039
+ },
1040
+ "required": [
1041
+ "kind",
1042
+ "producer",
1043
+ "ci"
1044
+ ],
1045
+ "additionalProperties": false
1046
+ },
1047
+ {
1048
+ "type": "object",
1049
+ "properties": {
1050
+ "kind": {
1051
+ "type": "string",
1052
+ "const": "local"
1053
+ },
1054
+ "producer": {
1055
+ "type": "object",
1056
+ "properties": {
1057
+ "tool": {
1058
+ "type": "string",
1059
+ "minLength": 1
1060
+ },
1061
+ "version": {
1062
+ "type": "string",
1063
+ "minLength": 1
1064
+ },
1065
+ "collectorVersion": {
1066
+ "type": "string",
1067
+ "minLength": 1
1068
+ }
1069
+ },
1070
+ "required": [
1071
+ "tool",
1072
+ "version",
1073
+ "collectorVersion"
1074
+ ],
1075
+ "additionalProperties": false
1076
+ },
1077
+ "executionId": {
1078
+ "type": "string",
1079
+ "minLength": 1
1080
+ },
1081
+ "commandHash": {
1082
+ "type": "string",
1083
+ "pattern": "^[a-f0-9]{64}$"
1084
+ }
1085
+ },
1086
+ "required": [
1087
+ "kind",
1088
+ "producer",
1089
+ "executionId",
1090
+ "commandHash"
1091
+ ],
1092
+ "additionalProperties": false
1093
+ }
1094
+ ]
1095
+ },
1096
+ "github": {
1097
+ "type": "object",
1098
+ "properties": {
1099
+ "repository": {
1100
+ "type": "string",
1101
+ "minLength": 1
1102
+ },
1103
+ "workflowPath": {
1104
+ "type": "string"
1105
+ },
1106
+ "workflowSha": {
1107
+ "type": "string"
1108
+ },
1109
+ "jobName": {
1110
+ "type": "string"
1111
+ },
1112
+ "artifactName": {
1113
+ "type": "string"
1114
+ },
1115
+ "archivePath": {
1116
+ "type": "string",
1117
+ "minLength": 1
1118
+ },
1119
+ "archiveEntries": {
1120
+ "type": "object",
1121
+ "propertyNames": {
1122
+ "type": "string",
1123
+ "minLength": 1
1124
+ },
1125
+ "additionalProperties": {
1126
+ "type": "string",
1127
+ "minLength": 1
1128
+ }
1129
+ }
1130
+ },
1131
+ "required": [
1132
+ "repository",
1133
+ "workflowPath",
1134
+ "workflowSha",
1135
+ "jobName",
1136
+ "artifactName",
1137
+ "archivePath",
1138
+ "archiveEntries"
1139
+ ],
1140
+ "additionalProperties": false
1141
+ }
1142
+ },
1143
+ "required": [
1144
+ "ref",
1145
+ "expected",
1146
+ "authority"
1147
+ ],
1148
+ "additionalProperties": false
1149
+ }
1150
+ },
1151
+ "github": {
1152
+ "type": "object",
1153
+ "properties": {
1154
+ "repository": {
1155
+ "type": "string",
1156
+ "pattern": "^[\\w-]+\\/[\\w.-]+$"
1157
+ },
1158
+ "pr": {
1159
+ "type": "integer",
1160
+ "exclusiveMinimum": 0,
1161
+ "maximum": 9007199254740991
1162
+ },
1163
+ "reviewers": {
1164
+ "minItems": 1,
1165
+ "type": "array",
1166
+ "items": {
1167
+ "type": "string",
1168
+ "minLength": 1
1169
+ }
1170
+ },
1171
+ "requiredChecks": {
1172
+ "minItems": 1,
1173
+ "type": "array",
1174
+ "items": {
1175
+ "type": "object",
1176
+ "properties": {
1177
+ "context": {
1178
+ "type": "string",
1179
+ "minLength": 1
1180
+ },
1181
+ "appId": {
1182
+ "type": "integer",
1183
+ "exclusiveMinimum": 0,
1184
+ "maximum": 9007199254740991
1185
+ }
1186
+ },
1187
+ "required": [
1188
+ "context",
1189
+ "appId"
1190
+ ],
1191
+ "additionalProperties": false
1192
+ }
1193
+ }
1194
+ },
1195
+ "required": [
1196
+ "repository",
1197
+ "pr",
1198
+ "reviewers",
1199
+ "requiredChecks"
1200
+ ],
1201
+ "additionalProperties": false
1202
+ },
1203
+ "notApplicable": {
1204
+ "default": [],
1205
+ "type": "array",
1206
+ "items": {
1207
+ "type": "object",
1208
+ "properties": {
1209
+ "ruleId": {
1210
+ "type": "string",
1211
+ "minLength": 1
1212
+ },
1213
+ "reason": {
1214
+ "type": "string",
1215
+ "minLength": 1
1216
+ },
1217
+ "evidenceRef": {
1218
+ "type": "string",
1219
+ "minLength": 1
1220
+ }
1221
+ },
1222
+ "required": [
1223
+ "ruleId",
1224
+ "reason",
1225
+ "evidenceRef"
1226
+ ],
1227
+ "additionalProperties": false
1228
+ }
1229
+ },
1230
+ "claimScopes": {
1231
+ "default": [],
1232
+ "type": "array",
1233
+ "items": {
1234
+ "type": "object",
1235
+ "properties": {
1236
+ "contractId": {
1237
+ "type": "string",
1238
+ "minLength": 1
1239
+ },
1240
+ "caseIds": {
1241
+ "minItems": 1,
1242
+ "type": "array",
1243
+ "items": {
1244
+ "type": "string",
1245
+ "minLength": 1
1246
+ }
1247
+ },
1248
+ "targetRef": {
1249
+ "type": "string",
1250
+ "minLength": 1
1251
+ },
1252
+ "method": {
1253
+ "type": "string",
1254
+ "minLength": 1
1255
+ }
1256
+ },
1257
+ "required": [
1258
+ "contractId",
1259
+ "caseIds",
1260
+ "targetRef",
1261
+ "method"
1262
+ ],
1263
+ "additionalProperties": false
1264
+ }
1265
+ },
1266
+ "pipeline": {
1267
+ "type": "object",
1268
+ "properties": {
1269
+ "workflow": {
1270
+ "type": "string",
1271
+ "minLength": 1
1272
+ },
1273
+ "gateJob": {
1274
+ "type": "string",
1275
+ "minLength": 1
1276
+ },
1277
+ "requiredJobs": {
1278
+ "minItems": 1,
1279
+ "type": "array",
1280
+ "items": {
1281
+ "type": "string",
1282
+ "minLength": 1
1283
+ }
1284
+ },
1285
+ "artifacts": {
1286
+ "minItems": 1,
1287
+ "type": "array",
1288
+ "items": {
1289
+ "type": "string",
1290
+ "minLength": 1
1291
+ }
1292
+ },
1293
+ "protectedBranch": {
1294
+ "type": "string",
1295
+ "minLength": 1
1296
+ },
1297
+ "currentRun": {
1298
+ "type": "object",
1299
+ "properties": {
1300
+ "ci": {
1301
+ "type": "object",
1302
+ "properties": {
1303
+ "repositoryId": {
1304
+ "type": "string",
1305
+ "minLength": 1
1306
+ },
1307
+ "workflowRef": {
1308
+ "type": "string",
1309
+ "minLength": 1
1310
+ },
1311
+ "runId": {
1312
+ "type": "string",
1313
+ "minLength": 1
1314
+ },
1315
+ "runAttempt": {
1316
+ "type": "integer",
1317
+ "minimum": 1,
1318
+ "maximum": 9007199254740991
1319
+ },
1320
+ "jobId": {
1321
+ "type": "string",
1322
+ "minLength": 1
1323
+ },
1324
+ "eventName": {
1325
+ "type": "string",
1326
+ "minLength": 1
1327
+ }
1328
+ },
1329
+ "required": [
1330
+ "repositoryId",
1331
+ "workflowRef",
1332
+ "runId",
1333
+ "runAttempt",
1334
+ "jobId",
1335
+ "eventName"
1336
+ ],
1337
+ "additionalProperties": false
1338
+ },
1339
+ "workflowPath": {
1340
+ "type": "string",
1341
+ "minLength": 1
1342
+ },
1343
+ "workflowSha": {
1344
+ "type": "string",
1345
+ "pattern": "^[a-f0-9]{40}$"
1346
+ },
1347
+ "workflowHash": {
1348
+ "type": "string",
1349
+ "pattern": "^[a-f0-9]{64}$"
1350
+ }
1351
+ },
1352
+ "required": [
1353
+ "ci",
1354
+ "workflowPath",
1355
+ "workflowSha",
1356
+ "workflowHash"
1357
+ ],
1358
+ "additionalProperties": false
1359
+ }
1360
+ },
1361
+ "required": [
1362
+ "workflow",
1363
+ "gateJob",
1364
+ "requiredJobs",
1365
+ "artifacts",
1366
+ "protectedBranch"
1367
+ ],
1368
+ "additionalProperties": false
1369
+ }
1370
+ },
1371
+ "required": [
1372
+ "schemaVersion",
1373
+ "policy",
1374
+ "config",
1375
+ "baseline",
1376
+ "inputs",
1377
+ "configPaths",
1378
+ "manifests"
1379
+ ],
1380
+ "additionalProperties": false,
1381
+ "$defs": {
1382
+ "__schema0": {
1383
+ "anyOf": [
1384
+ {
1385
+ "type": "string"
1386
+ },
1387
+ {
1388
+ "type": "number"
1389
+ },
1390
+ {
1391
+ "type": "boolean"
1392
+ },
1393
+ {
1394
+ "type": "null"
1395
+ },
1396
+ {
1397
+ "type": "array",
1398
+ "items": {
1399
+ "$ref": "#/$defs/__schema0"
1400
+ }
1401
+ },
1402
+ {
1403
+ "type": "object",
1404
+ "propertyNames": {
1405
+ "type": "string"
1406
+ },
1407
+ "additionalProperties": {
1408
+ "$ref": "#/$defs/__schema0"
1409
+ }
1410
+ }
1411
+ ]
1412
+ },
1413
+ "__schema1": {
1414
+ "anyOf": [
1415
+ {
1416
+ "type": "string"
1417
+ },
1418
+ {
1419
+ "type": "number"
1420
+ },
1421
+ {
1422
+ "type": "boolean"
1423
+ },
1424
+ {
1425
+ "type": "null"
1426
+ },
1427
+ {
1428
+ "type": "array",
1429
+ "items": {
1430
+ "$ref": "#/$defs/__schema1"
1431
+ }
1432
+ },
1433
+ {
1434
+ "type": "object",
1435
+ "propertyNames": {
1436
+ "type": "string"
1437
+ },
1438
+ "additionalProperties": {
1439
+ "$ref": "#/$defs/__schema1"
1440
+ }
1441
+ }
1442
+ ]
1443
+ }
1444
+ }
1445
+ }