@xemahq/xema 0.29.0 → 0.29.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.
|
@@ -2119,193 +2119,193 @@
|
|
|
2119
2119
|
},
|
|
2120
2120
|
{
|
|
2121
2121
|
"package": "@xemahq/xema",
|
|
2122
|
-
"version": "0.29.
|
|
2122
|
+
"version": "0.29.1",
|
|
2123
2123
|
"path": "edition/authorization-base.mjs",
|
|
2124
2124
|
"sha256": "sha256:7ded47eadc194ebf11583f77c695bf1708e502c654420564d55be3b599ff770f"
|
|
2125
2125
|
},
|
|
2126
2126
|
{
|
|
2127
2127
|
"package": "@xemahq/xema",
|
|
2128
|
-
"version": "0.29.
|
|
2128
|
+
"version": "0.29.1",
|
|
2129
2129
|
"path": "edition/connector-source-authority.mjs",
|
|
2130
2130
|
"sha256": "sha256:ea94475f4324737673accd7de1303c44db1cbc4dac61a865a06cd83abe310164"
|
|
2131
2131
|
},
|
|
2132
2132
|
{
|
|
2133
2133
|
"package": "@xemahq/xema",
|
|
2134
|
-
"version": "0.29.
|
|
2134
|
+
"version": "0.29.1",
|
|
2135
2135
|
"path": "edition/distribution-paths.mjs",
|
|
2136
2136
|
"sha256": "sha256:d78a5c8405bc6c25d36fcec61b0030e1fdacac7d528e698adb96f906f4b70279"
|
|
2137
2137
|
},
|
|
2138
2138
|
{
|
|
2139
2139
|
"package": "@xemahq/xema",
|
|
2140
|
-
"version": "0.29.
|
|
2140
|
+
"version": "0.29.1",
|
|
2141
2141
|
"path": "edition/edition-artifact.mjs",
|
|
2142
2142
|
"sha256": "sha256:161f522eb39e3db705bc709f8512988dd3e6752851d972521354eeccffd8075d"
|
|
2143
2143
|
},
|
|
2144
2144
|
{
|
|
2145
2145
|
"package": "@xemahq/xema",
|
|
2146
|
-
"version": "0.29.
|
|
2146
|
+
"version": "0.29.1",
|
|
2147
2147
|
"path": "edition/edition-channel.mjs",
|
|
2148
2148
|
"sha256": "sha256:9dcd7b09d4fee8c4d43338e4e418619aa3003a612823455310cad6f6c48a19c0"
|
|
2149
2149
|
},
|
|
2150
2150
|
{
|
|
2151
2151
|
"package": "@xemahq/xema",
|
|
2152
|
-
"version": "0.29.
|
|
2152
|
+
"version": "0.29.1",
|
|
2153
2153
|
"path": "edition/edition-chart-set.mjs",
|
|
2154
2154
|
"sha256": "sha256:fbda500315d45e35eb974f4701bbf36729c3b642a5d735bc1b07085c91d25b23"
|
|
2155
2155
|
},
|
|
2156
2156
|
{
|
|
2157
2157
|
"package": "@xemahq/xema",
|
|
2158
|
-
"version": "0.29.
|
|
2158
|
+
"version": "0.29.1",
|
|
2159
2159
|
"path": "edition/edition-config.mjs",
|
|
2160
2160
|
"sha256": "sha256:e3997bd9a0082e02d01760868b2a4f41ed3081e904126b30fdf86e7938dc6137"
|
|
2161
2161
|
},
|
|
2162
2162
|
{
|
|
2163
2163
|
"package": "@xemahq/xema",
|
|
2164
|
-
"version": "0.29.
|
|
2164
|
+
"version": "0.29.1",
|
|
2165
2165
|
"path": "edition/edition-constants.mjs",
|
|
2166
2166
|
"sha256": "sha256:71ae51028847ab3430ffec9b229b0516a7705b75a6de1fcfa665f5e1abf8e9bb"
|
|
2167
2167
|
},
|
|
2168
2168
|
{
|
|
2169
2169
|
"package": "@xemahq/xema",
|
|
2170
|
-
"version": "0.29.
|
|
2170
|
+
"version": "0.29.1",
|
|
2171
2171
|
"path": "edition/edition-contract-parse.mjs",
|
|
2172
2172
|
"sha256": "sha256:c575e96b70bda82899931eb0b18567988e2e13e664fa498bcbef96b571dcabb4"
|
|
2173
2173
|
},
|
|
2174
2174
|
{
|
|
2175
2175
|
"package": "@xemahq/xema",
|
|
2176
|
-
"version": "0.29.
|
|
2176
|
+
"version": "0.29.1",
|
|
2177
2177
|
"path": "edition/edition-contract.json",
|
|
2178
2178
|
"sha256": "sha256:aa1a05f1728813a7bdb1e02d9305e9adf641d695e6767305210c67a1d81b38a7"
|
|
2179
2179
|
},
|
|
2180
2180
|
{
|
|
2181
2181
|
"package": "@xemahq/xema",
|
|
2182
|
-
"version": "0.29.
|
|
2182
|
+
"version": "0.29.1",
|
|
2183
2183
|
"path": "edition/edition-protocol.mjs",
|
|
2184
2184
|
"sha256": "sha256:3a0d53d18718790ac32c92164e373f7f038675a3e9410e5ef3c139affcf42892"
|
|
2185
2185
|
},
|
|
2186
2186
|
{
|
|
2187
2187
|
"package": "@xemahq/xema",
|
|
2188
|
-
"version": "0.29.
|
|
2188
|
+
"version": "0.29.1",
|
|
2189
2189
|
"path": "edition/edition-workspace.mjs",
|
|
2190
2190
|
"sha256": "sha256:a56e0441fc71e7cffa0e5990b219fbb03a7061fc3b5738c8b787b168ccb0d7c6"
|
|
2191
2191
|
},
|
|
2192
2192
|
{
|
|
2193
2193
|
"package": "@xemahq/xema",
|
|
2194
|
-
"version": "0.29.
|
|
2194
|
+
"version": "0.29.1",
|
|
2195
2195
|
"path": "edition/evidence-checkout.mjs",
|
|
2196
2196
|
"sha256": "sha256:31fb669769b31de4c6f2b2501bb96959548172ef166e7568edbbfed7f5079a11"
|
|
2197
2197
|
},
|
|
2198
2198
|
{
|
|
2199
2199
|
"package": "@xemahq/xema",
|
|
2200
|
-
"version": "0.29.
|
|
2200
|
+
"version": "0.29.1",
|
|
2201
2201
|
"path": "edition/evidence-grammars.mjs",
|
|
2202
2202
|
"sha256": "sha256:4dae22b61ade99219a482b971c9780d68a3d37d021e39cdfe860b245364b8b9f"
|
|
2203
2203
|
},
|
|
2204
2204
|
{
|
|
2205
2205
|
"package": "@xemahq/xema",
|
|
2206
|
-
"version": "0.29.
|
|
2206
|
+
"version": "0.29.1",
|
|
2207
2207
|
"path": "edition/evidence-trust-pin.mjs",
|
|
2208
2208
|
"sha256": "sha256:b9dd5c01903394436530783614efb0cd357d982ed2befd844a39328479773cbc"
|
|
2209
2209
|
},
|
|
2210
2210
|
{
|
|
2211
2211
|
"package": "@xemahq/xema",
|
|
2212
|
-
"version": "0.29.
|
|
2212
|
+
"version": "0.29.1",
|
|
2213
2213
|
"path": "edition/image-delivery-entitlement-descriptor.mjs",
|
|
2214
2214
|
"sha256": "sha256:4726b66116f01bf2523fafe2b7a356591eca8fb5ca6bd8b154dd4821873e921b"
|
|
2215
2215
|
},
|
|
2216
2216
|
{
|
|
2217
2217
|
"package": "@xemahq/xema",
|
|
2218
|
-
"version": "0.29.
|
|
2218
|
+
"version": "0.29.1",
|
|
2219
2219
|
"path": "edition/image-evidence-replay-state.mjs",
|
|
2220
2220
|
"sha256": "sha256:eba0cf1d38af0ab2f00c5099fa8bc2edc543136ce92f895544d4d284b3d6af0f"
|
|
2221
2221
|
},
|
|
2222
2222
|
{
|
|
2223
2223
|
"package": "@xemahq/xema",
|
|
2224
|
-
"version": "0.29.
|
|
2224
|
+
"version": "0.29.1",
|
|
2225
2225
|
"path": "edition/image-evidence.mjs",
|
|
2226
2226
|
"sha256": "sha256:93d91065b045092f2e3462ebe1db8cf041d8ecb66eead8da6c59ca8a377c38ea"
|
|
2227
2227
|
},
|
|
2228
2228
|
{
|
|
2229
2229
|
"package": "@xemahq/xema",
|
|
2230
|
-
"version": "0.29.
|
|
2230
|
+
"version": "0.29.1",
|
|
2231
2231
|
"path": "edition/kernel-contract-authority.mjs",
|
|
2232
2232
|
"sha256": "sha256:20abdde62a7b037c01ea9bbe1ff1e6094e6b0efd0add2f656f1938a04409bf82"
|
|
2233
2233
|
},
|
|
2234
2234
|
{
|
|
2235
2235
|
"package": "@xemahq/xema",
|
|
2236
|
-
"version": "0.29.
|
|
2236
|
+
"version": "0.29.1",
|
|
2237
2237
|
"path": "edition/lib.mjs",
|
|
2238
2238
|
"sha256": "sha256:4d5066b0b20906d789f8843010a9aa2c914d09f383dd93259270138ea898bef4"
|
|
2239
2239
|
},
|
|
2240
2240
|
{
|
|
2241
2241
|
"package": "@xemahq/xema",
|
|
2242
|
-
"version": "0.29.
|
|
2242
|
+
"version": "0.29.1",
|
|
2243
2243
|
"path": "edition/no-follow-file.mjs",
|
|
2244
2244
|
"sha256": "sha256:c17bdf5e441f3c079aa06d4b48bbed05cad087855b9ad2a5e6dc43d5ee2b17c3"
|
|
2245
2245
|
},
|
|
2246
2246
|
{
|
|
2247
2247
|
"package": "@xemahq/xema",
|
|
2248
|
-
"version": "0.29.
|
|
2248
|
+
"version": "0.29.1",
|
|
2249
2249
|
"path": "edition/pin-source.mjs",
|
|
2250
2250
|
"sha256": "sha256:4e64d25b7aacec344253d1963f419f946998f36e8c269eea58b8c848e0f35e52"
|
|
2251
2251
|
},
|
|
2252
2252
|
{
|
|
2253
2253
|
"package": "@xemahq/xema",
|
|
2254
|
-
"version": "0.29.
|
|
2254
|
+
"version": "0.29.1",
|
|
2255
2255
|
"path": "edition/source-authority.mjs",
|
|
2256
2256
|
"sha256": "sha256:2351d47a32ee865720a675f1ecd336b00cdce4aa34713219a1aa23920ac7b60f"
|
|
2257
2257
|
},
|
|
2258
2258
|
{
|
|
2259
2259
|
"package": "@xemahq/xema",
|
|
2260
|
-
"version": "0.29.
|
|
2260
|
+
"version": "0.29.1",
|
|
2261
2261
|
"path": "edition/strict-json.mjs",
|
|
2262
2262
|
"sha256": "sha256:f95778396df7f38b086f55d2ec4f3b6644a8aeff2b32282a62829145fb544562"
|
|
2263
2263
|
},
|
|
2264
2264
|
{
|
|
2265
2265
|
"package": "@xemahq/xema",
|
|
2266
|
-
"version": "0.29.
|
|
2266
|
+
"version": "0.29.1",
|
|
2267
2267
|
"path": "edition/string-order.mjs",
|
|
2268
2268
|
"sha256": "sha256:b3210cd273e4b2e01fb8b1a91e28734cd211d4010c080d0ce95f5e5ff631cffb"
|
|
2269
2269
|
},
|
|
2270
2270
|
{
|
|
2271
2271
|
"package": "@xemahq/xema",
|
|
2272
|
-
"version": "0.29.
|
|
2272
|
+
"version": "0.29.1",
|
|
2273
2273
|
"path": "edition/trusted-executable.mjs",
|
|
2274
2274
|
"sha256": "sha256:37d46cdbc999ddd55d4ea8aeed4850ddd1efde89ed7b532f5a2ddec87105d796"
|
|
2275
2275
|
},
|
|
2276
2276
|
{
|
|
2277
2277
|
"package": "@xemahq/xema",
|
|
2278
|
-
"version": "0.29.
|
|
2278
|
+
"version": "0.29.1",
|
|
2279
2279
|
"path": "edition/verifier-binding.mjs",
|
|
2280
2280
|
"sha256": "sha256:80732658617f5255258c538eeb2383331ec8553b44b58d552b567845a7b916aa"
|
|
2281
2281
|
},
|
|
2282
2282
|
{
|
|
2283
2283
|
"package": "@xemahq/xema",
|
|
2284
|
-
"version": "0.29.
|
|
2284
|
+
"version": "0.29.1",
|
|
2285
2285
|
"path": "edition/verifier-files.mjs",
|
|
2286
2286
|
"sha256": "sha256:cdd14a20a63f0f194a8abb55680a5a7e3ced1f09f8b210a90d349e655f6de0c0"
|
|
2287
2287
|
},
|
|
2288
2288
|
{
|
|
2289
2289
|
"package": "@xemahq/xema",
|
|
2290
|
-
"version": "0.29.
|
|
2290
|
+
"version": "0.29.1",
|
|
2291
2291
|
"path": "edition/verifier-provenance.mjs",
|
|
2292
2292
|
"sha256": "sha256:3e2fb8e07cf1f66b8ad6c7ac2555fe3af64ec7abeb07cecbaf1939a18c2b3663"
|
|
2293
2293
|
},
|
|
2294
2294
|
{
|
|
2295
2295
|
"package": "@xemahq/xema",
|
|
2296
|
-
"version": "0.29.
|
|
2296
|
+
"version": "0.29.1",
|
|
2297
2297
|
"path": "edition/verify-image-evidence.mjs",
|
|
2298
2298
|
"sha256": "sha256:b7412ea4609c32cecf8992a4d2db4bf27fbad95b2d26ab1eee10ddbf044d1a0e"
|
|
2299
2299
|
},
|
|
2300
2300
|
{
|
|
2301
2301
|
"package": "@xemahq/xema",
|
|
2302
|
-
"version": "0.29.
|
|
2302
|
+
"version": "0.29.1",
|
|
2303
2303
|
"path": "edition/workspace-sections.mjs",
|
|
2304
2304
|
"sha256": "sha256:058c849767434e9ba911d9310092bede42e3ef959c75bbd35ff8879dc21ce3ff"
|
|
2305
2305
|
},
|
|
2306
2306
|
{
|
|
2307
2307
|
"package": "@xemahq/xema",
|
|
2308
|
-
"version": "0.29.
|
|
2308
|
+
"version": "0.29.1",
|
|
2309
2309
|
"path": "scripts/build-evidence-verifier.mjs",
|
|
2310
2310
|
"sha256": "sha256:decfa7ca6c340e51ddc06f4d30caac8e8e3c060c843c211586efc313dd9ace8e"
|
|
2311
2311
|
},
|
package/edition/oras.mjs
CHANGED
|
@@ -20,8 +20,9 @@
|
|
|
20
20
|
// * before oras ever receives a credential, the registry's own `/v2/`
|
|
21
21
|
// challenge is probed and a token realm on another origin is refused;
|
|
22
22
|
// * a digest-addressed read whose bytes do not hash to the requested digest
|
|
23
|
-
// throws; a tag read
|
|
24
|
-
//
|
|
23
|
+
// throws; a tag read and a digest read are both resolved to the registry's
|
|
24
|
+
// descriptor first, and the manifest media type is the descriptor's, never
|
|
25
|
+
// the manifest body's optional `mediaType` (Helm's has none);
|
|
25
26
|
// * descriptor sizes are checked BEFORE the fetch, actual lengths after it;
|
|
26
27
|
// * a registry status is read only from oras's own error forms; any other
|
|
27
28
|
// failure carries no status and is thrown as undecided;
|
|
@@ -554,11 +555,11 @@ export class OrasRegistry {
|
|
|
554
555
|
}
|
|
555
556
|
|
|
556
557
|
/**
|
|
557
|
-
*
|
|
558
|
-
*
|
|
558
|
+
* The descriptor the registry reports for a manifest reference, refused when
|
|
559
|
+
* its media type is not an accepted manifest type or it declares more than
|
|
560
|
+
* the manifest size cap.
|
|
559
561
|
*/
|
|
560
|
-
async
|
|
561
|
-
const ref = `${this.#ref(repository)}:${tag}`;
|
|
562
|
+
async #manifestDescriptor(ref) {
|
|
562
563
|
const out = await this.#oras(['manifest', 'fetch'], ['--descriptor'], ref);
|
|
563
564
|
const descriptor = this.#parseDescriptor(out, ref);
|
|
564
565
|
if (!ACCEPTED_MANIFEST_MEDIA_TYPES.includes(descriptor.mediaType)) {
|
|
@@ -569,12 +570,33 @@ export class OrasRegistry {
|
|
|
569
570
|
if (descriptor.size > MAX_MANIFEST_BYTES) {
|
|
570
571
|
throw new Error(`${ref} declares ${descriptor.size} bytes, exceeding ${MAX_MANIFEST_BYTES}`);
|
|
571
572
|
}
|
|
573
|
+
return descriptor;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Fetch a manifest by TAG: resolve the descriptor, then read by digest, so the
|
|
578
|
+
* bytes are always hash-checked against what the registry said the tag is.
|
|
579
|
+
*/
|
|
580
|
+
async getManifestByTag(repository, tag) {
|
|
581
|
+
const descriptor = await this.#manifestDescriptor(`${this.#ref(repository)}:${tag}`);
|
|
572
582
|
return this.#manifestByDigest(repository, descriptor.digest, descriptor.mediaType);
|
|
573
583
|
}
|
|
574
584
|
|
|
575
|
-
/**
|
|
585
|
+
/**
|
|
586
|
+
* Fetch a manifest by DIGEST: the media type is the one the registry reports
|
|
587
|
+
* for that digest (a manifest body's own `mediaType` is optional, and Helm's
|
|
588
|
+
* has none), and the bytes must hash to exactly that digest.
|
|
589
|
+
*/
|
|
576
590
|
async getManifestByDigest(repository, digest) {
|
|
577
|
-
|
|
591
|
+
if (!SHA256_DIGEST_PATTERN.test(digest)) {
|
|
592
|
+
throw new Error(`"${digest}" is not a canonical lowercase sha256 digest`);
|
|
593
|
+
}
|
|
594
|
+
const ref = `${this.#ref(repository)}@${digest}`;
|
|
595
|
+
const descriptor = await this.#manifestDescriptor(ref);
|
|
596
|
+
if (descriptor.digest !== digest) {
|
|
597
|
+
throw new Error(`${ref} described ${descriptor.digest}, not the requested ${digest}`);
|
|
598
|
+
}
|
|
599
|
+
return this.#manifestByDigest(repository, digest, descriptor.mediaType);
|
|
578
600
|
}
|
|
579
601
|
|
|
580
602
|
async #manifestByDigest(repository, digest, expectedMediaType) {
|
|
@@ -629,10 +651,10 @@ function decodeManifest(bytes, expectedMediaType, ref) {
|
|
|
629
651
|
if (typeof document !== 'object' || document === null || Array.isArray(document)) {
|
|
630
652
|
throw new Error(`${ref} returned a manifest that is not a JSON object`);
|
|
631
653
|
}
|
|
632
|
-
const mediaType = expectedMediaType
|
|
654
|
+
const mediaType = expectedMediaType;
|
|
633
655
|
if (!ACCEPTED_MANIFEST_MEDIA_TYPES.includes(mediaType)) {
|
|
634
656
|
throw new Error(
|
|
635
|
-
`${ref} returned unsupported manifest media type "${mediaType
|
|
657
|
+
`${ref} returned unsupported manifest media type "${mediaType}"`,
|
|
636
658
|
);
|
|
637
659
|
}
|
|
638
660
|
if (typeof document.mediaType === 'string' && document.mediaType !== mediaType) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xemahq/xema",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.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:82760f14feea4fe0626220e0f71344375964f15d36201d1e7000ebfb6b2e4ecd"
|
|
96
96
|
}
|
|
97
97
|
}
|