caveat-cli 0.20.3 → 0.21.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.
@@ -0,0 +1,740 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:caveat:factory-private-evidence:v1",
4
+ "title": "Draft: Caveat official private evidence NDJSON frame v1",
5
+ "oneOf": [
6
+ {
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": [
10
+ "schema",
11
+ "collection_id",
12
+ "nonce",
13
+ "execution_id",
14
+ "type",
15
+ "product",
16
+ "product_version",
17
+ "public_diagnostic_schema",
18
+ "transport",
19
+ "process"
20
+ ],
21
+ "properties": {
22
+ "schema": {
23
+ "const": "caveat.factory_private_evidence.v1"
24
+ },
25
+ "collection_id": {
26
+ "type": "string",
27
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
28
+ },
29
+ "nonce": {
30
+ "type": "string",
31
+ "pattern": "^[0-9a-f]{64}$"
32
+ },
33
+ "execution_id": {
34
+ "type": "string",
35
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
36
+ },
37
+ "type": {
38
+ "const": "hello"
39
+ },
40
+ "product": {
41
+ "const": "caveat"
42
+ },
43
+ "product_version": {
44
+ "type": "string",
45
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$",
46
+ "maxLength": 128
47
+ },
48
+ "public_diagnostic_schema": {
49
+ "const": "caveat.native_factory_diagnostics.v1"
50
+ },
51
+ "transport": {
52
+ "enum": [
53
+ "posix-fd-v1",
54
+ "windows-named-pipe-v1"
55
+ ]
56
+ },
57
+ "process": {
58
+ "type": "object",
59
+ "additionalProperties": false,
60
+ "required": [
61
+ "pid",
62
+ "parent_pid",
63
+ "start_identity",
64
+ "identity",
65
+ "exec_path",
66
+ "entry_realpath",
67
+ "package_version",
68
+ "build_id",
69
+ "missing_reasons"
70
+ ],
71
+ "properties": {
72
+ "pid": {
73
+ "type": "integer",
74
+ "minimum": 1,
75
+ "maximum": 9007199254740991
76
+ },
77
+ "parent_pid": {
78
+ "anyOf": [
79
+ {
80
+ "type": "integer",
81
+ "minimum": 0,
82
+ "maximum": 9007199254740991
83
+ },
84
+ {
85
+ "type": "null"
86
+ }
87
+ ]
88
+ },
89
+ "start_identity": {
90
+ "type": "object",
91
+ "additionalProperties": false,
92
+ "required": [
93
+ "source",
94
+ "value"
95
+ ],
96
+ "properties": {
97
+ "source": {
98
+ "enum": [
99
+ "linux_proc_start",
100
+ "windows_process_creation",
101
+ "os_process_start",
102
+ "unavailable"
103
+ ]
104
+ },
105
+ "value": {
106
+ "anyOf": [
107
+ {
108
+ "type": "string",
109
+ "minLength": 1,
110
+ "maxLength": 256
111
+ },
112
+ {
113
+ "type": "null"
114
+ }
115
+ ]
116
+ }
117
+ },
118
+ "allOf": [
119
+ {
120
+ "if": {
121
+ "properties": {
122
+ "source": {
123
+ "const": "unavailable"
124
+ }
125
+ }
126
+ },
127
+ "then": {
128
+ "properties": {
129
+ "value": {
130
+ "type": "null"
131
+ }
132
+ }
133
+ },
134
+ "else": {
135
+ "properties": {
136
+ "value": {
137
+ "type": "string"
138
+ }
139
+ }
140
+ }
141
+ }
142
+ ]
143
+ },
144
+ "identity": {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": [
148
+ "kind",
149
+ "uid",
150
+ "gid",
151
+ "sid"
152
+ ],
153
+ "properties": {
154
+ "kind": {
155
+ "enum": [
156
+ "uid_gid",
157
+ "windows_sid",
158
+ "unknown"
159
+ ]
160
+ },
161
+ "uid": {
162
+ "anyOf": [
163
+ {
164
+ "type": "integer",
165
+ "minimum": 0,
166
+ "maximum": 9007199254740991
167
+ },
168
+ {
169
+ "type": "null"
170
+ }
171
+ ]
172
+ },
173
+ "gid": {
174
+ "anyOf": [
175
+ {
176
+ "type": "integer",
177
+ "minimum": 0,
178
+ "maximum": 9007199254740991
179
+ },
180
+ {
181
+ "type": "null"
182
+ }
183
+ ]
184
+ },
185
+ "sid": {
186
+ "anyOf": [
187
+ {
188
+ "type": "string",
189
+ "pattern": "^S-1-[0-9]+(?:-[0-9]+)+$",
190
+ "maxLength": 256
191
+ },
192
+ {
193
+ "type": "null"
194
+ }
195
+ ]
196
+ }
197
+ },
198
+ "allOf": [
199
+ {
200
+ "if": {
201
+ "properties": {
202
+ "kind": {
203
+ "const": "uid_gid"
204
+ }
205
+ }
206
+ },
207
+ "then": {
208
+ "properties": {
209
+ "uid": {
210
+ "type": "integer"
211
+ },
212
+ "gid": {
213
+ "type": "integer"
214
+ },
215
+ "sid": {
216
+ "type": "null"
217
+ }
218
+ }
219
+ }
220
+ },
221
+ {
222
+ "if": {
223
+ "properties": {
224
+ "kind": {
225
+ "const": "windows_sid"
226
+ }
227
+ }
228
+ },
229
+ "then": {
230
+ "properties": {
231
+ "uid": {
232
+ "type": "null"
233
+ },
234
+ "gid": {
235
+ "type": "null"
236
+ },
237
+ "sid": {
238
+ "type": "string"
239
+ }
240
+ }
241
+ }
242
+ },
243
+ {
244
+ "if": {
245
+ "properties": {
246
+ "kind": {
247
+ "const": "unknown"
248
+ }
249
+ }
250
+ },
251
+ "then": {
252
+ "properties": {
253
+ "uid": {
254
+ "type": "null"
255
+ },
256
+ "gid": {
257
+ "type": "null"
258
+ },
259
+ "sid": {
260
+ "type": "null"
261
+ }
262
+ }
263
+ }
264
+ }
265
+ ]
266
+ },
267
+ "exec_path": {
268
+ "anyOf": [
269
+ {
270
+ "type": "string",
271
+ "minLength": 1,
272
+ "maxLength": 4096
273
+ },
274
+ {
275
+ "type": "null"
276
+ }
277
+ ]
278
+ },
279
+ "entry_realpath": {
280
+ "anyOf": [
281
+ {
282
+ "type": "string",
283
+ "minLength": 1,
284
+ "maxLength": 4096
285
+ },
286
+ {
287
+ "type": "null"
288
+ }
289
+ ]
290
+ },
291
+ "package_version": {
292
+ "type": "string",
293
+ "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*)?(?:\\+[0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*)?$",
294
+ "maxLength": 128
295
+ },
296
+ "build_id": {
297
+ "anyOf": [
298
+ {
299
+ "type": "string",
300
+ "minLength": 1,
301
+ "maxLength": 256
302
+ },
303
+ {
304
+ "type": "null"
305
+ }
306
+ ]
307
+ },
308
+ "missing_reasons": {
309
+ "type": "array",
310
+ "uniqueItems": true,
311
+ "items": {
312
+ "enum": [
313
+ "parent_identity_unavailable",
314
+ "start_identity_unavailable",
315
+ "actor_identity_unavailable",
316
+ "exec_path_unavailable",
317
+ "entry_path_unavailable",
318
+ "build_id_unavailable"
319
+ ]
320
+ }
321
+ }
322
+ }
323
+ }
324
+ }
325
+ },
326
+ {
327
+ "type": "object",
328
+ "additionalProperties": false,
329
+ "required": [
330
+ "schema",
331
+ "collection_id",
332
+ "nonce",
333
+ "execution_id",
334
+ "type",
335
+ "public_output",
336
+ "public_result",
337
+ "sync_observation",
338
+ "operation_receipt"
339
+ ],
340
+ "properties": {
341
+ "schema": {
342
+ "const": "caveat.factory_private_evidence.v1"
343
+ },
344
+ "collection_id": {
345
+ "type": "string",
346
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
347
+ },
348
+ "nonce": {
349
+ "type": "string",
350
+ "pattern": "^[0-9a-f]{64}$"
351
+ },
352
+ "execution_id": {
353
+ "type": "string",
354
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
355
+ },
356
+ "type": {
357
+ "const": "diagnostic_result"
358
+ },
359
+ "public_output": {
360
+ "type": "object",
361
+ "additionalProperties": false,
362
+ "required": [
363
+ "bytes",
364
+ "sha256"
365
+ ],
366
+ "properties": {
367
+ "bytes": {
368
+ "type": "integer",
369
+ "minimum": 0,
370
+ "maximum": 9007199254740991
371
+ },
372
+ "sha256": {
373
+ "type": "string",
374
+ "pattern": "^[0-9a-f]{64}$"
375
+ }
376
+ }
377
+ },
378
+ "public_result": {
379
+ "type": "object",
380
+ "additionalProperties": false,
381
+ "required": [
382
+ "schema",
383
+ "overall_status",
384
+ "planned_exit_code"
385
+ ],
386
+ "properties": {
387
+ "schema": {
388
+ "const": "caveat.native_factory_diagnostics.v1"
389
+ },
390
+ "overall_status": {
391
+ "enum": [
392
+ "ready",
393
+ "not_ready",
394
+ "unverified"
395
+ ]
396
+ },
397
+ "planned_exit_code": {
398
+ "enum": [
399
+ 0,
400
+ 1
401
+ ]
402
+ }
403
+ },
404
+ "allOf": [
405
+ {
406
+ "if": {
407
+ "properties": {
408
+ "overall_status": {
409
+ "const": "ready"
410
+ }
411
+ }
412
+ },
413
+ "then": {
414
+ "properties": {
415
+ "planned_exit_code": {
416
+ "const": 0
417
+ }
418
+ }
419
+ },
420
+ "else": {
421
+ "properties": {
422
+ "planned_exit_code": {
423
+ "const": 1
424
+ }
425
+ }
426
+ }
427
+ }
428
+ ]
429
+ },
430
+ "sync_observation": {
431
+ "type": "object",
432
+ "additionalProperties": false,
433
+ "required": [
434
+ "status",
435
+ "reason_code",
436
+ "repo_identity",
437
+ "local_head",
438
+ "remote_head",
439
+ "comparison",
440
+ "relation_counts"
441
+ ],
442
+ "properties": {
443
+ "status": {
444
+ "enum": [
445
+ "ready",
446
+ "not_ready",
447
+ "unverified"
448
+ ]
449
+ },
450
+ "reason_code": {
451
+ "type": "string",
452
+ "pattern": "^[a-z][a-z0-9_]{0,63}$"
453
+ },
454
+ "repo_identity": {
455
+ "type": "object",
456
+ "additionalProperties": false,
457
+ "required": [
458
+ "status",
459
+ "algorithm",
460
+ "digest",
461
+ "reason"
462
+ ],
463
+ "properties": {
464
+ "status": {
465
+ "enum": [
466
+ "available",
467
+ "not_observed",
468
+ "unverified"
469
+ ]
470
+ },
471
+ "algorithm": {
472
+ "anyOf": [
473
+ {
474
+ "const": "origin-descriptor-sha256-v1"
475
+ },
476
+ {
477
+ "type": "null"
478
+ }
479
+ ]
480
+ },
481
+ "digest": {
482
+ "anyOf": [
483
+ {
484
+ "type": "string",
485
+ "pattern": "^[0-9a-f]{64}$"
486
+ },
487
+ {
488
+ "type": "null"
489
+ }
490
+ ]
491
+ },
492
+ "reason": {
493
+ "enum": [
494
+ "origin_descriptor_observed",
495
+ "origin_not_reached",
496
+ "origin_capture_unverified",
497
+ "origin_syntax_unsupported",
498
+ "origin_semantics_ambiguous"
499
+ ]
500
+ }
501
+ },
502
+ "allOf": [
503
+ {
504
+ "if": {
505
+ "properties": {
506
+ "status": {
507
+ "const": "available"
508
+ }
509
+ }
510
+ },
511
+ "then": {
512
+ "properties": {
513
+ "algorithm": {
514
+ "const": "origin-descriptor-sha256-v1"
515
+ },
516
+ "digest": {
517
+ "type": "string",
518
+ "pattern": "^[0-9a-f]{64}$"
519
+ },
520
+ "reason": {
521
+ "const": "origin_descriptor_observed"
522
+ }
523
+ }
524
+ },
525
+ "else": {
526
+ "properties": {
527
+ "algorithm": {
528
+ "type": "null"
529
+ },
530
+ "digest": {
531
+ "type": "null"
532
+ }
533
+ }
534
+ }
535
+ },
536
+ {
537
+ "if": {
538
+ "properties": {
539
+ "status": {
540
+ "const": "not_observed"
541
+ }
542
+ }
543
+ },
544
+ "then": {
545
+ "properties": {
546
+ "reason": {
547
+ "const": "origin_not_reached"
548
+ }
549
+ }
550
+ }
551
+ },
552
+ {
553
+ "if": {
554
+ "properties": {
555
+ "status": {
556
+ "const": "unverified"
557
+ }
558
+ }
559
+ },
560
+ "then": {
561
+ "properties": {
562
+ "reason": {
563
+ "enum": [
564
+ "origin_capture_unverified",
565
+ "origin_syntax_unsupported",
566
+ "origin_semantics_ambiguous"
567
+ ]
568
+ }
569
+ }
570
+ }
571
+ }
572
+ ]
573
+ },
574
+ "local_head": {
575
+ "type": "object",
576
+ "additionalProperties": false,
577
+ "required": [
578
+ "status",
579
+ "value",
580
+ "reason"
581
+ ],
582
+ "properties": {
583
+ "status": {
584
+ "enum": [
585
+ "observed",
586
+ "not_observed",
587
+ "unverified"
588
+ ]
589
+ },
590
+ "value": {
591
+ "anyOf": [
592
+ {
593
+ "type": "string",
594
+ "pattern": "^[0-9a-f]{40}$"
595
+ },
596
+ {
597
+ "type": "null"
598
+ }
599
+ ]
600
+ },
601
+ "reason": {
602
+ "type": "string",
603
+ "pattern": "^[a-z][a-z0-9_]{0,63}$"
604
+ }
605
+ },
606
+ "allOf": [
607
+ {
608
+ "if": {
609
+ "properties": {
610
+ "status": {
611
+ "const": "observed"
612
+ }
613
+ }
614
+ },
615
+ "then": {
616
+ "properties": {
617
+ "value": {
618
+ "type": "string",
619
+ "pattern": "^[0-9a-f]{40}$"
620
+ }
621
+ }
622
+ },
623
+ "else": {
624
+ "properties": {
625
+ "value": {
626
+ "type": "null"
627
+ }
628
+ }
629
+ }
630
+ }
631
+ ]
632
+ },
633
+ "remote_head": {
634
+ "type": "object",
635
+ "additionalProperties": false,
636
+ "required": [
637
+ "status",
638
+ "value",
639
+ "reason"
640
+ ],
641
+ "properties": {
642
+ "status": {
643
+ "enum": [
644
+ "observed",
645
+ "not_observed",
646
+ "unverified"
647
+ ]
648
+ },
649
+ "value": {
650
+ "anyOf": [
651
+ {
652
+ "type": "string",
653
+ "pattern": "^[0-9a-f]{40}$"
654
+ },
655
+ {
656
+ "type": "null"
657
+ }
658
+ ]
659
+ },
660
+ "reason": {
661
+ "type": "string",
662
+ "pattern": "^[a-z][a-z0-9_]{0,63}$"
663
+ }
664
+ },
665
+ "allOf": [
666
+ {
667
+ "if": {
668
+ "properties": {
669
+ "status": {
670
+ "const": "observed"
671
+ }
672
+ }
673
+ },
674
+ "then": {
675
+ "properties": {
676
+ "value": {
677
+ "type": "string",
678
+ "pattern": "^[0-9a-f]{40}$"
679
+ }
680
+ }
681
+ },
682
+ "else": {
683
+ "properties": {
684
+ "value": {
685
+ "type": "null"
686
+ }
687
+ }
688
+ }
689
+ }
690
+ ]
691
+ },
692
+ "comparison": {
693
+ "enum": [
694
+ "equal",
695
+ "different",
696
+ "not_evaluated"
697
+ ]
698
+ },
699
+ "relation_counts": {
700
+ "type": "object",
701
+ "additionalProperties": false,
702
+ "required": [
703
+ "status",
704
+ "behind",
705
+ "ahead"
706
+ ],
707
+ "properties": {
708
+ "status": {
709
+ "const": "not_supported"
710
+ },
711
+ "behind": {
712
+ "type": "null"
713
+ },
714
+ "ahead": {
715
+ "type": "null"
716
+ }
717
+ }
718
+ }
719
+ }
720
+ },
721
+ "operation_receipt": {
722
+ "type": "object",
723
+ "additionalProperties": false,
724
+ "required": [
725
+ "status",
726
+ "receipt"
727
+ ],
728
+ "properties": {
729
+ "status": {
730
+ "const": "not_supported"
731
+ },
732
+ "receipt": {
733
+ "type": "null"
734
+ }
735
+ }
736
+ }
737
+ }
738
+ }
739
+ ]
740
+ }