@qijenchen/design-system 0.1.0-beta.110 → 0.1.0-beta.111

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.
@@ -3,8 +3,8 @@
3
3
  "schemaVersion": 1,
4
4
  "role": "template-consumer",
5
5
  "release": {
6
- "designSystem": "0.1.0-beta.110",
7
- "storybookConfig": "0.1.0-beta.110"
6
+ "designSystem": "0.1.0-beta.111",
7
+ "storybookConfig": "0.1.0-beta.111"
8
8
  },
9
9
  "upgradeTrust": {
10
10
  "schemaVersion": 1,
@@ -42,10 +42,10 @@
42
42
  "implementationSha256": "98b74118fb5b410b77ad2994aa9105fa7609c7353822f8c5213cce54d94f0af4"
43
43
  },
44
44
  "payload": {
45
- "forkCorpusLockSha256": "aedc7698f22b0762f672bcc7abd005e7ae3e7fa5b74ea659317743504597a634",
45
+ "forkCorpusLockSha256": "1701d6110458eb7b99787f344cd667e44fae966209febe5d08528abeb96fbfb9",
46
46
  "discoveryPolicySha256": "fba289aeeb5a3f11139b9589f7ab08b5e8c8799c7bdf8f0ea57ebfeb8e7c9da6",
47
47
  "providerMaterializersSha256": "732e85b01a12e7dd19469e26e4427f0e0cfe5117a78fc9f69c2f0f89702f463a",
48
- "providerLifecycleSha256": "12d735f89b49b79afdb9580d8dc5e79296aa7d3ca27db9f0639805492c8b94b6",
48
+ "providerLifecycleSha256": "7514e068c425bb0fd0deec81a93a5dcefb48c52d41be5cded39cf1ad9076b49d",
49
49
  "providerInventorySha256": "00adf1c4f6b3367055a9cc3fdfe658660771b4c9931f696e12761a95076ad92c",
50
50
  "executionRuntimeSha256": "d9377cc45308731f287d7b1711b7c38fc4e02ff8f84729bcbbf01bb52d136904",
51
51
  "commonInstructionSha256": "6b9aa8747d9ddc9bd9a78de88a0c3d65f5b100ea917c4dd69be4d889b8299438",
@@ -128,7 +128,7 @@
128
128
  "scripts/sync-exact-workspace-dependencies.mjs": "29ce6aaab16fd7a939eff6e556e8548291fad28df88d578627153c9508bf6e31",
129
129
  "scripts/verify-consumer-css-entry.mjs": "a16545ea8d4f5224d8133f0bb0b68d5489d8e106fe7594488a78e0e5718b99cc",
130
130
  "scripts/verify-upgrade-evidence.mjs": "f4452640d34cb28dbddbca9919f4bc5d3caec7c35879f9e69fd5f6c8485b2ffc",
131
- "scripts/verify-upgrade-provenance.mjs": "1902716115df20d4b8831e7c497abc82f9d3b848a06ca6b7cc1fe64def37a31b",
131
+ "scripts/verify-upgrade-provenance.mjs": "8a643a60eaf64bf131a2a4da197d5670a52e4705d11402b53fb32ae93302f6ef",
132
132
  "scripts/workflow-static-validation.mjs": "8e12bf2d73fc5e1200ddc6cc8437b27433fcd71f7d85d79b56756dcaac667305"
133
133
  }
134
134
  },
@@ -403,23 +403,27 @@ function collectVerifiedPayloads(value, payloads, visited = new Set()) {
403
403
  }
404
404
  }
405
405
 
