@xemahq/contracts 0.75.0 → 0.77.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/.source-stamp.json +2 -2
- package/dist/agent-composition/lib/delegate-aperture.d.ts.map +1 -1
- package/dist/agent-composition/lib/delegate-aperture.js +10 -9
- package/dist/agent-composition/lib/delegate-aperture.js.map +1 -1
- package/dist/agent-session/lib/resolved-session-composition.d.ts.map +1 -1
- package/dist/agent-session/lib/resolved-session-composition.js +46 -45
- package/dist/agent-session/lib/resolved-session-composition.js.map +1 -1
- package/dist/authorization-module/index.d.ts +1 -0
- package/dist/authorization-module/index.d.ts.map +1 -1
- package/dist/authorization-module/index.js +1 -0
- package/dist/authorization-module/index.js.map +1 -1
- package/dist/authorization-module/lib/authorization-composition-error.d.ts +2 -0
- package/dist/authorization-module/lib/authorization-composition-error.d.ts.map +1 -1
- package/dist/authorization-module/lib/authorization-composition-error.js +2 -0
- package/dist/authorization-module/lib/authorization-composition-error.js.map +1 -1
- package/dist/authorization-module/lib/authorization-interface-requirements.d.ts +21 -0
- package/dist/authorization-module/lib/authorization-interface-requirements.d.ts.map +1 -0
- package/dist/authorization-module/lib/authorization-interface-requirements.js +14 -0
- package/dist/authorization-module/lib/authorization-interface-requirements.js.map +1 -0
- package/dist/authorization-module/lib/platform-authorization-modules.d.ts +6 -2
- package/dist/authorization-module/lib/platform-authorization-modules.d.ts.map +1 -1
- package/dist/authorization-module/lib/platform-authorization-modules.js +39 -2
- package/dist/authorization-module/lib/platform-authorization-modules.js.map +1 -1
- package/dist/authorization-module/server/authorization-interface-conformance.d.ts +14 -0
- package/dist/authorization-module/server/authorization-interface-conformance.d.ts.map +1 -0
- package/dist/authorization-module/server/authorization-interface-conformance.js +97 -0
- package/dist/authorization-module/server/authorization-interface-conformance.js.map +1 -0
- package/dist/authorization-module/server/compose-authorization-base.d.ts.map +1 -1
- package/dist/authorization-module/server/compose-authorization-base.js +8 -3
- package/dist/authorization-module/server/compose-authorization-base.js.map +1 -1
- package/dist/authzen/lib/durable-delegation-model.d.ts +8 -0
- package/dist/authzen/lib/durable-delegation-model.d.ts.map +1 -1
- package/dist/authzen/lib/durable-delegation-model.js +10 -1
- package/dist/authzen/lib/durable-delegation-model.js.map +1 -1
- package/dist/biome/lib/biome-generated-index.d.ts.map +1 -1
- package/dist/biome/lib/biome-generated-index.js +2 -1
- package/dist/biome/lib/biome-generated-index.js.map +1 -1
- package/dist/biome/lib/biome-manifest.d.ts.map +1 -1
- package/dist/biome/lib/biome-manifest.js +2 -1
- package/dist/biome/lib/biome-manifest.js.map +1 -1
- package/dist/biome-dependency/lib/biome-dependency-contract.d.ts.map +1 -1
- package/dist/biome-dependency/lib/biome-dependency-contract.js +2 -1
- package/dist/biome-dependency/lib/biome-dependency-contract.js.map +1 -1
- package/dist/biome-dependency/lib/peer-seam-table.d.ts +1 -0
- package/dist/biome-dependency/lib/peer-seam-table.d.ts.map +1 -1
- package/dist/biome-dependency/lib/peer-seam-table.js +2 -1
- package/dist/biome-dependency/lib/peer-seam-table.js.map +1 -1
- package/dist/biome-mount/lib/adapter-host-mount.js +1 -1
- package/dist/biome-mount/lib/adapter-host-mount.js.map +1 -1
- package/dist/capability/lib/capability-aperture.d.ts.map +1 -1
- package/dist/capability/lib/capability-aperture.js.map +1 -1
- package/dist/capability/lib/capability-ref-pattern.d.ts.map +1 -1
- package/dist/capability/lib/capability-ref-pattern.js.map +1 -1
- package/dist/capability/lib/required-resource-role-binding.d.ts.map +1 -1
- package/dist/capability/lib/required-resource-role-binding.js.map +1 -1
- package/dist/content-address/lib/content-address.d.ts +2 -0
- package/dist/content-address/lib/content-address.d.ts.map +1 -1
- package/dist/content-address/lib/content-address.js +4 -2
- package/dist/content-address/lib/content-address.js.map +1 -1
- package/dist/contribution/lib/contribution-kind-descriptor.d.ts.map +1 -1
- package/dist/contribution/lib/contribution-kind-descriptor.js.map +1 -1
- package/dist/deployment/lib/resolved-deployment.d.ts +27 -2
- package/dist/deployment/lib/resolved-deployment.d.ts.map +1 -1
- package/dist/deployment/lib/resolved-deployment.js +60 -18
- package/dist/deployment/lib/resolved-deployment.js.map +1 -1
- package/dist/distribution/index.d.ts +5 -1
- package/dist/distribution/index.d.ts.map +1 -1
- package/dist/distribution/index.js +6 -0
- package/dist/distribution/index.js.map +1 -1
- package/dist/distribution/lib/biome-source.d.ts +6 -0
- package/dist/distribution/lib/biome-source.d.ts.map +1 -1
- package/dist/distribution/lib/biome-source.js +23 -2
- package/dist/distribution/lib/biome-source.js.map +1 -1
- package/dist/distribution/lib/customer-edition-definition.d.ts +45 -0
- package/dist/distribution/lib/customer-edition-definition.d.ts.map +1 -0
- package/dist/distribution/lib/customer-edition-definition.js +110 -0
- package/dist/distribution/lib/customer-edition-definition.js.map +1 -0
- package/dist/distribution/lib/delivered-biome.d.ts +11 -0
- package/dist/distribution/lib/delivered-biome.d.ts.map +1 -0
- package/dist/distribution/lib/delivered-biome.js +24 -0
- package/dist/distribution/lib/delivered-biome.js.map +1 -0
- package/dist/distribution/lib/distribution-lock.d.ts +36 -42
- package/dist/distribution/lib/distribution-lock.d.ts.map +1 -1
- package/dist/distribution/lib/distribution-lock.js +129 -102
- package/dist/distribution/lib/distribution-lock.js.map +1 -1
- package/dist/distribution/lib/distribution-selector.d.ts +7 -0
- package/dist/distribution/lib/distribution-selector.d.ts.map +1 -1
- package/dist/distribution/lib/distribution-selector.js +10 -9
- package/dist/distribution/lib/distribution-selector.js.map +1 -1
- package/dist/distribution/lib/distribution.d.ts +0 -1
- package/dist/distribution/lib/distribution.d.ts.map +1 -1
- package/dist/distribution/lib/distribution.js +1 -2
- package/dist/distribution/lib/distribution.js.map +1 -1
- package/dist/distribution/lib/image-lock.d.ts +11 -11
- package/dist/distribution/lib/image-lock.d.ts.map +1 -1
- package/dist/distribution/lib/image-lock.js +5 -6
- package/dist/distribution/lib/image-lock.js.map +1 -1
- package/dist/distribution/lib/image-producer-evidence.d.ts +69 -55
- package/dist/distribution/lib/image-producer-evidence.d.ts.map +1 -1
- package/dist/distribution/lib/image-producer-evidence.js +71 -47
- package/dist/distribution/lib/image-producer-evidence.js.map +1 -1
- package/dist/distribution/lib/kernel-contract-authority.d.ts +53 -3
- package/dist/distribution/lib/kernel-contract-authority.d.ts.map +1 -1
- package/dist/distribution/lib/kernel-contract-authority.js +120 -26
- package/dist/distribution/lib/kernel-contract-authority.js.map +1 -1
- package/dist/distribution/lib/kernel-contract-source-paths.d.ts +2 -0
- package/dist/distribution/lib/kernel-contract-source-paths.d.ts.map +1 -0
- package/dist/distribution/lib/kernel-contract-source-paths.js +391 -0
- package/dist/distribution/lib/kernel-contract-source-paths.js.map +1 -0
- package/dist/distribution/lib/nexus-endpoint-specs.d.ts +2 -5
- package/dist/distribution/lib/nexus-endpoint-specs.d.ts.map +1 -1
- package/dist/distribution/lib/nexus-endpoint-specs.js +7 -7
- package/dist/distribution/lib/nexus-endpoint-specs.js.map +1 -1
- package/dist/distribution/lib/platform-service-source-index.d.ts.map +1 -1
- package/dist/distribution/lib/platform-service-source-index.js +2 -2
- package/dist/distribution/lib/platform-service-source-index.js.map +1 -1
- package/dist/distribution/lib/resolve-unsplit-deployment.d.ts +14 -0
- package/dist/distribution/lib/resolve-unsplit-deployment.d.ts.map +1 -0
- package/dist/distribution/lib/resolve-unsplit-deployment.js +34 -0
- package/dist/distribution/lib/resolve-unsplit-deployment.js.map +1 -0
- package/dist/distribution/lib/runtime-image-source-index.d.ts +3 -3
- package/dist/distribution/lib/runtime-image-source-index.d.ts.map +1 -1
- package/dist/distribution/lib/runtime-image-source-index.js +1 -1
- package/dist/distribution/lib/runtime-image-source-index.js.map +1 -1
- package/dist/distribution/lib/verified-resolved-deployment.d.ts +19 -2
- package/dist/distribution/lib/verified-resolved-deployment.d.ts.map +1 -1
- package/dist/distribution/lib/verify-resolved-deployment.d.ts +25 -11
- package/dist/distribution/lib/verify-resolved-deployment.d.ts.map +1 -1
- package/dist/distribution/lib/verify-resolved-deployment.js +64 -11
- package/dist/distribution/lib/verify-resolved-deployment.js.map +1 -1
- package/dist/edition-protocol/edition-contract.schema.json +1 -0
- package/dist/edition-protocol/edition-protocol.json +1 -0
- package/dist/edition-protocol/index.d.ts +2 -0
- package/dist/edition-protocol/index.d.ts.map +1 -0
- package/dist/edition-protocol/index.js +18 -0
- package/dist/edition-protocol/index.js.map +1 -0
- package/dist/edition-protocol/lib/edition-protocol.d.ts +9 -0
- package/dist/edition-protocol/lib/edition-protocol.d.ts.map +1 -0
- package/dist/edition-protocol/lib/edition-protocol.js +19 -0
- package/dist/edition-protocol/lib/edition-protocol.js.map +1 -0
- package/dist/http/lib/problem-definition.js.map +1 -1
- package/dist/redis-key/index.d.ts +1 -0
- package/dist/redis-key/index.d.ts.map +1 -1
- package/dist/redis-key/index.js +1 -0
- package/dist/redis-key/index.js.map +1 -1
- package/dist/redis-key/lib/deployment-acl-policy.d.ts.map +1 -1
- package/dist/redis-key/lib/deployment-acl-policy.js +1 -0
- package/dist/redis-key/lib/deployment-acl-policy.js.map +1 -1
- package/dist/redis-key/lib/erasure-request.d.ts +6 -0
- package/dist/redis-key/lib/erasure-request.d.ts.map +1 -0
- package/dist/redis-key/lib/erasure-request.js +75 -0
- package/dist/redis-key/lib/erasure-request.js.map +1 -0
- package/dist/redis-key/lib/lease-acl-policy.d.ts.map +1 -1
- package/dist/redis-key/lib/lease-acl-policy.js +2 -0
- package/dist/redis-key/lib/lease-acl-policy.js.map +1 -1
- package/dist/resolved-deployment-fixture/index.d.ts +2 -0
- package/dist/resolved-deployment-fixture/index.d.ts.map +1 -0
- package/dist/resolved-deployment-fixture/index.js +18 -0
- package/dist/resolved-deployment-fixture/index.js.map +1 -0
- package/dist/resolved-deployment-fixture/lib/resolved-deployment-fixture.d.ts +15 -0
- package/dist/resolved-deployment-fixture/lib/resolved-deployment-fixture.d.ts.map +1 -0
- package/dist/resolved-deployment-fixture/lib/resolved-deployment-fixture.js +128 -0
- package/dist/resolved-deployment-fixture/lib/resolved-deployment-fixture.js.map +1 -0
- package/dist/resource-role/lib/resource-role-binding.d.ts.map +1 -1
- package/dist/resource-role/lib/resource-role-binding.js.map +1 -1
- package/dist/resource-role/lib/resource-role-contribution.d.ts.map +1 -1
- package/dist/resource-role/lib/resource-role-contribution.js.map +1 -1
- package/dist/resource-role/lib/resource-role-default-binding.d.ts.map +1 -1
- package/dist/resource-role/lib/resource-role-default-binding.js.map +1 -1
- package/dist/service-registry/lib/on-behalf-descriptor.d.ts.map +1 -1
- package/dist/service-registry/lib/on-behalf-descriptor.js.map +1 -1
- package/dist/service-registry/lib/service-descriptor.d.ts +6 -0
- package/dist/service-registry/lib/service-descriptor.d.ts.map +1 -1
- package/dist/service-registry/lib/service-descriptor.js +16 -1
- package/dist/service-registry/lib/service-descriptor.js.map +1 -1
- package/package.json +4 -2
|
@@ -7,7 +7,7 @@ export declare const InTotoSubjectSchema: z.ZodObject<{
|
|
|
7
7
|
}, z.core.$strict>;
|
|
8
8
|
}, z.core.$strict>;
|
|
9
9
|
export declare const ImageProducerPlatformSchema: z.ZodObject<{
|
|
10
|
-
manifestDigest: z.ZodString
|
|
10
|
+
manifestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
11
11
|
os: z.ZodString;
|
|
12
12
|
architecture: z.ZodString;
|
|
13
13
|
variant: z.ZodOptional<z.ZodString>;
|
|
@@ -19,17 +19,17 @@ export declare const ImageProducerSourceSchema: z.ZodObject<{
|
|
|
19
19
|
repo: z.ZodString;
|
|
20
20
|
path: z.ZodString;
|
|
21
21
|
sourceCommit: z.ZodString;
|
|
22
|
-
sourceManifestHash: z.ZodString
|
|
22
|
+
sourceManifestHash: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").BiomeSourceManifestHash, string>>;
|
|
23
23
|
sourceHashAlgorithm: z.ZodUnion<readonly [z.ZodLiteral<ImageSourceHashAlgorithm.ImageInputV1>, z.ZodLiteral<ImageSourceHashAlgorithm.ImageInputV2>, z.ZodLiteral<ImageSourceHashAlgorithm.ImageInputV3>]>;
|
|
24
24
|
sourceTreeHash: z.ZodString;
|
|
25
25
|
}, z.core.$strict>;
|
|
26
26
|
export declare const ImageProducerBuildSchema: z.ZodObject<{
|
|
27
27
|
builderId: z.ZodString;
|
|
28
28
|
buildType: z.ZodString;
|
|
29
|
-
buildDefinitionDigest: z.ZodString
|
|
30
|
-
parametersDigest: z.ZodString
|
|
29
|
+
buildDefinitionDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
30
|
+
parametersDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
31
31
|
platforms: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
32
|
-
manifestDigest: z.ZodString
|
|
32
|
+
manifestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
33
33
|
os: z.ZodString;
|
|
34
34
|
architecture: z.ZodString;
|
|
35
35
|
variant: z.ZodOptional<z.ZodString>;
|
|
@@ -37,15 +37,15 @@ export declare const ImageProducerBuildSchema: z.ZodObject<{
|
|
|
37
37
|
}, z.core.$strict>;
|
|
38
38
|
export declare const ImageProducerArtifactSchema: z.ZodObject<{
|
|
39
39
|
imageRepository: z.ZodString;
|
|
40
|
-
manifestDigest: z.ZodString
|
|
40
|
+
manifestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
41
41
|
manifestMediaType: z.ZodString;
|
|
42
42
|
sbom: z.ZodObject<{
|
|
43
43
|
predicateType: z.ZodLiteral<"https://spdx.dev/Document">;
|
|
44
|
-
digest: z.ZodString
|
|
44
|
+
digest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
45
45
|
}, z.core.$strict>;
|
|
46
46
|
provenance: z.ZodObject<{
|
|
47
47
|
predicateType: z.ZodLiteral<"https://slsa.dev/provenance/v1">;
|
|
48
|
-
digest: z.ZodString
|
|
48
|
+
digest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
49
49
|
}, z.core.$strict>;
|
|
50
50
|
}, z.core.$strict>;
|
|
51
51
|
export declare const ImageProducerRunSchema: z.ZodObject<{
|
|
@@ -63,7 +63,7 @@ export declare const ImageProducerPredicateSchema: z.ZodObject<{
|
|
|
63
63
|
generatorIdentity: z.ZodLiteral<"xema-distributions/build-runtime-image-source-index.mjs@v1">;
|
|
64
64
|
repositoryUrl: z.ZodLiteral<"https://github.com/xema-dev/xema-kernel-contracts.git">;
|
|
65
65
|
sourceCommit: z.ZodString;
|
|
66
|
-
sourcePaths: z.ZodReadonly<z.
|
|
66
|
+
sourcePaths: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
67
67
|
contentHashAlgorithm: z.ZodLiteral<import("./kernel-contract-authority").KernelContractContentHashAlgorithm>;
|
|
68
68
|
contentDigest: z.ZodString;
|
|
69
69
|
}, z.core.$strict>;
|
|
@@ -74,17 +74,17 @@ export declare const ImageProducerPredicateSchema: z.ZodObject<{
|
|
|
74
74
|
repo: z.ZodString;
|
|
75
75
|
path: z.ZodString;
|
|
76
76
|
sourceCommit: z.ZodString;
|
|
77
|
-
sourceManifestHash: z.ZodString
|
|
77
|
+
sourceManifestHash: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").BiomeSourceManifestHash, string>>;
|
|
78
78
|
sourceHashAlgorithm: z.ZodUnion<readonly [z.ZodLiteral<ImageSourceHashAlgorithm.ImageInputV1>, z.ZodLiteral<ImageSourceHashAlgorithm.ImageInputV2>, z.ZodLiteral<ImageSourceHashAlgorithm.ImageInputV3>]>;
|
|
79
79
|
sourceTreeHash: z.ZodString;
|
|
80
80
|
}, z.core.$strict>;
|
|
81
81
|
build: z.ZodObject<{
|
|
82
82
|
builderId: z.ZodString;
|
|
83
83
|
buildType: z.ZodString;
|
|
84
|
-
buildDefinitionDigest: z.ZodString
|
|
85
|
-
parametersDigest: z.ZodString
|
|
84
|
+
buildDefinitionDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
85
|
+
parametersDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
86
86
|
platforms: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
87
|
-
manifestDigest: z.ZodString
|
|
87
|
+
manifestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
88
88
|
os: z.ZodString;
|
|
89
89
|
architecture: z.ZodString;
|
|
90
90
|
variant: z.ZodOptional<z.ZodString>;
|
|
@@ -92,15 +92,15 @@ export declare const ImageProducerPredicateSchema: z.ZodObject<{
|
|
|
92
92
|
}, z.core.$strict>;
|
|
93
93
|
artifact: z.ZodObject<{
|
|
94
94
|
imageRepository: z.ZodString;
|
|
95
|
-
manifestDigest: z.ZodString
|
|
95
|
+
manifestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
96
96
|
manifestMediaType: z.ZodString;
|
|
97
97
|
sbom: z.ZodObject<{
|
|
98
98
|
predicateType: z.ZodLiteral<"https://spdx.dev/Document">;
|
|
99
|
-
digest: z.ZodString
|
|
99
|
+
digest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
100
100
|
}, z.core.$strict>;
|
|
101
101
|
provenance: z.ZodObject<{
|
|
102
102
|
predicateType: z.ZodLiteral<"https://slsa.dev/provenance/v1">;
|
|
103
|
-
digest: z.ZodString
|
|
103
|
+
digest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
104
104
|
}, z.core.$strict>;
|
|
105
105
|
}, z.core.$strict>;
|
|
106
106
|
producerRun: z.ZodObject<{
|
|
@@ -129,7 +129,7 @@ export declare const ImageProducerStatementSchema: z.ZodObject<{
|
|
|
129
129
|
generatorIdentity: z.ZodLiteral<"xema-distributions/build-runtime-image-source-index.mjs@v1">;
|
|
130
130
|
repositoryUrl: z.ZodLiteral<"https://github.com/xema-dev/xema-kernel-contracts.git">;
|
|
131
131
|
sourceCommit: z.ZodString;
|
|
132
|
-
sourcePaths: z.ZodReadonly<z.
|
|
132
|
+
sourcePaths: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
133
133
|
contentHashAlgorithm: z.ZodLiteral<import("./kernel-contract-authority").KernelContractContentHashAlgorithm>;
|
|
134
134
|
contentDigest: z.ZodString;
|
|
135
135
|
}, z.core.$strict>;
|
|
@@ -140,17 +140,17 @@ export declare const ImageProducerStatementSchema: z.ZodObject<{
|
|
|
140
140
|
repo: z.ZodString;
|
|
141
141
|
path: z.ZodString;
|
|
142
142
|
sourceCommit: z.ZodString;
|
|
143
|
-
sourceManifestHash: z.ZodString
|
|
143
|
+
sourceManifestHash: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").BiomeSourceManifestHash, string>>;
|
|
144
144
|
sourceHashAlgorithm: z.ZodUnion<readonly [z.ZodLiteral<ImageSourceHashAlgorithm.ImageInputV1>, z.ZodLiteral<ImageSourceHashAlgorithm.ImageInputV2>, z.ZodLiteral<ImageSourceHashAlgorithm.ImageInputV3>]>;
|
|
145
145
|
sourceTreeHash: z.ZodString;
|
|
146
146
|
}, z.core.$strict>;
|
|
147
147
|
build: z.ZodObject<{
|
|
148
148
|
builderId: z.ZodString;
|
|
149
149
|
buildType: z.ZodString;
|
|
150
|
-
buildDefinitionDigest: z.ZodString
|
|
151
|
-
parametersDigest: z.ZodString
|
|
150
|
+
buildDefinitionDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
151
|
+
parametersDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
152
152
|
platforms: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
153
|
-
manifestDigest: z.ZodString
|
|
153
|
+
manifestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
154
154
|
os: z.ZodString;
|
|
155
155
|
architecture: z.ZodString;
|
|
156
156
|
variant: z.ZodOptional<z.ZodString>;
|
|
@@ -158,15 +158,15 @@ export declare const ImageProducerStatementSchema: z.ZodObject<{
|
|
|
158
158
|
}, z.core.$strict>;
|
|
159
159
|
artifact: z.ZodObject<{
|
|
160
160
|
imageRepository: z.ZodString;
|
|
161
|
-
manifestDigest: z.ZodString
|
|
161
|
+
manifestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
162
162
|
manifestMediaType: z.ZodString;
|
|
163
163
|
sbom: z.ZodObject<{
|
|
164
164
|
predicateType: z.ZodLiteral<"https://spdx.dev/Document">;
|
|
165
|
-
digest: z.ZodString
|
|
165
|
+
digest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
166
166
|
}, z.core.$strict>;
|
|
167
167
|
provenance: z.ZodObject<{
|
|
168
168
|
predicateType: z.ZodLiteral<"https://slsa.dev/provenance/v1">;
|
|
169
|
-
digest: z.ZodString
|
|
169
|
+
digest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
170
170
|
}, z.core.$strict>;
|
|
171
171
|
}, z.core.$strict>;
|
|
172
172
|
producerRun: z.ZodObject<{
|
|
@@ -185,7 +185,7 @@ export declare const DistributionImagesPredicateSchema: z.ZodObject<{
|
|
|
185
185
|
schemaVersion: z.ZodLiteral<1>;
|
|
186
186
|
distributionId: z.ZodString;
|
|
187
187
|
distributionInputHash: z.ZodString;
|
|
188
|
-
normalizedImageLockDigest: z.ZodString
|
|
188
|
+
normalizedImageLockDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
189
189
|
releaseSequence: z.ZodNumber;
|
|
190
190
|
releaseSourceCommit: z.ZodString;
|
|
191
191
|
runId: z.ZodString;
|
|
@@ -197,9 +197,9 @@ export declare const DistributionImagesPredicateSchema: z.ZodObject<{
|
|
|
197
197
|
subjectKind: z.ZodEnum<typeof RuntimeImageSubjectKind>;
|
|
198
198
|
subjectId: z.ZodString;
|
|
199
199
|
imageRepository: z.ZodString;
|
|
200
|
-
manifestDigest: z.ZodString
|
|
201
|
-
producerStatementDigest: z.ZodString
|
|
202
|
-
producerBundleDigest: z.ZodString
|
|
200
|
+
manifestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
201
|
+
producerStatementDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
202
|
+
producerBundleDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
203
203
|
}, z.core.$strict>>>;
|
|
204
204
|
}, z.core.$strict>;
|
|
205
205
|
export declare const DistributionImagesStatementSchema: z.ZodObject<{
|
|
@@ -215,7 +215,7 @@ export declare const DistributionImagesStatementSchema: z.ZodObject<{
|
|
|
215
215
|
schemaVersion: z.ZodLiteral<1>;
|
|
216
216
|
distributionId: z.ZodString;
|
|
217
217
|
distributionInputHash: z.ZodString;
|
|
218
|
-
normalizedImageLockDigest: z.ZodString
|
|
218
|
+
normalizedImageLockDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
219
219
|
releaseSequence: z.ZodNumber;
|
|
220
220
|
releaseSourceCommit: z.ZodString;
|
|
221
221
|
runId: z.ZodString;
|
|
@@ -227,9 +227,9 @@ export declare const DistributionImagesStatementSchema: z.ZodObject<{
|
|
|
227
227
|
subjectKind: z.ZodEnum<typeof RuntimeImageSubjectKind>;
|
|
228
228
|
subjectId: z.ZodString;
|
|
229
229
|
imageRepository: z.ZodString;
|
|
230
|
-
manifestDigest: z.ZodString
|
|
231
|
-
producerStatementDigest: z.ZodString
|
|
232
|
-
producerBundleDigest: z.ZodString
|
|
230
|
+
manifestDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
231
|
+
producerStatementDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
232
|
+
producerBundleDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
233
233
|
}, z.core.$strict>>>;
|
|
234
234
|
}, z.core.$strict>;
|
|
235
235
|
}, z.core.$strict>;
|
|
@@ -244,7 +244,7 @@ export declare const ImageDeliveryEntitlementPredicateSchema: z.ZodObject<{
|
|
|
244
244
|
schemaVersion: z.ZodLiteral<1>;
|
|
245
245
|
customerId: z.ZodString;
|
|
246
246
|
distributionId: z.ZodString;
|
|
247
|
-
distributionStatementDigest: z.ZodString
|
|
247
|
+
distributionStatementDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
248
248
|
mode: z.ZodEnum<typeof ImageDeliveryMode>;
|
|
249
249
|
targetRegistry: z.ZodNullable<z.ZodString>;
|
|
250
250
|
nonce: z.ZodString;
|
|
@@ -265,7 +265,7 @@ export declare const ImageDeliveryEntitlementStatementSchema: z.ZodObject<{
|
|
|
265
265
|
schemaVersion: z.ZodLiteral<1>;
|
|
266
266
|
customerId: z.ZodString;
|
|
267
267
|
distributionId: z.ZodString;
|
|
268
|
-
distributionStatementDigest: z.ZodString
|
|
268
|
+
distributionStatementDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
269
269
|
mode: z.ZodEnum<typeof ImageDeliveryMode>;
|
|
270
270
|
targetRegistry: z.ZodNullable<z.ZodString>;
|
|
271
271
|
nonce: z.ZodString;
|
|
@@ -277,9 +277,9 @@ export declare const ImageDeliveryEntitlementStatementSchema: z.ZodObject<{
|
|
|
277
277
|
export type ImageDeliveryEntitlementStatement = z.infer<typeof ImageDeliveryEntitlementStatementSchema>;
|
|
278
278
|
export declare const SigstoreEvidenceDescriptorSchema: z.ZodObject<{
|
|
279
279
|
statementPath: z.ZodString;
|
|
280
|
-
statementDigest: z.ZodString
|
|
280
|
+
statementDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
281
281
|
bundlePath: z.ZodString;
|
|
282
|
-
bundleDigest: z.ZodString
|
|
282
|
+
bundleDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
283
283
|
bundleMediaType: z.ZodLiteral<"application/vnd.dev.sigstore.bundle.v0.3+json">;
|
|
284
284
|
}, z.core.$strict>;
|
|
285
285
|
export declare const DistributionImageEvidenceSetSchema: z.ZodObject<{
|
|
@@ -290,83 +290,97 @@ export declare const DistributionImageEvidenceSetSchema: z.ZodObject<{
|
|
|
290
290
|
subjectId: z.ZodString;
|
|
291
291
|
evidence: z.ZodObject<{
|
|
292
292
|
statementPath: z.ZodString;
|
|
293
|
-
statementDigest: z.ZodString
|
|
293
|
+
statementDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
294
294
|
bundlePath: z.ZodString;
|
|
295
|
-
bundleDigest: z.ZodString
|
|
295
|
+
bundleDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
296
296
|
bundleMediaType: z.ZodLiteral<"application/vnd.dev.sigstore.bundle.v0.3+json">;
|
|
297
297
|
}, z.core.$strict>;
|
|
298
298
|
}, z.core.$strict>>>;
|
|
299
299
|
completeness: z.ZodObject<{
|
|
300
300
|
statementPath: z.ZodString;
|
|
301
|
-
statementDigest: z.ZodString
|
|
301
|
+
statementDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
302
302
|
bundlePath: z.ZodString;
|
|
303
|
-
bundleDigest: z.ZodString
|
|
303
|
+
bundleDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
304
304
|
bundleMediaType: z.ZodLiteral<"application/vnd.dev.sigstore.bundle.v0.3+json">;
|
|
305
305
|
}, z.core.$strict>;
|
|
306
306
|
}, z.core.$strict>;
|
|
307
307
|
export type DistributionImageEvidenceSet = z.infer<typeof DistributionImageEvidenceSetSchema>;
|
|
308
|
+
export declare const EVIDENCE_CHANNELS: readonly ["release", "develop"];
|
|
309
|
+
export type EvidenceChannel = (typeof EVIDENCE_CHANNELS)[number];
|
|
310
|
+
export declare const EVIDENCE_CHANNEL_REFS: {
|
|
311
|
+
readonly release: "refs/heads/main";
|
|
312
|
+
readonly develop: "refs/heads/develop";
|
|
313
|
+
};
|
|
308
314
|
export declare const SigstoreIdentityPolicySchema: z.ZodObject<{
|
|
309
315
|
policyId: z.ZodString;
|
|
316
|
+
channel: z.ZodEnum<{
|
|
317
|
+
release: "release";
|
|
318
|
+
develop: "develop";
|
|
319
|
+
}>;
|
|
310
320
|
predicateTypes: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
311
321
|
certificateIdentity: z.ZodString;
|
|
312
322
|
oidcIssuer: z.ZodString;
|
|
313
|
-
githubWorkflow: z.
|
|
323
|
+
githubWorkflow: z.ZodObject<{
|
|
314
324
|
repository: z.ZodString;
|
|
315
325
|
ref: z.ZodString;
|
|
316
326
|
path: z.ZodString;
|
|
317
|
-
}, z.core.$strict
|
|
327
|
+
}, z.core.$strict>;
|
|
318
328
|
imageProducer: z.ZodOptional<z.ZodObject<{
|
|
319
329
|
builderIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
320
330
|
buildTypes: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
321
|
-
buildDefinitionDigests: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString
|
|
322
|
-
parametersDigests: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString
|
|
331
|
+
buildDefinitionDigests: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>>>>;
|
|
332
|
+
parametersDigests: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>>>>;
|
|
323
333
|
manifestMediaTypes: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
324
334
|
"application/vnd.oci.image.index.v1+json": "application/vnd.oci.image.index.v1+json";
|
|
325
335
|
"application/vnd.oci.image.manifest.v1+json": "application/vnd.oci.image.manifest.v1+json";
|
|
326
336
|
}>>>;
|
|
327
337
|
}, z.core.$strict>>;
|
|
328
|
-
|
|
338
|
+
imageRepositories: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
329
339
|
}, z.core.$strict>;
|
|
330
340
|
export declare const SigstoreOfflineTrustPolicySchema: z.ZodObject<{
|
|
331
341
|
schemaVersion: z.ZodLiteral<1>;
|
|
332
342
|
trustedRootPath: z.ZodString;
|
|
333
|
-
trustedRootDigest: z.ZodString
|
|
343
|
+
trustedRootDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
334
344
|
cosignVersion: z.ZodString;
|
|
335
|
-
trustedCosignBinaryDigests: z.ZodReadonly<z.ZodArray<z.ZodString
|
|
345
|
+
trustedCosignBinaryDigests: z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>>>;
|
|
336
346
|
gitVersion: z.ZodString;
|
|
337
|
-
trustedGitBinaryDigests: z.ZodReadonly<z.ZodArray<z.ZodString
|
|
347
|
+
trustedGitBinaryDigests: z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>>>;
|
|
338
348
|
maxProducerTtlSeconds: z.ZodNumber;
|
|
339
349
|
maxCompletenessTtlSeconds: z.ZodNumber;
|
|
340
350
|
maxEntitlementTtlSeconds: z.ZodNumber;
|
|
341
351
|
policies: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
342
352
|
policyId: z.ZodString;
|
|
353
|
+
channel: z.ZodEnum<{
|
|
354
|
+
release: "release";
|
|
355
|
+
develop: "develop";
|
|
356
|
+
}>;
|
|
343
357
|
predicateTypes: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
344
358
|
certificateIdentity: z.ZodString;
|
|
345
359
|
oidcIssuer: z.ZodString;
|
|
346
|
-
githubWorkflow: z.
|
|
360
|
+
githubWorkflow: z.ZodObject<{
|
|
347
361
|
repository: z.ZodString;
|
|
348
362
|
ref: z.ZodString;
|
|
349
363
|
path: z.ZodString;
|
|
350
|
-
}, z.core.$strict
|
|
364
|
+
}, z.core.$strict>;
|
|
351
365
|
imageProducer: z.ZodOptional<z.ZodObject<{
|
|
352
366
|
builderIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
353
367
|
buildTypes: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
354
|
-
buildDefinitionDigests: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString
|
|
355
|
-
parametersDigests: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString
|
|
368
|
+
buildDefinitionDigests: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>>>>;
|
|
369
|
+
parametersDigests: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>>>>;
|
|
356
370
|
manifestMediaTypes: z.ZodReadonly<z.ZodArray<z.ZodEnum<{
|
|
357
371
|
"application/vnd.oci.image.index.v1+json": "application/vnd.oci.image.index.v1+json";
|
|
358
372
|
"application/vnd.oci.image.manifest.v1+json": "application/vnd.oci.image.manifest.v1+json";
|
|
359
373
|
}>>>;
|
|
360
374
|
}, z.core.$strict>>;
|
|
361
|
-
|
|
375
|
+
imageRepositories: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
|
|
362
376
|
}, z.core.$strict>>>;
|
|
363
377
|
}, z.core.$strict>;
|
|
364
378
|
export declare const DistributionImageReplayStateSchema: z.ZodObject<{
|
|
365
379
|
schemaVersion: z.ZodLiteral<1>;
|
|
366
380
|
distributionId: z.ZodString;
|
|
367
|
-
trustPolicyDigest: z.ZodString
|
|
381
|
+
trustPolicyDigest: z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>;
|
|
368
382
|
lastReleaseSequence: z.ZodNumber;
|
|
369
|
-
lastCompletenessStatementDigest: z.ZodNullable<z.ZodString
|
|
383
|
+
lastCompletenessStatementDigest: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<import("./kernel-contract-authority").OciDigest, string>>>;
|
|
370
384
|
lastCompletenessNonce: z.ZodNullable<z.ZodString>;
|
|
371
385
|
}, z.core.$strict>;
|
|
372
386
|
export type DistributionImageReplayState = z.infer<typeof DistributionImageReplayStateSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-producer-evidence.d.ts","sourceRoot":"","sources":["../../../src/distribution/lib/image-producer-evidence.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,wBAAwB,EAExB,uBAAuB,EACxB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"image-producer-evidence.d.ts","sourceRoot":"","sources":["../../../src/distribution/lib/image-producer-evidence.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DistributionImageReplayStateSchema = exports.SigstoreOfflineTrustPolicySchema = exports.SigstoreIdentityPolicySchema = exports.DistributionImageEvidenceSetSchema = exports.SigstoreEvidenceDescriptorSchema = exports.ImageDeliveryEntitlementStatementSchema = exports.ImageDeliveryEntitlementPredicateSchema = exports.IMAGE_DELIVERY_ENTITLEMENT_PREDICATE_TYPE = exports.ImageDeliveryMode = exports.DistributionImagesStatementSchema = exports.DistributionImagesPredicateSchema = exports.DISTRIBUTION_IMAGES_PREDICATE_TYPE = exports.ImageProducerStatementSchema = exports.IMAGE_PRODUCER_PREDICATE_TYPE = exports.ImageProducerPredicateSchema = exports.ImageProducerRunSchema = exports.ImageProducerArtifactSchema = exports.ImageProducerBuildSchema = exports.ImageProducerSourceSchema = exports.ImageProducerPlatformSchema = exports.InTotoSubjectSchema = void 0;
|
|
3
|
+
exports.DistributionImageReplayStateSchema = exports.SigstoreOfflineTrustPolicySchema = exports.SigstoreIdentityPolicySchema = exports.EVIDENCE_CHANNEL_REFS = exports.EVIDENCE_CHANNELS = exports.DistributionImageEvidenceSetSchema = exports.SigstoreEvidenceDescriptorSchema = exports.ImageDeliveryEntitlementStatementSchema = exports.ImageDeliveryEntitlementPredicateSchema = exports.IMAGE_DELIVERY_ENTITLEMENT_PREDICATE_TYPE = exports.ImageDeliveryMode = exports.DistributionImagesStatementSchema = exports.DistributionImagesPredicateSchema = exports.DISTRIBUTION_IMAGES_PREDICATE_TYPE = exports.ImageProducerStatementSchema = exports.IMAGE_PRODUCER_PREDICATE_TYPE = exports.ImageProducerPredicateSchema = exports.ImageProducerRunSchema = exports.ImageProducerArtifactSchema = exports.ImageProducerBuildSchema = exports.ImageProducerSourceSchema = exports.ImageProducerPlatformSchema = exports.InTotoSubjectSchema = void 0;
|
|
4
4
|
exports.parseImageProducerStatement = parseImageProducerStatement;
|
|
5
5
|
exports.parseDistributionImagesStatement = parseDistributionImagesStatement;
|
|
6
6
|
exports.parseImageDeliveryEntitlementStatement = parseImageDeliveryEntitlementStatement;
|
|
@@ -10,8 +10,7 @@ exports.parseDistributionImageReplayState = parseDistributionImageReplayState;
|
|
|
10
10
|
const zod_1 = require("zod");
|
|
11
11
|
const image_lock_1 = require("./image-lock");
|
|
12
12
|
const kernel_contract_authority_1 = require("./kernel-contract-authority");
|
|
13
|
-
const
|
|
14
|
-
const Sha256DigestSchema = zod_1.z.string().regex(/^sha256:[a-f0-9]{64}$/);
|
|
13
|
+
const content_address_1 = require("../../content-address");
|
|
15
14
|
const GitCommitSchema = zod_1.z.string().regex(/^[a-f0-9]{40}$/);
|
|
16
15
|
const Rfc3339Schema = zod_1.z.string().datetime({ offset: true });
|
|
17
16
|
const CanonicalIdentifierSchema = zod_1.z
|
|
@@ -31,7 +30,7 @@ exports.InTotoSubjectSchema = zod_1.z
|
|
|
31
30
|
name: zod_1.z.string().min(1),
|
|
32
31
|
digest: zod_1.z
|
|
33
32
|
.object({
|
|
34
|
-
sha256: Sha256HexSchema,
|
|
33
|
+
sha256: content_address_1.Sha256HexSchema,
|
|
35
34
|
})
|
|
36
35
|
.strict(),
|
|
37
36
|
})
|
|
@@ -39,7 +38,7 @@ exports.InTotoSubjectSchema = zod_1.z
|
|
|
39
38
|
exports.ImageProducerPlatformSchema = zod_1.z
|
|
40
39
|
.object({
|
|
41
40
|
...image_lock_1.RuntimeImagePlatformSchema.shape,
|
|
42
|
-
manifestDigest:
|
|
41
|
+
manifestDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
43
42
|
})
|
|
44
43
|
.strict();
|
|
45
44
|
exports.ImageProducerSourceSchema = zod_1.z
|
|
@@ -50,39 +49,39 @@ exports.ImageProducerSourceSchema = zod_1.z
|
|
|
50
49
|
repo: CanonicalRelativePathSchema,
|
|
51
50
|
path: CanonicalRelativePathSchema,
|
|
52
51
|
sourceCommit: GitCommitSchema,
|
|
53
|
-
sourceManifestHash:
|
|
52
|
+
sourceManifestHash: kernel_contract_authority_1.BiomeSourceManifestHashSchema,
|
|
54
53
|
sourceHashAlgorithm: zod_1.z.union([
|
|
55
54
|
zod_1.z.literal(image_lock_1.ImageSourceHashAlgorithm.ImageInputV1),
|
|
56
55
|
zod_1.z.literal(image_lock_1.ImageSourceHashAlgorithm.ImageInputV2),
|
|
57
56
|
zod_1.z.literal(image_lock_1.ImageSourceHashAlgorithm.ImageInputV3),
|
|
58
57
|
]),
|
|
59
|
-
sourceTreeHash: Sha256HexSchema,
|
|
58
|
+
sourceTreeHash: content_address_1.Sha256HexSchema,
|
|
60
59
|
})
|
|
61
60
|
.strict();
|
|
62
61
|
exports.ImageProducerBuildSchema = zod_1.z
|
|
63
62
|
.object({
|
|
64
63
|
builderId: zod_1.z.string().url(),
|
|
65
64
|
buildType: zod_1.z.string().url(),
|
|
66
|
-
buildDefinitionDigest:
|
|
67
|
-
parametersDigest:
|
|
65
|
+
buildDefinitionDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
66
|
+
parametersDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
68
67
|
platforms: zod_1.z.array(exports.ImageProducerPlatformSchema).min(1).readonly(),
|
|
69
68
|
})
|
|
70
69
|
.strict();
|
|
71
70
|
exports.ImageProducerArtifactSchema = zod_1.z
|
|
72
71
|
.object({
|
|
73
72
|
imageRepository: zod_1.z.string().min(1),
|
|
74
|
-
manifestDigest:
|
|
73
|
+
manifestDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
75
74
|
manifestMediaType: zod_1.z.string().min(1),
|
|
76
75
|
sbom: zod_1.z
|
|
77
76
|
.object({
|
|
78
77
|
predicateType: zod_1.z.literal('https://spdx.dev/Document'),
|
|
79
|
-
digest:
|
|
78
|
+
digest: kernel_contract_authority_1.OciDigestSchema,
|
|
80
79
|
})
|
|
81
80
|
.strict(),
|
|
82
81
|
provenance: zod_1.z
|
|
83
82
|
.object({
|
|
84
83
|
predicateType: zod_1.z.literal('https://slsa.dev/provenance/v1'),
|
|
85
|
-
digest:
|
|
84
|
+
digest: kernel_contract_authority_1.OciDigestSchema,
|
|
86
85
|
})
|
|
87
86
|
.strict(),
|
|
88
87
|
})
|
|
@@ -121,8 +120,8 @@ exports.DistributionImagesPredicateSchema = zod_1.z
|
|
|
121
120
|
.object({
|
|
122
121
|
schemaVersion: zod_1.z.literal(1),
|
|
123
122
|
distributionId: CanonicalIdentifierSchema,
|
|
124
|
-
distributionInputHash: Sha256HexSchema,
|
|
125
|
-
normalizedImageLockDigest:
|
|
123
|
+
distributionInputHash: content_address_1.Sha256HexSchema,
|
|
124
|
+
normalizedImageLockDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
126
125
|
releaseSequence: zod_1.z.number().int().nonnegative(),
|
|
127
126
|
releaseSourceCommit: GitCommitSchema,
|
|
128
127
|
runId: CanonicalIdentifierSchema,
|
|
@@ -136,9 +135,9 @@ exports.DistributionImagesPredicateSchema = zod_1.z
|
|
|
136
135
|
subjectKind: zod_1.z.nativeEnum(image_lock_1.RuntimeImageSubjectKind),
|
|
137
136
|
subjectId: CanonicalIdentifierSchema,
|
|
138
137
|
imageRepository: zod_1.z.string().min(1),
|
|
139
|
-
manifestDigest:
|
|
140
|
-
producerStatementDigest:
|
|
141
|
-
producerBundleDigest:
|
|
138
|
+
manifestDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
139
|
+
producerStatementDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
140
|
+
producerBundleDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
142
141
|
})
|
|
143
142
|
.strict())
|
|
144
143
|
.min(1)
|
|
@@ -196,7 +195,7 @@ exports.ImageDeliveryEntitlementPredicateSchema = zod_1.z
|
|
|
196
195
|
schemaVersion: zod_1.z.literal(1),
|
|
197
196
|
customerId: CanonicalIdentifierSchema,
|
|
198
197
|
distributionId: CanonicalIdentifierSchema,
|
|
199
|
-
distributionStatementDigest:
|
|
198
|
+
distributionStatementDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
200
199
|
mode: zod_1.z.nativeEnum(ImageDeliveryMode),
|
|
201
200
|
targetRegistry: CanonicalRegistryAuthoritySchema.nullable(),
|
|
202
201
|
nonce: zod_1.z.string().regex(/^[a-zA-Z0-9_-]{22,128}$/),
|
|
@@ -234,9 +233,9 @@ exports.ImageDeliveryEntitlementStatementSchema = zod_1.z
|
|
|
234
233
|
exports.SigstoreEvidenceDescriptorSchema = zod_1.z
|
|
235
234
|
.object({
|
|
236
235
|
statementPath: CanonicalRelativePathSchema,
|
|
237
|
-
statementDigest:
|
|
236
|
+
statementDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
238
237
|
bundlePath: CanonicalRelativePathSchema,
|
|
239
|
-
bundleDigest:
|
|
238
|
+
bundleDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
240
239
|
bundleMediaType: zod_1.z.literal('application/vnd.dev.sigstore.bundle.v0.3+json'),
|
|
241
240
|
})
|
|
242
241
|
.strict();
|
|
@@ -298,9 +297,15 @@ exports.DistributionImageEvidenceSetSchema = zod_1.z
|
|
|
298
297
|
}
|
|
299
298
|
}
|
|
300
299
|
});
|
|
300
|
+
exports.EVIDENCE_CHANNELS = ['release', 'develop'];
|
|
301
|
+
exports.EVIDENCE_CHANNEL_REFS = {
|
|
302
|
+
release: 'refs/heads/main',
|
|
303
|
+
develop: 'refs/heads/develop',
|
|
304
|
+
};
|
|
301
305
|
exports.SigstoreIdentityPolicySchema = zod_1.z
|
|
302
306
|
.object({
|
|
303
307
|
policyId: CanonicalIdentifierSchema,
|
|
308
|
+
channel: zod_1.z.enum(exports.EVIDENCE_CHANNELS),
|
|
304
309
|
predicateTypes: zod_1.z.array(zod_1.z.string().url()).min(1).readonly(),
|
|
305
310
|
certificateIdentity: zod_1.z.string().url(),
|
|
306
311
|
oidcIssuer: zod_1.z.string().url(),
|
|
@@ -310,19 +315,18 @@ exports.SigstoreIdentityPolicySchema = zod_1.z
|
|
|
310
315
|
ref: zod_1.z.string().regex(/^refs\/(?:heads|tags)\/.+$/),
|
|
311
316
|
path: CanonicalRelativePathSchema,
|
|
312
317
|
})
|
|
313
|
-
.strict()
|
|
314
|
-
.optional(),
|
|
318
|
+
.strict(),
|
|
315
319
|
imageProducer: zod_1.z
|
|
316
320
|
.object({
|
|
317
321
|
builderIds: zod_1.z.array(zod_1.z.string().url()).min(1).readonly(),
|
|
318
322
|
buildTypes: zod_1.z.array(zod_1.z.string().url()).min(1).readonly(),
|
|
319
323
|
buildDefinitionDigests: zod_1.z
|
|
320
|
-
.array(
|
|
324
|
+
.array(kernel_contract_authority_1.OciDigestSchema)
|
|
321
325
|
.min(1)
|
|
322
326
|
.readonly()
|
|
323
327
|
.optional(),
|
|
324
328
|
parametersDigests: zod_1.z
|
|
325
|
-
.array(
|
|
329
|
+
.array(kernel_contract_authority_1.OciDigestSchema)
|
|
326
330
|
.min(1)
|
|
327
331
|
.readonly()
|
|
328
332
|
.optional(),
|
|
@@ -336,25 +340,31 @@ exports.SigstoreIdentityPolicySchema = zod_1.z
|
|
|
336
340
|
})
|
|
337
341
|
.strict()
|
|
338
342
|
.optional(),
|
|
339
|
-
|
|
343
|
+
imageRepositories: zod_1.z
|
|
340
344
|
.array(zod_1.z
|
|
341
345
|
.string()
|
|
342
|
-
.regex(/^[a-z0-9.-]+(?::[1-9]\d{0,4})?\/(?:[a-z0-9._-]+\/)
|
|
346
|
+
.regex(/^[a-z0-9.-]+(?::[1-9]\d{0,4})?\/(?:[a-z0-9._-]+\/)*[a-z0-9._-]+$/, 'must be an exact canonical lowercase OCI repository without a trailing "/"'))
|
|
343
347
|
.min(1)
|
|
344
|
-
.readonly()
|
|
348
|
+
.readonly()
|
|
349
|
+
.optional(),
|
|
345
350
|
})
|
|
346
351
|
.strict()
|
|
347
352
|
.superRefine((value, context) => {
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
353
|
+
const expectedIdentity = `https://github.com/${value.githubWorkflow.repository}/` +
|
|
354
|
+
`${value.githubWorkflow.path}@${value.githubWorkflow.ref}`;
|
|
355
|
+
if (value.certificateIdentity !== expectedIdentity) {
|
|
356
|
+
context.addIssue({
|
|
357
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
358
|
+
path: ['certificateIdentity'],
|
|
359
|
+
message: 'must exactly match githubWorkflow repository, path, and ref',
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
if (value.githubWorkflow.ref !== exports.EVIDENCE_CHANNEL_REFS[value.channel]) {
|
|
363
|
+
context.addIssue({
|
|
364
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
365
|
+
path: ['githubWorkflow', 'ref'],
|
|
366
|
+
message: `must equal ${exports.EVIDENCE_CHANNEL_REFS[value.channel]} for channel "${value.channel}"`,
|
|
367
|
+
});
|
|
358
368
|
}
|
|
359
369
|
const signsProducerEvidence = value.predicateTypes.includes(exports.IMAGE_PRODUCER_PREDICATE_TYPE);
|
|
360
370
|
if (signsProducerEvidence !== (value.imageProducer !== undefined)) {
|
|
@@ -364,25 +374,39 @@ exports.SigstoreIdentityPolicySchema = zod_1.z
|
|
|
364
374
|
message: 'is required exactly when predicateTypes includes image-producer evidence',
|
|
365
375
|
});
|
|
366
376
|
}
|
|
367
|
-
|
|
368
|
-
if ((signsProducerEvidence || signsDistributionCompleteness) &&
|
|
369
|
-
value.githubWorkflow === undefined) {
|
|
377
|
+
if (signsProducerEvidence !== (value.imageRepositories !== undefined)) {
|
|
370
378
|
context.addIssue({
|
|
371
379
|
code: zod_1.z.ZodIssueCode.custom,
|
|
372
|
-
path: ['
|
|
373
|
-
message: 'is required
|
|
380
|
+
path: ['imageRepositories'],
|
|
381
|
+
message: 'is required exactly when predicateTypes includes image-producer evidence',
|
|
374
382
|
});
|
|
375
383
|
}
|
|
384
|
+
if (value.imageRepositories !== undefined) {
|
|
385
|
+
const seen = new Map();
|
|
386
|
+
for (const [index, repository] of value.imageRepositories.entries()) {
|
|
387
|
+
const incumbent = seen.get(repository);
|
|
388
|
+
if (incumbent !== undefined) {
|
|
389
|
+
context.addIssue({
|
|
390
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
391
|
+
path: ['imageRepositories', index],
|
|
392
|
+
message: `duplicates imageRepositories[${incumbent}] "${repository}"`,
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
else {
|
|
396
|
+
seen.set(repository, index);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
376
400
|
});
|
|
377
401
|
exports.SigstoreOfflineTrustPolicySchema = zod_1.z
|
|
378
402
|
.object({
|
|
379
403
|
schemaVersion: zod_1.z.literal(1),
|
|
380
404
|
trustedRootPath: CanonicalRelativePathSchema,
|
|
381
|
-
trustedRootDigest:
|
|
405
|
+
trustedRootDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
382
406
|
cosignVersion: zod_1.z.string().regex(/^v\d+\.\d+\.\d+$/),
|
|
383
|
-
trustedCosignBinaryDigests: zod_1.z.array(
|
|
407
|
+
trustedCosignBinaryDigests: zod_1.z.array(kernel_contract_authority_1.OciDigestSchema).readonly(),
|
|
384
408
|
gitVersion: zod_1.z.string().regex(/^\d+\.\d+\.\d+$/),
|
|
385
|
-
trustedGitBinaryDigests: zod_1.z.array(
|
|
409
|
+
trustedGitBinaryDigests: zod_1.z.array(kernel_contract_authority_1.OciDigestSchema).readonly(),
|
|
386
410
|
maxProducerTtlSeconds: zod_1.z.number().int().positive(),
|
|
387
411
|
maxCompletenessTtlSeconds: zod_1.z.number().int().positive(),
|
|
388
412
|
maxEntitlementTtlSeconds: zod_1.z.number().int().positive(),
|
|
@@ -409,9 +433,9 @@ exports.DistributionImageReplayStateSchema = zod_1.z
|
|
|
409
433
|
.object({
|
|
410
434
|
schemaVersion: zod_1.z.literal(1),
|
|
411
435
|
distributionId: CanonicalIdentifierSchema,
|
|
412
|
-
trustPolicyDigest:
|
|
436
|
+
trustPolicyDigest: kernel_contract_authority_1.OciDigestSchema,
|
|
413
437
|
lastReleaseSequence: zod_1.z.number().int().min(-1),
|
|
414
|
-
lastCompletenessStatementDigest:
|
|
438
|
+
lastCompletenessStatementDigest: kernel_contract_authority_1.OciDigestSchema.nullable(),
|
|
415
439
|
lastCompletenessNonce: zod_1.z
|
|
416
440
|
.string()
|
|
417
441
|
.regex(/^[a-zA-Z0-9_-]{22,128}$/)
|