@reviewsensei/cli-linux-x64-gnu 0.8.18 → 0.8.22

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.
@@ -38,7 +38,10 @@
38
38
  ],
39
39
  "properties": {
40
40
  "schema_version": {
41
- "enum": ["1.0", "2.0"]
41
+ "enum": [
42
+ "1.0",
43
+ "2.0"
44
+ ]
42
45
  },
43
46
  "result_digest": {
44
47
  "type": "string",
@@ -770,135 +773,1029 @@
770
773
  "$ref": "https://reviewsensei.dev/schemas/v1/quarantine-lineage.schema.json"
771
774
  },
772
775
  "publication_staging": {
773
- "description": "Closed bounded frontier for a multipart native publication. Unknown attempts are retained.",
776
+ "oneOf": [
777
+ {
778
+ "description": "Closed bounded frontier for a multipart native publication. Unknown attempts are retained.",
779
+ "type": "object",
780
+ "additionalProperties": false,
781
+ "required": [
782
+ "schema_version",
783
+ "transaction_id",
784
+ "result_sha256",
785
+ "plan_sha256",
786
+ "part_count",
787
+ "attempted_parts",
788
+ "attempt_tokens",
789
+ "receipts",
790
+ "final_attempted",
791
+ "final_token",
792
+ "final_receipt",
793
+ "manifest_required",
794
+ "manifest_attempted",
795
+ "manifest_token",
796
+ "manifest_receipt"
797
+ ],
798
+ "properties": {
799
+ "schema_version": {
800
+ "const": "publication-staging-v2"
801
+ },
802
+ "transaction_id": {
803
+ "type": "string",
804
+ "pattern": "^[a-f0-9]{64}$"
805
+ },
806
+ "result_sha256": {
807
+ "type": "string",
808
+ "pattern": "^[a-f0-9]{64}$"
809
+ },
810
+ "plan_sha256": {
811
+ "type": "string",
812
+ "pattern": "^[a-f0-9]{64}$"
813
+ },
814
+ "part_count": {
815
+ "type": "integer",
816
+ "minimum": 0,
817
+ "maximum": 8
818
+ },
819
+ "attempted_parts": {
820
+ "type": "integer",
821
+ "minimum": 0,
822
+ "maximum": 8
823
+ },
824
+ "attempt_tokens": {
825
+ "type": "array",
826
+ "maxItems": 8,
827
+ "uniqueItems": true,
828
+ "items": {
829
+ "type": "string",
830
+ "pattern": "^[a-f0-9]{32}$"
831
+ }
832
+ },
833
+ "receipts": {
834
+ "type": "array",
835
+ "maxItems": 8,
836
+ "items": {
837
+ "type": "object",
838
+ "additionalProperties": false,
839
+ "required": [
840
+ "native_id",
841
+ "content_sha256"
842
+ ],
843
+ "properties": {
844
+ "native_id": {
845
+ "type": "string",
846
+ "pattern": "^[A-Za-z0-9_:.=-]{1,64}$"
847
+ },
848
+ "content_sha256": {
849
+ "type": "string",
850
+ "pattern": "^[a-f0-9]{64}$"
851
+ }
852
+ }
853
+ }
854
+ },
855
+ "final_attempted": {
856
+ "type": "boolean"
857
+ },
858
+ "final_token": {
859
+ "anyOf": [
860
+ {
861
+ "type": "string",
862
+ "pattern": "^[a-f0-9]{32}$"
863
+ },
864
+ {
865
+ "type": "null"
866
+ }
867
+ ]
868
+ },
869
+ "manifest_required": {
870
+ "type": "boolean"
871
+ },
872
+ "manifest_attempted": {
873
+ "type": "boolean"
874
+ },
875
+ "manifest_token": {
876
+ "anyOf": [
877
+ {
878
+ "type": "string",
879
+ "pattern": "^[a-f0-9]{32}$"
880
+ },
881
+ {
882
+ "type": "null"
883
+ }
884
+ ]
885
+ },
886
+ "manifest_receipt": {
887
+ "anyOf": [
888
+ {
889
+ "type": "object",
890
+ "additionalProperties": false,
891
+ "required": [
892
+ "native_id",
893
+ "content_sha256"
894
+ ],
895
+ "properties": {
896
+ "native_id": {
897
+ "type": "string",
898
+ "pattern": "^[A-Za-z0-9_:.=-]{1,64}$"
899
+ },
900
+ "content_sha256": {
901
+ "type": "string",
902
+ "pattern": "^[a-f0-9]{64}$"
903
+ }
904
+ }
905
+ },
906
+ {
907
+ "type": "null"
908
+ }
909
+ ]
910
+ },
911
+ "final_receipt": {
912
+ "anyOf": [
913
+ {
914
+ "type": "object",
915
+ "additionalProperties": false,
916
+ "required": [
917
+ "native_id",
918
+ "content_sha256"
919
+ ],
920
+ "properties": {
921
+ "native_id": {
922
+ "type": "string",
923
+ "pattern": "^[A-Za-z0-9_:.=-]{1,64}$"
924
+ },
925
+ "content_sha256": {
926
+ "type": "string",
927
+ "pattern": "^[a-f0-9]{64}$"
928
+ }
929
+ }
930
+ },
931
+ {
932
+ "type": "null"
933
+ }
934
+ ]
935
+ }
936
+ }
937
+ },
938
+ {
939
+ "description": "Finite grouped declarations are preservation data, never native replay authority. Runtime validation additionally enforces exact scope, ordering and signed-63 native identities.",
940
+ "type": "object",
941
+ "additionalProperties": false,
942
+ "required": [
943
+ "schema_version",
944
+ "transaction_id",
945
+ "result_sha256",
946
+ "plan_sha256",
947
+ "part_count",
948
+ "declarations",
949
+ "phase",
950
+ "part_receipt",
951
+ "manifest_receipt",
952
+ "final_request_sha256",
953
+ "final_receipt"
954
+ ],
955
+ "properties": {
956
+ "schema_version": {
957
+ "const": "publication-staging-v3"
958
+ },
959
+ "transaction_id": {
960
+ "type": "string",
961
+ "pattern": "^[a-f0-9]{64}$"
962
+ },
963
+ "result_sha256": {
964
+ "type": "string",
965
+ "pattern": "^[a-f0-9]{64}$"
966
+ },
967
+ "plan_sha256": {
968
+ "type": "string",
969
+ "pattern": "^[a-f0-9]{64}$"
970
+ },
971
+ "part_count": {
972
+ "const": 1
973
+ },
974
+ "declarations": {
975
+ "type": "array",
976
+ "minItems": 3,
977
+ "maxItems": 3,
978
+ "prefixItems": [
979
+ {
980
+ "type": "object",
981
+ "additionalProperties": false,
982
+ "required": [
983
+ "role",
984
+ "token"
985
+ ],
986
+ "properties": {
987
+ "role": {
988
+ "const": "part"
989
+ },
990
+ "token": {
991
+ "type": "string",
992
+ "pattern": "^[a-f0-9]{32}$"
993
+ }
994
+ }
995
+ },
996
+ {
997
+ "type": "object",
998
+ "additionalProperties": false,
999
+ "required": [
1000
+ "role",
1001
+ "token"
1002
+ ],
1003
+ "properties": {
1004
+ "role": {
1005
+ "const": "manifest"
1006
+ },
1007
+ "token": {
1008
+ "type": "string",
1009
+ "pattern": "^[a-f0-9]{32}$"
1010
+ }
1011
+ }
1012
+ },
1013
+ {
1014
+ "type": "object",
1015
+ "additionalProperties": false,
1016
+ "required": [
1017
+ "role",
1018
+ "token"
1019
+ ],
1020
+ "properties": {
1021
+ "role": {
1022
+ "const": "final"
1023
+ },
1024
+ "token": {
1025
+ "type": "string",
1026
+ "pattern": "^[a-f0-9]{32}$"
1027
+ }
1028
+ }
1029
+ }
1030
+ ]
1031
+ },
1032
+ "phase": {
1033
+ "enum": [
1034
+ "declared",
1035
+ "final-intent",
1036
+ "finished",
1037
+ "held"
1038
+ ]
1039
+ },
1040
+ "part_receipt": {
1041
+ "anyOf": [
1042
+ {
1043
+ "type": "null"
1044
+ },
1045
+ {
1046
+ "type": "object",
1047
+ "additionalProperties": false,
1048
+ "required": [
1049
+ "native_id",
1050
+ "content_sha256"
1051
+ ],
1052
+ "properties": {
1053
+ "native_id": {
1054
+ "type": "string",
1055
+ "pattern": "^[1-9][0-9]{0,18}$"
1056
+ },
1057
+ "content_sha256": {
1058
+ "type": "string",
1059
+ "pattern": "^[a-f0-9]{64}$"
1060
+ }
1061
+ }
1062
+ }
1063
+ ]
1064
+ },
1065
+ "manifest_receipt": {
1066
+ "anyOf": [
1067
+ {
1068
+ "type": "null"
1069
+ },
1070
+ {
1071
+ "type": "object",
1072
+ "additionalProperties": false,
1073
+ "required": [
1074
+ "native_id",
1075
+ "content_sha256"
1076
+ ],
1077
+ "properties": {
1078
+ "native_id": {
1079
+ "type": "string",
1080
+ "pattern": "^issue:[1-9][0-9]{0,18}$"
1081
+ },
1082
+ "content_sha256": {
1083
+ "type": "string",
1084
+ "pattern": "^[a-f0-9]{64}$"
1085
+ }
1086
+ }
1087
+ }
1088
+ ]
1089
+ },
1090
+ "final_request_sha256": {
1091
+ "anyOf": [
1092
+ {
1093
+ "type": "string",
1094
+ "pattern": "^[a-f0-9]{64}$"
1095
+ },
1096
+ {
1097
+ "type": "null"
1098
+ }
1099
+ ]
1100
+ },
1101
+ "final_receipt": {
1102
+ "anyOf": [
1103
+ {
1104
+ "type": "null"
1105
+ },
1106
+ {
1107
+ "type": "object",
1108
+ "additionalProperties": false,
1109
+ "required": [
1110
+ "native_id",
1111
+ "content_sha256"
1112
+ ],
1113
+ "properties": {
1114
+ "native_id": {
1115
+ "type": "string",
1116
+ "pattern": "^[1-9][0-9]{0,18}$"
1117
+ },
1118
+ "content_sha256": {
1119
+ "type": "string",
1120
+ "pattern": "^[a-f0-9]{64}$"
1121
+ }
1122
+ }
1123
+ }
1124
+ ]
1125
+ }
1126
+ }
1127
+ }
1128
+ ]
1129
+ },
1130
+ "finding_lifecycle": {
774
1131
  "type": "object",
775
1132
  "additionalProperties": false,
776
1133
  "required": [
777
1134
  "schema_version",
778
- "transaction_id",
779
- "result_sha256",
780
- "plan_sha256",
781
- "part_count",
782
- "attempted_parts",
783
- "attempt_tokens",
784
- "receipts",
785
- "final_attempted",
786
- "final_token",
787
- "final_receipt",
788
- "manifest_required",
789
- "manifest_attempted",
790
- "manifest_token",
791
- "manifest_receipt"
1135
+ "operation_id",
1136
+ "previous_root_sha256",
1137
+ "previous_snapshot_sha256",
1138
+ "manifest"
792
1139
  ],
793
1140
  "properties": {
794
1141
  "schema_version": {
795
- "const": "publication-staging-v2"
796
- },
797
- "transaction_id": {
798
- "type": "string",
799
- "pattern": "^[a-f0-9]{64}$"
1142
+ "enum": [
1143
+ "finding-lifecycle-reference-v1",
1144
+ "finding-lifecycle-reference-v2"
1145
+ ]
800
1146
  },
801
- "result_sha256": {
1147
+ "operation_id": {
802
1148
  "type": "string",
803
1149
  "pattern": "^[a-f0-9]{64}$"
804
1150
  },
805
- "plan_sha256": {
1151
+ "previous_root_sha256": {
806
1152
  "type": "string",
807
1153
  "pattern": "^[a-f0-9]{64}$"
808
1154
  },
809
- "part_count": {
810
- "type": "integer",
811
- "minimum": 0,
812
- "maximum": 8
813
- },
814
- "attempted_parts": {
815
- "type": "integer",
816
- "minimum": 0,
817
- "maximum": 8
818
- },
819
- "attempt_tokens": {
820
- "type": "array",
821
- "maxItems": 8,
822
- "uniqueItems": true,
823
- "items": {"type": "string", "pattern": "^[a-f0-9]{32}$"}
824
- },
825
- "receipts": {
826
- "type": "array",
827
- "maxItems": 8,
828
- "items": {
829
- "type": "object",
830
- "additionalProperties": false,
831
- "required": [
832
- "native_id",
833
- "content_sha256"
834
- ],
835
- "properties": {
836
- "native_id": {
837
- "type": "string",
838
- "pattern": "^[A-Za-z0-9_:.=-]{1,64}$"
839
- },
840
- "content_sha256": {
841
- "type": "string",
842
- "pattern": "^[a-f0-9]{64}$"
843
- }
844
- }
845
- }
846
- },
847
- "final_attempted": {
848
- "type": "boolean"
849
- },
850
- "final_token": {
851
- "anyOf": [
852
- {"type": "string", "pattern": "^[a-f0-9]{32}$"},
853
- {"type": "null"}
854
- ]
855
- },
856
- "manifest_required": {"type": "boolean"},
857
- "manifest_attempted": {"type": "boolean"},
858
- "manifest_token": {
1155
+ "previous_snapshot_sha256": {
859
1156
  "anyOf": [
860
- {"type": "string", "pattern": "^[a-f0-9]{32}$"},
861
- {"type": "null"}
1157
+ {
1158
+ "type": "string",
1159
+ "pattern": "^[a-f0-9]{64}$"
1160
+ },
1161
+ {
1162
+ "type": "null"
1163
+ }
862
1164
  ]
863
1165
  },
864
- "manifest_receipt": {
1166
+ "manifest": {
865
1167
  "anyOf": [
866
1168
  {
867
- "type": "object", "additionalProperties": false,
868
- "required": ["native_id", "content_sha256"],
1169
+ "$ref": "https://reviewsensei.dev/schemas/v1/evidence-manifest.schema.json"
1170
+ },
1171
+ {
1172
+ "type": "object",
1173
+ "additionalProperties": false,
1174
+ "required": [
1175
+ "encoding",
1176
+ "binding",
1177
+ "item_count",
1178
+ "sha256",
1179
+ "document"
1180
+ ],
869
1181
  "properties": {
870
- "native_id": {"type": "string", "pattern": "^[A-Za-z0-9_:.=-]{1,64}$"},
871
- "content_sha256": {"type": "string", "pattern": "^[a-f0-9]{64}$"}
1182
+ "encoding": {
1183
+ "const": "inline-json-v1"
1184
+ },
1185
+ "binding": {
1186
+ "type": "object",
1187
+ "additionalProperties": false,
1188
+ "required": [
1189
+ "repository",
1190
+ "repository_id",
1191
+ "pull_request",
1192
+ "base_sha",
1193
+ "head_sha",
1194
+ "policy_digest",
1195
+ "configuration_digest",
1196
+ "generation",
1197
+ "producer",
1198
+ "purpose",
1199
+ "schema_version"
1200
+ ],
1201
+ "properties": {
1202
+ "repository": {
1203
+ "type": "string",
1204
+ "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$",
1205
+ "maxLength": 256
1206
+ },
1207
+ "repository_id": {
1208
+ "type": [
1209
+ "integer",
1210
+ "null"
1211
+ ],
1212
+ "minimum": 1,
1213
+ "maximum": 2147483647
1214
+ },
1215
+ "pull_request": {
1216
+ "type": "integer",
1217
+ "minimum": 1,
1218
+ "maximum": 2147483647
1219
+ },
1220
+ "base_sha": {
1221
+ "type": "string",
1222
+ "pattern": "^[a-f0-9]{40}$"
1223
+ },
1224
+ "head_sha": {
1225
+ "type": "string",
1226
+ "pattern": "^[a-f0-9]{40}$"
1227
+ },
1228
+ "policy_digest": {
1229
+ "type": "string",
1230
+ "pattern": "^[a-f0-9]{64}$"
1231
+ },
1232
+ "configuration_digest": {
1233
+ "type": "string",
1234
+ "pattern": "^[a-f0-9]{64}$"
1235
+ },
1236
+ "generation": {
1237
+ "type": "integer",
1238
+ "minimum": 0,
1239
+ "maximum": 2147483647
1240
+ },
1241
+ "producer": {
1242
+ "type": "string",
1243
+ "pattern": "^(local-ledger|github-bot:[1-9][0-9]{0,18})$"
1244
+ },
1245
+ "purpose": {
1246
+ "enum": [
1247
+ "baseline",
1248
+ "human-inventory",
1249
+ "feedback",
1250
+ "evidence",
1251
+ "queue",
1252
+ "dispositions",
1253
+ "finding-lifecycle"
1254
+ ]
1255
+ },
1256
+ "schema_version": {
1257
+ "const": "1.0"
1258
+ }
1259
+ }
1260
+ },
1261
+ "item_count": {
1262
+ "type": "integer",
1263
+ "minimum": 0,
1264
+ "maximum": 4096
1265
+ },
1266
+ "sha256": {
1267
+ "type": "string",
1268
+ "pattern": "^[a-f0-9]{64}$"
1269
+ },
1270
+ "document": {
1271
+ "type": "object"
1272
+ }
872
1273
  }
873
- },
874
- {"type": "null"}
1274
+ }
875
1275
  ]
876
1276
  },
877
- "final_receipt": {
878
- "anyOf": [
1277
+ "accepted_semantic_history": {
1278
+ "oneOf": [
879
1279
  {
880
1280
  "type": "object",
881
1281
  "additionalProperties": false,
882
1282
  "required": [
883
- "native_id",
884
- "content_sha256"
1283
+ "schema_version",
1284
+ "repository_id",
1285
+ "pull_request",
1286
+ "streak",
1287
+ "records"
885
1288
  ],
886
1289
  "properties": {
887
- "native_id": {
888
- "type": "string",
889
- "pattern": "^[A-Za-z0-9_:.=-]{1,64}$"
1290
+ "schema_version": {
1291
+ "const": "accepted-semantic-history-v1"
890
1292
  },
891
- "content_sha256": {
892
- "type": "string",
893
- "pattern": "^[a-f0-9]{64}$"
1293
+ "repository_id": {
1294
+ "type": "integer",
1295
+ "minimum": 1
1296
+ },
1297
+ "pull_request": {
1298
+ "type": "integer",
1299
+ "minimum": 1
1300
+ },
1301
+ "streak": {
1302
+ "type": "integer",
1303
+ "minimum": 0,
1304
+ "maximum": 2
1305
+ },
1306
+ "records": {
1307
+ "type": "array",
1308
+ "minItems": 1,
1309
+ "maxItems": 2,
1310
+ "items": {
1311
+ "type": "object",
1312
+ "additionalProperties": false,
1313
+ "required": [
1314
+ "operation_key",
1315
+ "purpose",
1316
+ "source",
1317
+ "snapshot",
1318
+ "made_progress",
1319
+ "target_base_sha",
1320
+ "target_head_sha"
1321
+ ],
1322
+ "properties": {
1323
+ "operation_key": {
1324
+ "type": "string",
1325
+ "minLength": 1,
1326
+ "maxLength": 256
1327
+ },
1328
+ "purpose": {
1329
+ "enum": [
1330
+ "command",
1331
+ "reply"
1332
+ ]
1333
+ },
1334
+ "source": {
1335
+ "type": "object",
1336
+ "additionalProperties": false,
1337
+ "required": [
1338
+ "kind",
1339
+ "id",
1340
+ "updated_at",
1341
+ "body_sha256"
1342
+ ],
1343
+ "properties": {
1344
+ "kind": {
1345
+ "enum": [
1346
+ "issue_comment",
1347
+ "review_comment"
1348
+ ]
1349
+ },
1350
+ "id": {
1351
+ "type": "integer",
1352
+ "minimum": 1,
1353
+ "maximum": 9007199254740991
1354
+ },
1355
+ "updated_at": {
1356
+ "type": "string",
1357
+ "minLength": 1,
1358
+ "maxLength": 128
1359
+ },
1360
+ "body_sha256": {
1361
+ "type": "string",
1362
+ "pattern": "^[a-f0-9]{64}$"
1363
+ }
1364
+ }
1365
+ },
1366
+ "snapshot": {
1367
+ "type": "object",
1368
+ "additionalProperties": false,
1369
+ "required": [
1370
+ "inventory_sha256",
1371
+ "unresolved_sha256",
1372
+ "enumerated_sha256",
1373
+ "reviewed_sha256",
1374
+ "uncertain_sha256",
1375
+ "pending_sha256",
1376
+ "receipts_sha256",
1377
+ "base_sha",
1378
+ "head_sha",
1379
+ "unresolved_count",
1380
+ "reviewed_count",
1381
+ "uncertain_count",
1382
+ "pending_count",
1383
+ "review_complete",
1384
+ "enumeration_complete",
1385
+ "fully_reviewed",
1386
+ "unknown_trust_effect"
1387
+ ],
1388
+ "properties": {
1389
+ "inventory_sha256": {
1390
+ "type": "string",
1391
+ "pattern": "^[a-f0-9]{64}$"
1392
+ },
1393
+ "unresolved_sha256": {
1394
+ "type": "string",
1395
+ "pattern": "^[a-f0-9]{64}$"
1396
+ },
1397
+ "enumerated_sha256": {
1398
+ "type": "string",
1399
+ "pattern": "^[a-f0-9]{64}$"
1400
+ },
1401
+ "reviewed_sha256": {
1402
+ "type": "string",
1403
+ "pattern": "^[a-f0-9]{64}$"
1404
+ },
1405
+ "uncertain_sha256": {
1406
+ "type": "string",
1407
+ "pattern": "^[a-f0-9]{64}$"
1408
+ },
1409
+ "pending_sha256": {
1410
+ "type": "string",
1411
+ "pattern": "^[a-f0-9]{64}$"
1412
+ },
1413
+ "receipts_sha256": {
1414
+ "type": "string",
1415
+ "pattern": "^[a-f0-9]{64}$"
1416
+ },
1417
+ "base_sha": {
1418
+ "type": "string",
1419
+ "pattern": "^[a-f0-9]{40}$"
1420
+ },
1421
+ "head_sha": {
1422
+ "type": "string",
1423
+ "pattern": "^[a-f0-9]{40}$"
1424
+ },
1425
+ "unresolved_count": {
1426
+ "type": "integer",
1427
+ "minimum": 0,
1428
+ "maximum": 100000
1429
+ },
1430
+ "reviewed_count": {
1431
+ "type": "integer",
1432
+ "minimum": 0,
1433
+ "maximum": 100000
1434
+ },
1435
+ "uncertain_count": {
1436
+ "type": "integer",
1437
+ "minimum": 0,
1438
+ "maximum": 100000
1439
+ },
1440
+ "pending_count": {
1441
+ "type": "integer",
1442
+ "minimum": 0,
1443
+ "maximum": 100000
1444
+ },
1445
+ "review_complete": {
1446
+ "type": "boolean"
1447
+ },
1448
+ "enumeration_complete": {
1449
+ "type": "boolean"
1450
+ },
1451
+ "fully_reviewed": {
1452
+ "type": "boolean"
1453
+ },
1454
+ "unknown_trust_effect": {
1455
+ "type": "boolean"
1456
+ }
1457
+ }
1458
+ },
1459
+ "made_progress": {
1460
+ "type": "boolean"
1461
+ },
1462
+ "target_base_sha": {
1463
+ "anyOf": [
1464
+ {
1465
+ "type": "string",
1466
+ "pattern": "^[a-f0-9]{40}$"
1467
+ },
1468
+ {
1469
+ "type": "null"
1470
+ }
1471
+ ]
1472
+ },
1473
+ "target_head_sha": {
1474
+ "anyOf": [
1475
+ {
1476
+ "type": "string",
1477
+ "pattern": "^[a-f0-9]{40}$"
1478
+ },
1479
+ {
1480
+ "type": "null"
1481
+ }
1482
+ ]
1483
+ }
1484
+ }
1485
+ }
894
1486
  }
895
1487
  }
896
1488
  },
897
1489
  {
898
- "type": "null"
1490
+ "type": "object",
1491
+ "additionalProperties": false,
1492
+ "required": [
1493
+ "schema_version",
1494
+ "qualification",
1495
+ "reason"
1496
+ ],
1497
+ "properties": {
1498
+ "schema_version": {
1499
+ "const": "accepted-semantic-history-v1"
1500
+ },
1501
+ "qualification": {
1502
+ "const": "unavailable"
1503
+ },
1504
+ "reason": {
1505
+ "type": "string",
1506
+ "minLength": 1,
1507
+ "maxLength": 128
1508
+ },
1509
+ "prior": {
1510
+ "anyOf": [
1511
+ {
1512
+ "type": "object",
1513
+ "additionalProperties": false,
1514
+ "required": [
1515
+ "schema_version",
1516
+ "repository_id",
1517
+ "pull_request",
1518
+ "streak",
1519
+ "records"
1520
+ ],
1521
+ "properties": {
1522
+ "schema_version": {
1523
+ "const": "accepted-semantic-history-v1"
1524
+ },
1525
+ "repository_id": {
1526
+ "type": "integer",
1527
+ "minimum": 1
1528
+ },
1529
+ "pull_request": {
1530
+ "type": "integer",
1531
+ "minimum": 1
1532
+ },
1533
+ "streak": {
1534
+ "type": "integer",
1535
+ "minimum": 0,
1536
+ "maximum": 2
1537
+ },
1538
+ "records": {
1539
+ "type": "array",
1540
+ "minItems": 1,
1541
+ "maxItems": 2,
1542
+ "items": {
1543
+ "type": "object",
1544
+ "additionalProperties": false,
1545
+ "required": [
1546
+ "operation_key",
1547
+ "purpose",
1548
+ "source",
1549
+ "snapshot",
1550
+ "made_progress",
1551
+ "target_base_sha",
1552
+ "target_head_sha"
1553
+ ],
1554
+ "properties": {
1555
+ "operation_key": {
1556
+ "type": "string",
1557
+ "minLength": 1,
1558
+ "maxLength": 256
1559
+ },
1560
+ "purpose": {
1561
+ "enum": [
1562
+ "command",
1563
+ "reply"
1564
+ ]
1565
+ },
1566
+ "source": {
1567
+ "type": "object",
1568
+ "additionalProperties": false,
1569
+ "required": [
1570
+ "kind",
1571
+ "id",
1572
+ "updated_at",
1573
+ "body_sha256"
1574
+ ],
1575
+ "properties": {
1576
+ "kind": {
1577
+ "enum": [
1578
+ "issue_comment",
1579
+ "review_comment"
1580
+ ]
1581
+ },
1582
+ "id": {
1583
+ "type": "integer",
1584
+ "minimum": 1,
1585
+ "maximum": 9007199254740991
1586
+ },
1587
+ "updated_at": {
1588
+ "type": "string",
1589
+ "minLength": 1,
1590
+ "maxLength": 128
1591
+ },
1592
+ "body_sha256": {
1593
+ "type": "string",
1594
+ "pattern": "^[a-f0-9]{64}$"
1595
+ }
1596
+ }
1597
+ },
1598
+ "snapshot": {
1599
+ "type": "object",
1600
+ "additionalProperties": false,
1601
+ "required": [
1602
+ "inventory_sha256",
1603
+ "unresolved_sha256",
1604
+ "enumerated_sha256",
1605
+ "reviewed_sha256",
1606
+ "uncertain_sha256",
1607
+ "pending_sha256",
1608
+ "receipts_sha256",
1609
+ "base_sha",
1610
+ "head_sha",
1611
+ "unresolved_count",
1612
+ "reviewed_count",
1613
+ "uncertain_count",
1614
+ "pending_count",
1615
+ "review_complete",
1616
+ "enumeration_complete",
1617
+ "fully_reviewed",
1618
+ "unknown_trust_effect"
1619
+ ],
1620
+ "properties": {
1621
+ "inventory_sha256": {
1622
+ "type": "string",
1623
+ "pattern": "^[a-f0-9]{64}$"
1624
+ },
1625
+ "unresolved_sha256": {
1626
+ "type": "string",
1627
+ "pattern": "^[a-f0-9]{64}$"
1628
+ },
1629
+ "enumerated_sha256": {
1630
+ "type": "string",
1631
+ "pattern": "^[a-f0-9]{64}$"
1632
+ },
1633
+ "reviewed_sha256": {
1634
+ "type": "string",
1635
+ "pattern": "^[a-f0-9]{64}$"
1636
+ },
1637
+ "uncertain_sha256": {
1638
+ "type": "string",
1639
+ "pattern": "^[a-f0-9]{64}$"
1640
+ },
1641
+ "pending_sha256": {
1642
+ "type": "string",
1643
+ "pattern": "^[a-f0-9]{64}$"
1644
+ },
1645
+ "receipts_sha256": {
1646
+ "type": "string",
1647
+ "pattern": "^[a-f0-9]{64}$"
1648
+ },
1649
+ "base_sha": {
1650
+ "type": "string",
1651
+ "pattern": "^[a-f0-9]{40}$"
1652
+ },
1653
+ "head_sha": {
1654
+ "type": "string",
1655
+ "pattern": "^[a-f0-9]{40}$"
1656
+ },
1657
+ "unresolved_count": {
1658
+ "type": "integer",
1659
+ "minimum": 0,
1660
+ "maximum": 100000
1661
+ },
1662
+ "reviewed_count": {
1663
+ "type": "integer",
1664
+ "minimum": 0,
1665
+ "maximum": 100000
1666
+ },
1667
+ "uncertain_count": {
1668
+ "type": "integer",
1669
+ "minimum": 0,
1670
+ "maximum": 100000
1671
+ },
1672
+ "pending_count": {
1673
+ "type": "integer",
1674
+ "minimum": 0,
1675
+ "maximum": 100000
1676
+ },
1677
+ "review_complete": {
1678
+ "type": "boolean"
1679
+ },
1680
+ "enumeration_complete": {
1681
+ "type": "boolean"
1682
+ },
1683
+ "fully_reviewed": {
1684
+ "type": "boolean"
1685
+ },
1686
+ "unknown_trust_effect": {
1687
+ "type": "boolean"
1688
+ }
1689
+ }
1690
+ },
1691
+ "made_progress": {
1692
+ "type": "boolean"
1693
+ },
1694
+ "target_base_sha": {
1695
+ "anyOf": [
1696
+ {
1697
+ "type": "string",
1698
+ "pattern": "^[a-f0-9]{40}$"
1699
+ },
1700
+ {
1701
+ "type": "null"
1702
+ }
1703
+ ]
1704
+ },
1705
+ "target_head_sha": {
1706
+ "anyOf": [
1707
+ {
1708
+ "type": "string",
1709
+ "pattern": "^[a-f0-9]{40}$"
1710
+ },
1711
+ {
1712
+ "type": "null"
1713
+ }
1714
+ ]
1715
+ }
1716
+ }
1717
+ }
1718
+ }
1719
+ }
1720
+ },
1721
+ {
1722
+ "type": "null"
1723
+ }
1724
+ ]
1725
+ }
1726
+ }
899
1727
  }
900
1728
  ]
901
1729
  }
1730
+ },
1731
+ "allOf": [
1732
+ {
1733
+ "if": {
1734
+ "properties": {
1735
+ "schema_version": {
1736
+ "const": "finding-lifecycle-reference-v2"
1737
+ }
1738
+ }
1739
+ },
1740
+ "then": {
1741
+ "required": [
1742
+ "accepted_semantic_history"
1743
+ ]
1744
+ },
1745
+ "else": {
1746
+ "not": {
1747
+ "required": [
1748
+ "accepted_semantic_history"
1749
+ ]
1750
+ }
1751
+ }
1752
+ }
1753
+ ]
1754
+ },
1755
+ "trust_enrollment": {
1756
+ "type": "object",
1757
+ "additionalProperties": false,
1758
+ "required": [
1759
+ "schema_version",
1760
+ "document",
1761
+ "sha256"
1762
+ ],
1763
+ "properties": {
1764
+ "schema_version": {
1765
+ "const": "trust-enrollment-reference-v1"
1766
+ },
1767
+ "document": {
1768
+ "type": "object",
1769
+ "additionalProperties": false,
1770
+ "required": [
1771
+ "schema_version",
1772
+ "authority",
1773
+ "app_id",
1774
+ "generation"
1775
+ ],
1776
+ "properties": {
1777
+ "schema_version": {
1778
+ "const": "original-trust-enrollment-v1"
1779
+ },
1780
+ "authority": {
1781
+ "type": "object"
1782
+ },
1783
+ "app_id": {
1784
+ "type": "integer",
1785
+ "minimum": 1,
1786
+ "maximum": 9007199254740991
1787
+ },
1788
+ "generation": {
1789
+ "type": "integer",
1790
+ "minimum": 0,
1791
+ "maximum": 2147483647
1792
+ }
1793
+ }
1794
+ },
1795
+ "sha256": {
1796
+ "type": "string",
1797
+ "pattern": "^[a-f0-9]{64}$"
1798
+ }
902
1799
  }
903
1800
  }
904
1801
  },