406
- export function verifiedProvenanceStatement(auditReport, expected) {
406
+ // npm 11.19 `audit signatures --json` emits only the closed `{invalid, missing}`
407
+ // failure sets — there is no `verified` bundle array in the JSON output (the
408
+ // human formatter's "verified" line is CLI-only). The audit report therefore
409
+ // gates registry signature/attestation FAILURES, while the per-package SLSA
410
+ // provenance bundles are read back directly from the canonical registry
411
+ // attestations endpoint and passed in by the caller.
412
+ export function verifiedProvenanceStatement(auditReport, expected, attestationReadback) {
407
413
  if (!auditReport || !Array.isArray(auditReport.invalid) || !Array.isArray(auditReport.missing)) {
408
414
  throw new Error('npm signature audit JSON has an invalid closed result shape')
409
415
  }
410
416
  if (auditReport.invalid.length || auditReport.missing.length) {
411
417
  throw new Error('npm signature audit contains invalid or missing registry evidence')
412
418
  }
413
- if (!Array.isArray(auditReport.verified)) {
414
- throw new Error('npm signature audit lacks --json verified provenance bundles')
419
+ if (attestationReadback?.registry !== 'https://registry.npmjs.org/') {
420
+ throw new Error(`${expected.name}@${expected.version}: attestation readback came from a non-canonical registry`)
415
421
  }
416
- const matches = auditReport.verified.filter((item) => item?.name === expected.name && item?.version === expected.version)
417
- if (matches.length !== 1) throw new Error(`${expected.name}@${expected.version}: expected exactly one verified npm attestation entry`)
418
- if (matches[0].registry !== 'https://registry.npmjs.org/') {
419
- throw new Error(`${expected.name}@${expected.version}: verified attestation came from a non-canonical registry`)
422
+ if (!Array.isArray(attestationReadback.attestations) || attestationReadback.attestations.length === 0) {
423
+ throw new Error(`${expected.name}@${expected.version}: canonical registry returned no attestation bundles`)
420
424
  }
421
425
  const payloads = new Set()
422
- collectVerifiedPayloads(matches[0].attestationBundles, payloads)
426
+ collectVerifiedPayloads(attestationReadback.attestations, payloads)
423
427
  const statements = []
424
428
  for (const payload of payloads) {
425
429
  let statement
@@ -673,6 +677,18 @@ async function fetchOk(fetchImpl, url, options, label) {
673
677
  return response
674
678
  }
675
679
 
680
+ // Canonical-registry attestation readback for one exact package release. npm's
681
+ // own `audit signatures --json` never exposes the verified bundles, so the SLSA
682
+ // provenance statements are read back from the registry attestations endpoint
683
+ // and validated with the same DSSE/predicate closure as before.
684
+ export async function fetchNpmAttestationReadback({ name, version }, { fetchImpl = fetch } = {}) {
685
+ const registry = 'https://registry.npmjs.org/'
686
+ const url = `${registry}-/npm/v1/attestations/${encodeURIComponent(name)}@${encodeURIComponent(version)}`
687
+ const response = await fetchOk(fetchImpl, url, { headers: { Accept: 'application/json' } }, `${name}@${version} npm attestation`)
688
+ const body = await response.json()
689
+ return { registry, attestations: body?.attestations }
690
+ }
691
+
676
692
  export async function resolveImmutableReleaseSnapshot({
677
693
  repository,
678
694
  tag,
@@ -859,7 +875,7 @@ export async function resolveImmutableReleaseSnapshot({
859
875
  }
860
876
  }
861
877
 
862
- export async function verifyUpgradeProvenance({ auditReport, packages, version, policy, releaseLookup = resolveImmutableReleaseSnapshot, ordinaryRelease = false }) {
878
+ export async function verifyUpgradeProvenance({ auditReport, packages, version, policy, releaseLookup = resolveImmutableReleaseSnapshot, ordinaryRelease = false, attestationLookup = fetchNpmAttestationReadback }) {
863
879
  validateUpgradeTrustPolicy(policy)
864
880
  if (!Array.isArray(packages) || packages.length !== policy.upgradePackages.length) {
865
881
  throw new Error('upgrade provenance requires the exact trusted package set')
@@ -879,7 +895,8 @@ export async function verifyUpgradeProvenance({ auditReport, packages, version,
879
895
  })
880
896
  const immutable = validateImmutableReleaseSnapshot({ ...snapshot, packages, version, policy, ordinaryRelease })
881
897
  for (const item of packages) {
882
- const statement = verifiedProvenanceStatement(auditReport, item)
898
+ const attestationReadback = await attestationLookup(item)
899
+ const statement = verifiedProvenanceStatement(auditReport, item, attestationReadback)
883
900
  validateProvenanceStatement(statement, {
884
901
  ...item,
885
902
  repository: policy.repository,
@@ -431,7 +431,7 @@
431
431
  {
432
432
  "schemaVersion": 1,
433
433
  "file": "consumer/managed-files/794bb911ba8ebef58ab0d44a55b9968a19d2c62bcfb310b1ee3a84166f087f21.blob",
434
- "sha256": "1902716115df20d4b8831e7c497abc82f9d3b848a06ca6b7cc1fe64def37a31b",
434
+ "sha256": "8a643a60eaf64bf131a2a4da197d5670a52e4705d11402b53fb32ae93302f6ef",
435
435
  "source": "scripts/verify-upgrade-provenance.mjs",
436
436
  "classification": null,
437
437
  "destination": "scripts/verify-upgrade-provenance.mjs"
@@ -919,7 +919,7 @@
919
919
  {
920
920
  "schemaVersion": 1,
921
921
  "file": "manifest.json",
922
- "sha256": "ead54445e3f603b23077854a2cc030c75cf64d23393a47f7275f1e63613df8e8",
922
+ "sha256": "ec1cc2b6e94de26ad90d38b01f16986d9e1d9af0066719bd2166cc5c6f364a4f",
923
923
  "source": null,
924
924
  "classification": null,
925
925
  "destination": null
@@ -104,20 +104,20 @@
104
104
  },
105
105
  "providerLifecycle": {
106
106
  "schemaVersion": 4,
107
- "releaseVersion": "0.1.0-beta.110",
107
+ "releaseVersion": "0.1.0-beta.111",
108
108
  "immutableHead": {
109
109
  "providerInventorySha256": "86e9d0668cb54ad1bf05c36e78b4aa80417d5f468c929dd3ddcf69c1afbf32e4",
110
- "releaseVersion": "0.1.0-beta.109",
111
- "snapshotSha256": "172fb0f27392b68d6399c5f658cde49e51446f1a9e0094fb359fcf306c3ef161"
110
+ "releaseVersion": "0.1.0-beta.110",
111
+ "snapshotSha256": "b11dad6b99dbfcdf0963a136768bb3d6dda9a746b5500bccdf35d3dacb7b0667"
112
112
  },
113
- "ledgerSha256": "b99b6c6424f880a417446b8e1f08324b60e806fcb05104791d253d115afbb9da",
114
- "previousSnapshotSha256": "172fb0f27392b68d6399c5f658cde49e51446f1a9e0094fb359fcf306c3ef161",
115
- "currentSnapshotSha256": "b11dad6b99dbfcdf0963a136768bb3d6dda9a746b5500bccdf35d3dacb7b0667",
113
+ "ledgerSha256": "870ceb67947449a9963b50e261e457f66b17ab84b4c78984781b63aaadc00488",
114
+ "previousSnapshotSha256": "b11dad6b99dbfcdf0963a136768bb3d6dda9a746b5500bccdf35d3dacb7b0667",
115
+ "currentSnapshotSha256": "185564b0f73305abe0a1604537f20af8cd1f372ca1ac8d9fe062b5c8c226fc00",
116
116
  "currentProviderInventorySha256": "86e9d0668cb54ad1bf05c36e78b4aa80417d5f468c929dd3ddcf69c1afbf32e4",
117
117
  "retiredProviders": [],
118
118
  "currentSnapshot": {
119
- "releaseVersion": "0.1.0-beta.110",
120
- "previousSnapshotSha256": "172fb0f27392b68d6399c5f658cde49e51446f1a9e0094fb359fcf306c3ef161",
119
+ "releaseVersion": "0.1.0-beta.111",
120
+ "previousSnapshotSha256": "b11dad6b99dbfcdf0963a136768bb3d6dda9a746b5500bccdf35d3dacb7b0667",
121
121
  "providers": [
122
122
  {
123
123
  "id": "claude",
@@ -193,8 +193,8 @@
193
193
  "retiredProviders": []
194
194
  },
195
195
  "immutableHeadSnapshot": {
196
- "releaseVersion": "0.1.0-beta.109",
197
- "previousSnapshotSha256": "f00be4d7d86479e34e595d5e6e224b6fa34176303b92fa083eeada9d6ac87a26",
196
+ "releaseVersion": "0.1.0-beta.110",
197
+ "previousSnapshotSha256": "172fb0f27392b68d6399c5f658cde49e51446f1a9e0094fb359fcf306c3ef161",
198
198
  "providers": [
199
199
  {
200
200
  "id": "claude",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "git+https://github.com/ajenchen/design-system.git"
6
6
  },
7
- "version": "0.1.0-beta.110",
7
+ "version": "0.1.0-beta.111",
8
8
  "private": false,
9
9
  "description": "World-class design system — components, patterns, tokens, hooks (single source of truth for team distribution).",
10
10
  "type": "module",