@xemahq/xema 0.45.0 → 0.45.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/edition/verify-image-evidence.bundle.provenance.json +46 -46
- package/dist/runtime/infra/infra-catalog.js +1 -1
- package/edition/develop-coverage-readers.mjs +5 -2
- package/edition/develop-coverage-run.mjs +2 -1
- package/edition/distribution-evidence-set.mjs +3 -0
- package/edition/oci-evidence-verbs.mjs +7 -1
- package/edition/oci-image-source-evidence.mjs +72 -9
- package/edition/plan-image-evidence-refresh.mjs +3 -0
- package/edition/producer-evidence-bundle.mjs +31 -0
- package/package.json +2 -2
|
@@ -2431,277 +2431,277 @@
|
|
|
2431
2431
|
},
|
|
2432
2432
|
{
|
|
2433
2433
|
"package": "@xemahq/xema",
|
|
2434
|
-
"version": "0.45.
|
|
2434
|
+
"version": "0.45.1",
|
|
2435
2435
|
"path": "edition/adapter-host-versions.mjs",
|
|
2436
2436
|
"sha256": "sha256:1b7ebd3592f4da1225fba74aaba912e7d85fbceeb1626f7dcdac83491cbb4d69"
|
|
2437
2437
|
},
|
|
2438
2438
|
{
|
|
2439
2439
|
"package": "@xemahq/xema",
|
|
2440
|
-
"version": "0.45.
|
|
2440
|
+
"version": "0.45.1",
|
|
2441
2441
|
"path": "edition/authorization-base.mjs",
|
|
2442
2442
|
"sha256": "sha256:bbeac7ff01376cb89ed2140526d4795d8e559b3f01612b404a701f19aaa24c6a"
|
|
2443
2443
|
},
|
|
2444
2444
|
{
|
|
2445
2445
|
"package": "@xemahq/xema",
|
|
2446
|
-
"version": "0.45.
|
|
2446
|
+
"version": "0.45.1",
|
|
2447
2447
|
"path": "edition/build-ledger.mjs",
|
|
2448
2448
|
"sha256": "sha256:05202cbdd606aee086c8e9c62d28be68c429653a8b1d73a289ed0fe4ff14da85"
|
|
2449
2449
|
},
|
|
2450
2450
|
{
|
|
2451
2451
|
"package": "@xemahq/xema",
|
|
2452
|
-
"version": "0.45.
|
|
2452
|
+
"version": "0.45.1",
|
|
2453
2453
|
"path": "edition/canonical-repository-url.mjs",
|
|
2454
2454
|
"sha256": "sha256:91e7590afba782a3ee2fa64084e7c715e6a5b52c11e8a9cc68c64397f181b888"
|
|
2455
2455
|
},
|
|
2456
2456
|
{
|
|
2457
2457
|
"package": "@xemahq/xema",
|
|
2458
|
-
"version": "0.45.
|
|
2458
|
+
"version": "0.45.1",
|
|
2459
2459
|
"path": "edition/connector-source-authority.mjs",
|
|
2460
2460
|
"sha256": "sha256:ea94475f4324737673accd7de1303c44db1cbc4dac61a865a06cd83abe310164"
|
|
2461
2461
|
},
|
|
2462
2462
|
{
|
|
2463
2463
|
"package": "@xemahq/xema",
|
|
2464
|
-
"version": "0.45.
|
|
2464
|
+
"version": "0.45.1",
|
|
2465
2465
|
"path": "edition/develop-graph.mjs",
|
|
2466
2466
|
"sha256": "sha256:319db77e708dd73a9dd4a81a963d86e52b030cad3346b104c0862af4e38a2237"
|
|
2467
2467
|
},
|
|
2468
2468
|
{
|
|
2469
2469
|
"package": "@xemahq/xema",
|
|
2470
|
-
"version": "0.45.
|
|
2470
|
+
"version": "0.45.1",
|
|
2471
2471
|
"path": "edition/dispatched-runtime-components.mjs",
|
|
2472
2472
|
"sha256": "sha256:9712823d183a60108cd002b2d36a9e5c0867b9d576dd02825264a18f7b8ece69"
|
|
2473
2473
|
},
|
|
2474
2474
|
{
|
|
2475
2475
|
"package": "@xemahq/xema",
|
|
2476
|
-
"version": "0.45.
|
|
2476
|
+
"version": "0.45.1",
|
|
2477
2477
|
"path": "edition/distribution-paths.mjs",
|
|
2478
2478
|
"sha256": "sha256:d78a5c8405bc6c25d36fcec61b0030e1fdacac7d528e698adb96f906f4b70279"
|
|
2479
2479
|
},
|
|
2480
2480
|
{
|
|
2481
2481
|
"package": "@xemahq/xema",
|
|
2482
|
-
"version": "0.45.
|
|
2482
|
+
"version": "0.45.1",
|
|
2483
2483
|
"path": "edition/edition-artifact.mjs",
|
|
2484
2484
|
"sha256": "sha256:282b6d5e70736f7e41cff41167d2cd99b7d0127dcc2b712132888dcfc82e36cd"
|
|
2485
2485
|
},
|
|
2486
2486
|
{
|
|
2487
2487
|
"package": "@xemahq/xema",
|
|
2488
|
-
"version": "0.45.
|
|
2488
|
+
"version": "0.45.1",
|
|
2489
2489
|
"path": "edition/edition-channel.mjs",
|
|
2490
2490
|
"sha256": "sha256:3c0c1564dc50be133cad500452d953353aa5beb703142c05a17bbce8175ba9f3"
|
|
2491
2491
|
},
|
|
2492
2492
|
{
|
|
2493
2493
|
"package": "@xemahq/xema",
|
|
2494
|
-
"version": "0.45.
|
|
2494
|
+
"version": "0.45.1",
|
|
2495
2495
|
"path": "edition/edition-chart-set.mjs",
|
|
2496
2496
|
"sha256": "sha256:f9f16b58279c8c2619a39c5cc92bdbc334543d1a324304cd5d3b120d66dc8f3a"
|
|
2497
2497
|
},
|
|
2498
2498
|
{
|
|
2499
2499
|
"package": "@xemahq/xema",
|
|
2500
|
-
"version": "0.45.
|
|
2500
|
+
"version": "0.45.1",
|
|
2501
2501
|
"path": "edition/edition-config.mjs",
|
|
2502
2502
|
"sha256": "sha256:7604e79a480c9b9db1d1c256155f05298adf6caa49da95ad232f6be581f3c72e"
|
|
2503
2503
|
},
|
|
2504
2504
|
{
|
|
2505
2505
|
"package": "@xemahq/xema",
|
|
2506
|
-
"version": "0.45.
|
|
2506
|
+
"version": "0.45.1",
|
|
2507
2507
|
"path": "edition/edition-constants.mjs",
|
|
2508
2508
|
"sha256": "sha256:d3747ca300f38832796521b47d12076bdba7f214199a1dec52c9384ab3dde394"
|
|
2509
2509
|
},
|
|
2510
2510
|
{
|
|
2511
2511
|
"package": "@xemahq/xema",
|
|
2512
|
-
"version": "0.45.
|
|
2512
|
+
"version": "0.45.1",
|
|
2513
2513
|
"path": "edition/edition-contract-parse.mjs",
|
|
2514
2514
|
"sha256": "sha256:c575e96b70bda82899931eb0b18567988e2e13e664fa498bcbef96b571dcabb4"
|
|
2515
2515
|
},
|
|
2516
2516
|
{
|
|
2517
2517
|
"package": "@xemahq/xema",
|
|
2518
|
-
"version": "0.45.
|
|
2518
|
+
"version": "0.45.1",
|
|
2519
2519
|
"path": "edition/edition-contract.json",
|
|
2520
2520
|
"sha256": "sha256:af7c88854007e63e4e77863cf72610f59ff838959dbd381087ec50ba782ae0e1"
|
|
2521
2521
|
},
|
|
2522
2522
|
{
|
|
2523
2523
|
"package": "@xemahq/xema",
|
|
2524
|
-
"version": "0.45.
|
|
2524
|
+
"version": "0.45.1",
|
|
2525
2525
|
"path": "edition/edition-protocol.mjs",
|
|
2526
2526
|
"sha256": "sha256:31865053af2085c0654d39228617135ec0962d32c958c9f7cefce1f2d0527e99"
|
|
2527
2527
|
},
|
|
2528
2528
|
{
|
|
2529
2529
|
"package": "@xemahq/xema",
|
|
2530
|
-
"version": "0.45.
|
|
2530
|
+
"version": "0.45.1",
|
|
2531
2531
|
"path": "edition/edition-source-pins.mjs",
|
|
2532
2532
|
"sha256": "sha256:b141474fff33b06734fb62cd2552752b991c8267bb1c9bccb22a81dd80e91c6c"
|
|
2533
2533
|
},
|
|
2534
2534
|
{
|
|
2535
2535
|
"package": "@xemahq/xema",
|
|
2536
|
-
"version": "0.45.
|
|
2536
|
+
"version": "0.45.1",
|
|
2537
2537
|
"path": "edition/edition-workspace.mjs",
|
|
2538
2538
|
"sha256": "sha256:892b360f9f80d2308b0b12f9b99658ae06173878d9b71cf5d6fc8bd717b3c86e"
|
|
2539
2539
|
},
|
|
2540
2540
|
{
|
|
2541
2541
|
"package": "@xemahq/xema",
|
|
2542
|
-
"version": "0.45.
|
|
2542
|
+
"version": "0.45.1",
|
|
2543
2543
|
"path": "edition/evidence-checkout.mjs",
|
|
2544
2544
|
"sha256": "sha256:31fb669769b31de4c6f2b2501bb96959548172ef166e7568edbbfed7f5079a11"
|
|
2545
2545
|
},
|
|
2546
2546
|
{
|
|
2547
2547
|
"package": "@xemahq/xema",
|
|
2548
|
-
"version": "0.45.
|
|
2548
|
+
"version": "0.45.1",
|
|
2549
2549
|
"path": "edition/evidence-grammars.mjs",
|
|
2550
2550
|
"sha256": "sha256:4dae22b61ade99219a482b971c9780d68a3d37d021e39cdfe860b245364b8b9f"
|
|
2551
2551
|
},
|
|
2552
2552
|
{
|
|
2553
2553
|
"package": "@xemahq/xema",
|
|
2554
|
-
"version": "0.45.
|
|
2554
|
+
"version": "0.45.1",
|
|
2555
2555
|
"path": "edition/evidence-trust-pin.mjs",
|
|
2556
2556
|
"sha256": "sha256:65077589d1d9bd129c175c03a6dca6bb4eaf277fa29d6391e1065654fe8cc246"
|
|
2557
2557
|
},
|
|
2558
2558
|
{
|
|
2559
2559
|
"package": "@xemahq/xema",
|
|
2560
|
-
"version": "0.45.
|
|
2560
|
+
"version": "0.45.1",
|
|
2561
2561
|
"path": "edition/first-party-source-ids.mjs",
|
|
2562
2562
|
"sha256": "sha256:20cb1ad7cfb8c6e6686a6be5a51289da4bba76c20b58d9c1b5b6b3813a38dc1c"
|
|
2563
2563
|
},
|
|
2564
2564
|
{
|
|
2565
2565
|
"package": "@xemahq/xema",
|
|
2566
|
-
"version": "0.45.
|
|
2566
|
+
"version": "0.45.1",
|
|
2567
2567
|
"path": "edition/git-json.mjs",
|
|
2568
2568
|
"sha256": "sha256:d0d25cda0c19007becabc9a2827c3dcf759b295cd0b41596eb4480c9549a1f21"
|
|
2569
2569
|
},
|
|
2570
2570
|
{
|
|
2571
2571
|
"package": "@xemahq/xema",
|
|
2572
|
-
"version": "0.45.
|
|
2572
|
+
"version": "0.45.1",
|
|
2573
2573
|
"path": "edition/git-source-auth.mjs",
|
|
2574
2574
|
"sha256": "sha256:c1b32aa6f7d59798db58238d632cafeadbd4f07376396a31acdeb5f0ac56dcac"
|
|
2575
2575
|
},
|
|
2576
2576
|
{
|
|
2577
2577
|
"package": "@xemahq/xema",
|
|
2578
|
-
"version": "0.45.
|
|
2578
|
+
"version": "0.45.1",
|
|
2579
2579
|
"path": "edition/image-delivery-entitlement-descriptor.mjs",
|
|
2580
2580
|
"sha256": "sha256:4726b66116f01bf2523fafe2b7a356591eca8fb5ca6bd8b154dd4821873e921b"
|
|
2581
2581
|
},
|
|
2582
2582
|
{
|
|
2583
2583
|
"package": "@xemahq/xema",
|
|
2584
|
-
"version": "0.45.
|
|
2584
|
+
"version": "0.45.1",
|
|
2585
2585
|
"path": "edition/image-evidence-replay-state.mjs",
|
|
2586
2586
|
"sha256": "sha256:eba0cf1d38af0ab2f00c5099fa8bc2edc543136ce92f895544d4d284b3d6af0f"
|
|
2587
2587
|
},
|
|
2588
2588
|
{
|
|
2589
2589
|
"package": "@xemahq/xema",
|
|
2590
|
-
"version": "0.45.
|
|
2590
|
+
"version": "0.45.1",
|
|
2591
2591
|
"path": "edition/image-evidence.mjs",
|
|
2592
2592
|
"sha256": "sha256:8ccbd4e7ce482cbb25521e893ac047d31ca1da782e87ee2179629e8911aa6aa3"
|
|
2593
2593
|
},
|
|
2594
2594
|
{
|
|
2595
2595
|
"package": "@xemahq/xema",
|
|
2596
|
-
"version": "0.45.
|
|
2596
|
+
"version": "0.45.1",
|
|
2597
2597
|
"path": "edition/kernel-capability-domain.mjs",
|
|
2598
2598
|
"sha256": "sha256:3ecf887dd8d399e91a8285f6f115f6e418fb59bbf3f004539fe65ec667219356"
|
|
2599
2599
|
},
|
|
2600
2600
|
{
|
|
2601
2601
|
"package": "@xemahq/xema",
|
|
2602
|
-
"version": "0.45.
|
|
2602
|
+
"version": "0.45.1",
|
|
2603
2603
|
"path": "edition/kernel-contract-authority.mjs",
|
|
2604
2604
|
"sha256": "sha256:20abdde62a7b037c01ea9bbe1ff1e6094e6b0efd0add2f656f1938a04409bf82"
|
|
2605
2605
|
},
|
|
2606
2606
|
{
|
|
2607
2607
|
"package": "@xemahq/xema",
|
|
2608
|
-
"version": "0.45.
|
|
2608
|
+
"version": "0.45.1",
|
|
2609
2609
|
"path": "edition/lib.mjs",
|
|
2610
2610
|
"sha256": "sha256:2cf8f4b52f9532f536a27c8bf6736cc760d7026754945209b1cf5be23391ef49"
|
|
2611
2611
|
},
|
|
2612
2612
|
{
|
|
2613
2613
|
"package": "@xemahq/xema",
|
|
2614
|
-
"version": "0.45.
|
|
2614
|
+
"version": "0.45.1",
|
|
2615
2615
|
"path": "edition/no-follow-file.mjs",
|
|
2616
2616
|
"sha256": "sha256:c17bdf5e441f3c079aa06d4b48bbed05cad087855b9ad2a5e6dc43d5ee2b17c3"
|
|
2617
2617
|
},
|
|
2618
2618
|
{
|
|
2619
2619
|
"package": "@xemahq/xema",
|
|
2620
|
-
"version": "0.45.
|
|
2620
|
+
"version": "0.45.1",
|
|
2621
2621
|
"path": "edition/operation-requirements.mjs",
|
|
2622
2622
|
"sha256": "sha256:92656c5e920fca2a5a75c0b8db133d551ba044c84a149f33435479248b3dff8b"
|
|
2623
2623
|
},
|
|
2624
2624
|
{
|
|
2625
2625
|
"package": "@xemahq/xema",
|
|
2626
|
-
"version": "0.45.
|
|
2626
|
+
"version": "0.45.1",
|
|
2627
2627
|
"path": "edition/pin-source.mjs",
|
|
2628
2628
|
"sha256": "sha256:32fa918729a83587b4d3bca6e5fe381f5a525397ebc49d52729ec1f8cf216c37"
|
|
2629
2629
|
},
|
|
2630
2630
|
{
|
|
2631
2631
|
"package": "@xemahq/xema",
|
|
2632
|
-
"version": "0.45.
|
|
2632
|
+
"version": "0.45.1",
|
|
2633
2633
|
"path": "edition/sigstore-bundle-media-type.mjs",
|
|
2634
2634
|
"sha256": "sha256:e0aa5a3992f0385ddbbe69eb0307d642ac428ef516c8394816ac4fd52e0ac39c"
|
|
2635
2635
|
},
|
|
2636
2636
|
{
|
|
2637
2637
|
"package": "@xemahq/xema",
|
|
2638
|
-
"version": "0.45.
|
|
2638
|
+
"version": "0.45.1",
|
|
2639
2639
|
"path": "edition/source-authority.mjs",
|
|
2640
2640
|
"sha256": "sha256:9c351f60e8ea838f445f89c3709c60b7f13b021b78d6e40eaef91350a793f0ff"
|
|
2641
2641
|
},
|
|
2642
2642
|
{
|
|
2643
2643
|
"package": "@xemahq/xema",
|
|
2644
|
-
"version": "0.45.
|
|
2644
|
+
"version": "0.45.1",
|
|
2645
2645
|
"path": "edition/strict-json.mjs",
|
|
2646
2646
|
"sha256": "sha256:f95778396df7f38b086f55d2ec4f3b6644a8aeff2b32282a62829145fb544562"
|
|
2647
2647
|
},
|
|
2648
2648
|
{
|
|
2649
2649
|
"package": "@xemahq/xema",
|
|
2650
|
-
"version": "0.45.
|
|
2650
|
+
"version": "0.45.1",
|
|
2651
2651
|
"path": "edition/string-order.mjs",
|
|
2652
2652
|
"sha256": "sha256:b3210cd273e4b2e01fb8b1a91e28734cd211d4010c080d0ce95f5e5ff631cffb"
|
|
2653
2653
|
},
|
|
2654
2654
|
{
|
|
2655
2655
|
"package": "@xemahq/xema",
|
|
2656
|
-
"version": "0.45.
|
|
2656
|
+
"version": "0.45.1",
|
|
2657
2657
|
"path": "edition/trust-policy-arming.mjs",
|
|
2658
2658
|
"sha256": "sha256:6f6f192118407e71a744087caea988bcf3d33aca9803217bceb8134d7e2b9120"
|
|
2659
2659
|
},
|
|
2660
2660
|
{
|
|
2661
2661
|
"package": "@xemahq/xema",
|
|
2662
|
-
"version": "0.45.
|
|
2662
|
+
"version": "0.45.1",
|
|
2663
2663
|
"path": "edition/trusted-executable.mjs",
|
|
2664
2664
|
"sha256": "sha256:37d46cdbc999ddd55d4ea8aeed4850ddd1efde89ed7b532f5a2ddec87105d796"
|
|
2665
2665
|
},
|
|
2666
2666
|
{
|
|
2667
2667
|
"package": "@xemahq/xema",
|
|
2668
|
-
"version": "0.45.
|
|
2668
|
+
"version": "0.45.1",
|
|
2669
2669
|
"path": "edition/verifier-binding.mjs",
|
|
2670
2670
|
"sha256": "sha256:80732658617f5255258c538eeb2383331ec8553b44b58d552b567845a7b916aa"
|
|
2671
2671
|
},
|
|
2672
2672
|
{
|
|
2673
2673
|
"package": "@xemahq/xema",
|
|
2674
|
-
"version": "0.45.
|
|
2674
|
+
"version": "0.45.1",
|
|
2675
2675
|
"path": "edition/verifier-files.mjs",
|
|
2676
2676
|
"sha256": "sha256:cdd14a20a63f0f194a8abb55680a5a7e3ced1f09f8b210a90d349e655f6de0c0"
|
|
2677
2677
|
},
|
|
2678
2678
|
{
|
|
2679
2679
|
"package": "@xemahq/xema",
|
|
2680
|
-
"version": "0.45.
|
|
2680
|
+
"version": "0.45.1",
|
|
2681
2681
|
"path": "edition/verifier-provenance.mjs",
|
|
2682
2682
|
"sha256": "sha256:3e2fb8e07cf1f66b8ad6c7ac2555fe3af64ec7abeb07cecbaf1939a18c2b3663"
|
|
2683
2683
|
},
|
|
2684
2684
|
{
|
|
2685
2685
|
"package": "@xemahq/xema",
|
|
2686
|
-
"version": "0.45.
|
|
2686
|
+
"version": "0.45.1",
|
|
2687
2687
|
"path": "edition/verify-catalogue-evidence.mjs",
|
|
2688
2688
|
"sha256": "sha256:d7e42efc9edced97e4330cddc46183445a870ba22f57896a7ea6bc600d369137"
|
|
2689
2689
|
},
|
|
2690
2690
|
{
|
|
2691
2691
|
"package": "@xemahq/xema",
|
|
2692
|
-
"version": "0.45.
|
|
2692
|
+
"version": "0.45.1",
|
|
2693
2693
|
"path": "edition/verify-image-evidence.mjs",
|
|
2694
2694
|
"sha256": "sha256:396936f3d9e0ed68902b8b03c6fa02479e439357e6194ac8ce0e0991be834706"
|
|
2695
2695
|
},
|
|
2696
2696
|
{
|
|
2697
2697
|
"package": "@xemahq/xema",
|
|
2698
|
-
"version": "0.45.
|
|
2698
|
+
"version": "0.45.1",
|
|
2699
2699
|
"path": "edition/workspace-sections.mjs",
|
|
2700
2700
|
"sha256": "sha256:18c28e9fa2a6b7d8589c8434fc6ed9f1e93954d41339813e711ed0fbbcf5c61d"
|
|
2701
2701
|
},
|
|
2702
2702
|
{
|
|
2703
2703
|
"package": "@xemahq/xema",
|
|
2704
|
-
"version": "0.45.
|
|
2704
|
+
"version": "0.45.1",
|
|
2705
2705
|
"path": "scripts/build-evidence-verifier.mjs",
|
|
2706
2706
|
"sha256": "sha256:5a688d20c47dc88aff37aa0c6cc02daf2c370a5bc610fef8446ce7be222d4c0b"
|
|
2707
2707
|
},
|
|
@@ -189,7 +189,7 @@ exports.INFRA_CATALOG = Object.freeze({
|
|
|
189
189
|
exports.INFRA_COMPONENTS = Object.freeze(Object.values(schema_1.InfraComponent));
|
|
190
190
|
exports.OBJECT_STORE_BUCKETS = Object.freeze([
|
|
191
191
|
'session-session-attachments',
|
|
192
|
-
'session-
|
|
192
|
+
'session-session-snapshots',
|
|
193
193
|
'kb-knowledge-base-pages',
|
|
194
194
|
'plugin-bundles',
|
|
195
195
|
'artifact-store',
|
|
@@ -12,7 +12,7 @@ import { promisify } from 'node:util';
|
|
|
12
12
|
|
|
13
13
|
import { AttestationStatus, DEVELOP_EVIDENCE_CHANNEL } from './develop-coverage-verdict.mjs';
|
|
14
14
|
import { COSIGN_ENV, policyCandidates, sha256Digest, validatePinnedTrustedRoot, verifySigstoreEvidenceDescriptor } from './image-evidence.mjs';
|
|
15
|
-
import { resolveImageSourceEvidenceReferrer } from './oci-image-source-evidence.mjs';
|
|
15
|
+
import { resolveImageSourceEvidenceReferrer, writeForeignAuthorityReferrerReport } from './oci-image-source-evidence.mjs';
|
|
16
16
|
import { BUNDLE_MEDIA_TYPE } from './produce-image-source-evidence.mjs';
|
|
17
17
|
import { loadRegistryCredentialDeclarations, resolveRegistryCredential, splitImageRef } from './registry-credentials.mjs';
|
|
18
18
|
import { isNotPublishedYet } from './seal-image-digests.mjs';
|
|
@@ -81,13 +81,14 @@ function basicAuthParts(credential) {
|
|
|
81
81
|
* @param {string} request.policyRoot the directory the policy's trusted root is read from (the data root)
|
|
82
82
|
* @param {object} request.trustedCosign the digest-pinned cosign handle (prepareTrustedCosignBinary)
|
|
83
83
|
* @param {object} request.schemas kernel distribution schemas
|
|
84
|
+
* @param {object} request.expectedContractAuthority the kernel contract authority the data root pins
|
|
84
85
|
* @param {string} request.dataRoot declares how each registry is read
|
|
85
86
|
* @param {object} request.env environment the registry credentials are named in
|
|
86
87
|
* @param {Function} [request.runCosign] (path, args, env) => { code, stdout, stderr }; replaced by tests
|
|
87
88
|
* @param {Function} [request.fetchImpl] @param {Function} [request.run] oras runner, replaced by tests
|
|
88
89
|
* @param {Function} [request.clientFor] (authority) => registry client, replaced by tests
|
|
89
90
|
*/
|
|
90
|
-
export function createCoverageReaders({ policy, policyRoot, trustedCosign, schemas, dataRoot, env, runCosign = defaultRunCosign, fetchImpl, run, clientFor: injectedClientFor }) {
|
|
91
|
+
export function createCoverageReaders({ policy, policyRoot, trustedCosign, schemas, expectedContractAuthority, dataRoot, env, runCosign = defaultRunCosign, fetchImpl, run, clientFor: injectedClientFor }) {
|
|
91
92
|
const cosignPath = assertPreparedExecutable(trustedCosign, 'cosign');
|
|
92
93
|
const declarations = injectedClientFor === undefined ? loadRegistryCredentialDeclarations(dataRoot) : null;
|
|
93
94
|
const scratch = mkdtempSync(join(tmpdir(), 'xema-coverage-'));
|
|
@@ -141,6 +142,8 @@ export function createCoverageReaders({ policy, policyRoot, trustedCosign, schem
|
|
|
141
142
|
imageRepository: subject.imageRef,
|
|
142
143
|
subjectDigest: digest,
|
|
143
144
|
schemas,
|
|
145
|
+
expectedContractAuthority,
|
|
146
|
+
onForeignAuthorityReferrer: writeForeignAuthorityReferrerReport,
|
|
144
147
|
});
|
|
145
148
|
if (evidence === null) {return { status: AttestationStatus.None };}
|
|
146
149
|
if (rows.length === 0) {return { status: AttestationStatus.NoRow };}
|
|
@@ -8,6 +8,7 @@ import { collectCoverage, coverageExitCode, renderCoverageTable } from './develo
|
|
|
8
8
|
import { DEVELOP_EDITION_STEPS, resolveDevelopSnapshot } from './develop-edition-resolve.mjs';
|
|
9
9
|
import { loadDeclaredPinnedPolicy } from './evidence-trust-policy.mjs';
|
|
10
10
|
import { prepareTrustedCosignBinary } from './image-evidence.mjs';
|
|
11
|
+
import { readPinnedContractAuthority } from './produce-image-source-evidence.mjs';
|
|
11
12
|
|
|
12
13
|
const stderrProgress = (line) => process.stderr.write(`${line}\n`);
|
|
13
14
|
|
|
@@ -34,7 +35,7 @@ export async function runDevelopCoverage({
|
|
|
34
35
|
const { schemas, inputs, lock } = await resolveDevelopSnapshot({ id, pins, steps, phase: (name) => progress(`[coverage] ${name}`) });
|
|
35
36
|
const { imageLock } = await steps.resolveImages(id, { inputs, lock });
|
|
36
37
|
progress(`[coverage] image content hashes computed (${imageLock.subjects.length} subjects)`);
|
|
37
|
-
const readers = createCoverageReaders({ policy, policyRoot: dataRoot, trustedCosign, schemas, dataRoot, env, ...readerOptions });
|
|
38
|
+
const readers = createCoverageReaders({ policy, policyRoot: dataRoot, trustedCosign, schemas, expectedContractAuthority: readPinnedContractAuthority({ dataRoot, schemas }), dataRoot, env, ...readerOptions });
|
|
38
39
|
try {
|
|
39
40
|
const report = await collectCoverage({ distributionId: id, subjects: imageLock.subjects, policy, readers, progress });
|
|
40
41
|
write(json ? `${JSON.stringify(report, null, 2)}\n` : renderCoverageTable(report));
|
|
@@ -62,6 +62,7 @@ import { readBoundedNoFollowFile } from './no-follow-file.mjs';
|
|
|
62
62
|
import {
|
|
63
63
|
createRegistryClientResolver,
|
|
64
64
|
resolveImageSourceEvidenceReferrer,
|
|
65
|
+
writeForeignAuthorityReferrerReport,
|
|
65
66
|
} from './oci-image-source-evidence.mjs';
|
|
66
67
|
import { BUNDLE_MEDIA_TYPE, canonicalSignedBundleBytes, cosignVerifyAttestationArgs, validateProducedBundle } from './produce-image-source-evidence.mjs';
|
|
67
68
|
import { splitImageRef } from './registry-credentials.mjs';
|
|
@@ -499,6 +500,8 @@ export async function resolveProducerEvidence({
|
|
|
499
500
|
imageRepository: subject.imageRef,
|
|
500
501
|
subjectDigest: image.digest,
|
|
501
502
|
schemas,
|
|
503
|
+
expectedContractAuthority,
|
|
504
|
+
onForeignAuthorityReferrer: writeForeignAuthorityReferrerReport,
|
|
502
505
|
});
|
|
503
506
|
if (ociEvidence === null) {
|
|
504
507
|
throw new Error(
|
|
@@ -39,6 +39,7 @@ import {
|
|
|
39
39
|
createRegistryClientResolver,
|
|
40
40
|
resolveImageSourceEvidenceReferrer,
|
|
41
41
|
validateMaterializedImageSourceEvidence,
|
|
42
|
+
writeForeignAuthorityReferrerReport,
|
|
42
43
|
} from './oci-image-source-evidence.mjs';
|
|
43
44
|
import { REFERRERS_DISTRIBUTION_SPEC } from './oras.mjs';
|
|
44
45
|
import { assertProducerInput, buildImageSourceStatements, cosignVerifyAttestationArgs, createCosignVerifier, readPinnedContractAuthority } from './produce-image-source-evidence.mjs';
|
|
@@ -216,6 +217,7 @@ export async function planOciEvidenceBackfill({
|
|
|
216
217
|
editionsRoot: editions,
|
|
217
218
|
producerRepositoryRoots,
|
|
218
219
|
schemas,
|
|
220
|
+
expectedContractAuthority,
|
|
219
221
|
registryClientFactory,
|
|
220
222
|
}) {
|
|
221
223
|
const gitIndex = indexCommittedProducerEvidence({
|
|
@@ -281,6 +283,8 @@ export async function planOciEvidenceBackfill({
|
|
|
281
283
|
imageRepository: item.imageRepository,
|
|
282
284
|
subjectDigest: item.subjectDigest,
|
|
283
285
|
schemas,
|
|
286
|
+
expectedContractAuthority,
|
|
287
|
+
onForeignAuthorityReferrer: writeForeignAuthorityReferrerReport,
|
|
284
288
|
});
|
|
285
289
|
const reported = {
|
|
286
290
|
subjectKind: item.subject.kind,
|
|
@@ -367,12 +371,14 @@ async function main() {
|
|
|
367
371
|
WorkspaceRoot.Kernel,
|
|
368
372
|
]);
|
|
369
373
|
const flags = parseEvidenceCliFlags(rest, { repeated: ['distribution', 'producer-repository-root'] });
|
|
374
|
+
const schemas = await loadKernelDistributionSchemas();
|
|
370
375
|
const plan = await planOciEvidenceBackfill({
|
|
371
376
|
distributionIds: flags.requireMany('distribution'),
|
|
372
377
|
dataRoot: dataRoot(),
|
|
373
378
|
editionsRoot: editionsRoot(),
|
|
374
379
|
producerRepositoryRoots: flags.requireMany('producer-repository-root').map((root) => resolve(root)),
|
|
375
|
-
schemas
|
|
380
|
+
schemas,
|
|
381
|
+
expectedContractAuthority: readPinnedContractAuthority({ dataRoot: dataRoot(), schemas }),
|
|
376
382
|
});
|
|
377
383
|
process.stdout.write(serializeJson(plan));
|
|
378
384
|
// 2: something is still to be produced or attached.
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
PRODUCER_STATEMENT_MEDIA_TYPE,
|
|
14
14
|
producerEvidenceLayerFiles,
|
|
15
15
|
readProducerEvidenceDirectory,
|
|
16
|
+
readRawStatementAuthorityCommits,
|
|
16
17
|
} from './producer-evidence-bundle.mjs';
|
|
17
18
|
import {
|
|
18
19
|
loadRegistryCredentialDeclarations,
|
|
@@ -156,9 +157,39 @@ export function validateMaterializedImageSourceEvidence({
|
|
|
156
157
|
return { ...evidence, created };
|
|
157
158
|
}
|
|
158
159
|
|
|
160
|
+
function assertExpectedAuthorityCommit(value) {
|
|
161
|
+
if (typeof value !== 'string' || value.length === 0) {
|
|
162
|
+
throw new Error('the expected kernel contract authority commit is required');
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/** The artifact states a kernel contract authority other than the one evidence is read under. */
|
|
167
|
+
export class ForeignAuthorityReferrerError extends Error {
|
|
168
|
+
constructor({ artifactDigest, sourceCommit }) {
|
|
169
|
+
super(
|
|
170
|
+
`evidence referrer ${artifactDigest} is stated under kernel contract authority ${sourceCommit}`,
|
|
171
|
+
);
|
|
172
|
+
this.name = 'ForeignAuthorityReferrerError';
|
|
173
|
+
this.artifactDigest = artifactDigest;
|
|
174
|
+
this.sourceCommit = sourceCommit;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/** The one stderr line that names a skipped foreign-authority referrer. */
|
|
179
|
+
export function writeForeignAuthorityReferrerReport(skipped) {
|
|
180
|
+
process.stderr.write(
|
|
181
|
+
`[evidence] skipped ${skipped.imageRepository}@${skipped.subjectDigest} referrer ${skipped.artifactDigest}: ` +
|
|
182
|
+
`stated under kernel contract authority ${skipped.sourceCommit}, ` +
|
|
183
|
+
`not ${skipped.expectedAuthorityCommit}\n`,
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
159
187
|
/**
|
|
160
188
|
* Fetch, content-address validate and decode one OCI evidence artifact.
|
|
161
189
|
* `getBlob` verifies every digest again, independently of the manifest.
|
|
190
|
+
* An artifact whose RAW statements state another authority commit than
|
|
191
|
+
* `expectedAuthorityCommit` is refused with `ForeignAuthorityReferrerError`
|
|
192
|
+
* before the strict parse, which is bound to the expected authority.
|
|
162
193
|
*/
|
|
163
194
|
export async function readImageSourceEvidenceArtifact({
|
|
164
195
|
client,
|
|
@@ -166,7 +197,9 @@ export async function readImageSourceEvidenceArtifact({
|
|
|
166
197
|
subjectDigest,
|
|
167
198
|
artifactDigest,
|
|
168
199
|
schemas,
|
|
200
|
+
expectedAuthorityCommit,
|
|
169
201
|
}) {
|
|
202
|
+
assertExpectedAuthorityCommit(expectedAuthorityCommit);
|
|
170
203
|
const fetched = await client.getManifestByDigest(repository, artifactDigest);
|
|
171
204
|
const { created, layers } = validateImageSourceEvidenceManifest({
|
|
172
205
|
manifest: fetched.document,
|
|
@@ -184,6 +217,11 @@ export async function readImageSourceEvidenceArtifact({
|
|
|
184
217
|
mkdirSync(dirname(path), { recursive: true });
|
|
185
218
|
writeFileSync(path, bytes, { flag: 'wx', mode: 0o600 });
|
|
186
219
|
}
|
|
220
|
+
for (const sourceCommit of readRawStatementAuthorityCommits({ directory })) {
|
|
221
|
+
if (sourceCommit !== expectedAuthorityCommit) {
|
|
222
|
+
throw new ForeignAuthorityReferrerError({ artifactDigest, sourceCommit });
|
|
223
|
+
}
|
|
224
|
+
}
|
|
187
225
|
const evidence = validateMaterializedImageSourceEvidence({
|
|
188
226
|
directory,
|
|
189
227
|
manifest: fetched.document,
|
|
@@ -196,13 +234,25 @@ export async function readImageSourceEvidenceArtifact({
|
|
|
196
234
|
}
|
|
197
235
|
}
|
|
198
236
|
|
|
199
|
-
/**
|
|
237
|
+
/**
|
|
238
|
+
* Resolve the newest valid evidence referrer deterministically. A referrer
|
|
239
|
+
* stated under a different kernel contract authority is not evidence under
|
|
240
|
+
* `expectedContractAuthority`: it is reported to `onForeignAuthorityReferrer`
|
|
241
|
+
* and skipped. Every other defect of a referrer still throws.
|
|
242
|
+
*/
|
|
200
243
|
export async function resolveImageSourceEvidenceReferrer({
|
|
201
244
|
client,
|
|
202
245
|
imageRepository,
|
|
203
246
|
subjectDigest,
|
|
204
247
|
schemas,
|
|
248
|
+
expectedContractAuthority,
|
|
249
|
+
onForeignAuthorityReferrer,
|
|
205
250
|
}) {
|
|
251
|
+
const expectedAuthorityCommit = expectedContractAuthority?.sourceCommit;
|
|
252
|
+
assertExpectedAuthorityCommit(expectedAuthorityCommit);
|
|
253
|
+
if (typeof onForeignAuthorityReferrer !== 'function') {
|
|
254
|
+
throw new Error('a foreign-authority referrer report handler is required');
|
|
255
|
+
}
|
|
206
256
|
const { authority, repository } = splitImageRef(imageRepository);
|
|
207
257
|
if (client.authority !== authority) {
|
|
208
258
|
throw new Error(
|
|
@@ -224,16 +274,29 @@ export async function resolveImageSourceEvidenceReferrer({
|
|
|
224
274
|
if (!SHA256_DIGEST_PATTERN.test(descriptor.digest ?? '')) {
|
|
225
275
|
throw new Error('registry returned a non-canonical evidence referrer digest');
|
|
226
276
|
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
277
|
+
try {
|
|
278
|
+
candidates.push(
|
|
279
|
+
await readImageSourceEvidenceArtifact({
|
|
280
|
+
client,
|
|
281
|
+
repository,
|
|
282
|
+
subjectDigest,
|
|
283
|
+
artifactDigest: descriptor.digest,
|
|
284
|
+
schemas,
|
|
285
|
+
expectedAuthorityCommit,
|
|
286
|
+
}),
|
|
287
|
+
);
|
|
288
|
+
} catch (error) {
|
|
289
|
+
if (!(error instanceof ForeignAuthorityReferrerError)) {throw error;}
|
|
290
|
+
onForeignAuthorityReferrer({
|
|
291
|
+
imageRepository,
|
|
231
292
|
subjectDigest,
|
|
232
|
-
artifactDigest:
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
293
|
+
artifactDigest: error.artifactDigest,
|
|
294
|
+
sourceCommit: error.sourceCommit,
|
|
295
|
+
expectedAuthorityCommit,
|
|
296
|
+
});
|
|
297
|
+
}
|
|
236
298
|
}
|
|
299
|
+
if (candidates.length === 0) {return null;}
|
|
237
300
|
candidates.sort((left, right) => {
|
|
238
301
|
const byCreated = compareStrings(right.created, left.created);
|
|
239
302
|
return byCreated || compareStrings(left.artifactDigest, right.artifactDigest);
|
|
@@ -73,6 +73,7 @@ import { compareStrings, loadKernelDistributionSchemas } from './lib.mjs';
|
|
|
73
73
|
import {
|
|
74
74
|
createRegistryClientResolver,
|
|
75
75
|
resolveImageSourceEvidenceReferrer,
|
|
76
|
+
writeForeignAuthorityReferrerReport,
|
|
76
77
|
} from './oci-image-source-evidence.mjs';
|
|
77
78
|
import {
|
|
78
79
|
loadProducerKernelSchemas,
|
|
@@ -193,6 +194,8 @@ export async function planImageEvidenceRefresh({
|
|
|
193
194
|
imageRepository: subject.imageRef,
|
|
194
195
|
subjectDigest: image.digest,
|
|
195
196
|
schemas,
|
|
197
|
+
expectedContractAuthority,
|
|
198
|
+
onForeignAuthorityReferrer: writeForeignAuthorityReferrerReport,
|
|
196
199
|
});
|
|
197
200
|
if (artifact !== null) {
|
|
198
201
|
matches = artifact.records.filter(
|
|
@@ -62,6 +62,37 @@ export function producerStatementMatchesInput(statement, expectedStatement) {
|
|
|
62
62
|
);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* The RAW `predicate.contractAuthority.sourceCommit` of every statement a
|
|
67
|
+
* producer evidence directory carries, read BEFORE any schema parse: the parse
|
|
68
|
+
* is bound to one kernel authority, so deciding whose authority a statement
|
|
69
|
+
* speaks under cannot go through it. A statement that states no string commit
|
|
70
|
+
* contributes nothing here; the strict parse refuses it later.
|
|
71
|
+
*/
|
|
72
|
+
export function readRawStatementAuthorityCommits({ directory }) {
|
|
73
|
+
const index = JSON.parse(
|
|
74
|
+
decodeExactUtf8(
|
|
75
|
+
readBounded(directory, PRODUCER_EVIDENCE_INDEX_FILE, 'producer evidence index'),
|
|
76
|
+
'producer evidence index',
|
|
77
|
+
),
|
|
78
|
+
);
|
|
79
|
+
if (!Array.isArray(index?.producerEvidence)) {
|
|
80
|
+
throw new Error('producer evidence index is not non-empty schemaVersion 1');
|
|
81
|
+
}
|
|
82
|
+
const commits = new Set();
|
|
83
|
+
for (const entry of index.producerEvidence) {
|
|
84
|
+
const statement = JSON.parse(
|
|
85
|
+
decodeExactUtf8(
|
|
86
|
+
readBounded(directory, entry?.evidence?.statementPath, 'producer statement'),
|
|
87
|
+
'producer statement',
|
|
88
|
+
),
|
|
89
|
+
);
|
|
90
|
+
const commit = statement?.predicate?.contractAuthority?.sourceCommit;
|
|
91
|
+
if (typeof commit === 'string') {commits.add(commit);}
|
|
92
|
+
}
|
|
93
|
+
return commits;
|
|
94
|
+
}
|
|
95
|
+
|
|
65
96
|
/** Read and structurally validate one producer evidence directory. */
|
|
66
97
|
export function readProducerEvidenceDirectory({ directory, schemas }) {
|
|
67
98
|
if (!isAbsolute(directory)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/xema",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/xema-dev/xema-cli.git",
|
|
@@ -92,6 +92,6 @@
|
|
|
92
92
|
"typecheck": "tsc --noEmit"
|
|
93
93
|
},
|
|
94
94
|
"xemaRelease": {
|
|
95
|
-
"sourceDigest": "sha256:
|
|
95
|
+
"sourceDigest": "sha256:04abcd3c081c6cd50d0133c543310f75801357071b18834ec4b15af587760461"
|
|
96
96
|
}
|
|
97
97
|
}
|