@blamejs/pki 0.7.5 → 0.7.6

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/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ All notable changes to `@blamejs/pki` are documented here. The format
4
4
  follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this
5
5
  project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## v0.7.6 — 2026-09-10
8
+
9
+ A Sigstore bundle is held to the shape its specification states, in signature count and in entry count.
10
+
11
+ ### Changed
12
+
13
+ - A bundle offering more than 32 transparency-log entries is refused with sigstore/bad-bundle, naming the count it offered. Each entry a bundle offers can cost a certification-path validation, since an entry is tried until one passes every check that depends on which entry it is, and the validation instant comes from the entry itself unless the caller pins opts.time. Nothing bounded the count: the 1 MiB bundle budget leaves room for roughly 155 entries, and every bundle in the Sigstore conformance suite carries exactly one. The ceiling is a local resource bound rather than a rule the specification states, and it is checked before any entry is read. It is available as pki.C.LIMITS.TLOG_MAX_COUNT.
14
+
15
+ ### Fixed
16
+
17
+ - A DSSE envelope carrying more than one signature is refused with sigstore/bad-dsse, naming the count it carried. The Sigstore bundle specification states the rule on the producer, that an envelope in a bundle has exactly one signature, and again on the verifier, that a client rejects an envelope whose signature count is not one. Only the first signature was ever read, so an envelope with a second was accepted and returned a verdict that said nothing about it. An envelope with exactly one is unaffected, and an empty signature list keeps the refusal it already had.
18
+
7
19
  ## v0.7.5 — 2026-09-10
8
20
 
9
21
  Certificate linting now covers the ML-DSA and SLH-DSA certificate profiles.
package/lib/constants.js CHANGED
@@ -128,6 +128,7 @@ var LIMITS = Object.assign(Object.create(null), {
128
128
  CBOR_MAX_ITEMS: 1000000,
129
129
  SCT_MAX_BYTES: BYTES.kib(64) + 1,
130
130
  SCT_MAX_COUNT: 256,
131
+ TLOG_MAX_COUNT: 32,
131
132
  CMS_MAX_KARI_ENCRYPTED_KEYS: 64,
132
133
  CMP_KEM_MAX_KEY_BYTES: 1024,
133
134
  CMP_KEM_MIN_KEY_BYTES: 20,
package/lib/sigstore.js CHANGED
@@ -290,6 +290,13 @@ function parseBundle(input) {
290
290
  !d.signatures[0] || typeof d.signatures[0] !== "object" || typeof d.signatures[0].sig !== "string") {
291
291
  throw _err("sigstore/bad-dsse", "the DSSE envelope is missing a required field (payload / payloadType / signatures[].sig)");
292
292
  }
293
+ /** @internal The bundle specification states this on the producer and again on the verifier: an
294
+ * envelope in a bundle carries exactly one signature, and a verifier rejects one whose count is
295
+ * not one. Only `signatures[0]` is ever read, so admitting a second would return a verdict that
296
+ * says nothing about content the envelope carries. */
297
+ if (d.signatures.length !== 1) {
298
+ throw _err("sigstore/bad-dsse", "a bundle's DSSE envelope carries exactly one signature; this one carries " + d.signatures.length);
299
+ }
293
300
  return obj;
294
301
  }
295
302
 
@@ -1263,6 +1270,15 @@ async function verifyBundle(bundle, opts) {
1263
1270
 
1264
1271
  var tlogs = _isArray(vm.tlogEntries) ? vm.tlogEntries : [];
1265
1272
  if (!tlogs.length) throw _err("sigstore/bad-bundle", "a keyless bundle requires at least one transparency-log entry");
1273
+ /** @internal An entry is tried until one passes every check that depends on which entry it is,
1274
+ * and those checks include a certification-path validation whose instant comes from the entry
1275
+ * itself unless the caller pins one. The count is therefore a work multiplier, and the byte
1276
+ * budget alone leaves room for far more entries than any real bundle carries. This is a local
1277
+ * resource bound rather than a rule the bundle specification states. */
1278
+ if (tlogs.length > C.LIMITS.TLOG_MAX_COUNT) {
1279
+ throw _err("sigstore/bad-bundle", "a bundle offers at most " + C.LIMITS.TLOG_MAX_COUNT
1280
+ + " transparency-log entries; this one offers " + tlogs.length);
1281
+ }
1266
1282
  /** @internal Selecting an entry means finding one that passes EVERY check deciding WHICH entry it
1267
1283
  * is: that it binds to this signature and certificate, that it records this artifact, and that the
1268
1284
  * certificate chain and the embedded timestamps hold at the instant it attests. Any of those
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blamejs/pki",
3
- "version": "0.7.5",
3
+ "version": "0.7.6",
4
4
  "description": "Pure-JavaScript PKI toolkit that owns its stack — X.509, ASN.1/DER, CMS, PQC-first.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "blamejs contributors",
package/sbom.cdx.json CHANGED
@@ -2,10 +2,10 @@
2
2
  "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json",
3
3
  "bomFormat": "CycloneDX",
4
4
  "specVersion": "1.5",
5
- "serialNumber": "urn:uuid:b846e4fa-afc9-4ee9-9405-9ab995704bfd",
5
+ "serialNumber": "urn:uuid:8551b89b-6716-4eab-914a-0a3d1aafe57d",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-09-10T12:11:13.518Z",
8
+ "timestamp": "2026-09-10T12:38:33.413Z",
9
9
  "lifecycles": [
10
10
  {
11
11
  "phase": "build"
@@ -19,14 +19,14 @@
19
19
  }
20
20
  ],
21
21
  "component": {
22
- "bom-ref": "@blamejs/pki@0.7.5",
22
+ "bom-ref": "@blamejs/pki@0.7.6",
23
23
  "type": "application",
24
24
  "name": "pki",
25
- "version": "0.7.5",
25
+ "version": "0.7.6",
26
26
  "scope": "required",
27
27
  "author": "blamejs contributors",
28
28
  "description": "Pure-JavaScript PKI toolkit that owns its stack — X.509, ASN.1/DER, CMS, PQC-first.",
29
- "purl": "pkg:npm/%40blamejs/pki@0.7.5",
29
+ "purl": "pkg:npm/%40blamejs/pki@0.7.6",
30
30
  "properties": [],
31
31
  "externalReferences": [
32
32
  {
@@ -54,7 +54,7 @@
54
54
  "components": [],
55
55
  "dependencies": [
56
56
  {
57
- "ref": "@blamejs/pki@0.7.5",
57
+ "ref": "@blamejs/pki@0.7.6",
58
58
  "dependsOn": []
59
59
  }
60
60
  ]