@blamejs/core 0.15.31 → 0.15.32

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
@@ -8,6 +8,8 @@ upgrading across more than a few patches at a time.
8
8
 
9
9
  ## v0.15.x
10
10
 
11
+ - v0.15.32 (2026-06-26) — **Internal test-suite hardening only — the published library's runtime behavior and public API are unchanged (source-comment marker text aside).** Three more suppression classes in the codebase-patterns guard suite were re-verified from scratch and renamed to descriptive tokens, with their old names recorded as retired so the prior approval cannot be silently resurrected and their in-source marker comments updated to match. No runtime code, public API, or wire format changed. **Detectors:** *Three more suppression-marker classes re-verified and their tokens retired* — Continuing the re-verification pass: each marked site for the process-exit, hand-rolled buffer-collect, and raw-outbound-http guard classes was re-read and confirmed (operator-opt-in exits; bounded protocol-framing / TLV assembly; framework-routed outbound calls), then the class was renamed to a descriptive token and its old name added to the retired-token set. This is test-suite tooling; no shipped framework behavior changed.
12
+
11
13
  - v0.15.31 (2026-06-26) — **Internal test-suite hardening only — the published library's runtime behavior and public API are unchanged (source-comment marker text aside).** The codebase-patterns guard suite gains a gate that retires a renamed suppression-marker token: once a suppression class is re-verified and renamed, its old token cannot be silently re-registered, so a later suppression has to be re-examined under the new name instead of inheriting a stale approval. Eight suppression classes were re-verified and renamed to descriptive tokens this release, and their in-source marker comments were updated to match. No runtime code, public API, or wire format changed. **Detectors:** *Re-verification gate retires a renamed suppression-marker token* — A new guard refuses to re-register a retired suppression-marker token, and the orphan check points a stale marker at its current name. When a suppression class is re-verified, it is renamed to a descriptive token and the old name is recorded as retired, so the old approval cannot be quietly resurrected — a future suppression must be re-examined and re-stamped under the new name. This is test-suite tooling; no shipped framework behavior changed.
12
14
 
13
15
  - v0.15.30 (2026-06-26) — **Importing the webhook module for inbound signature verification no longer pulls the Node HTTP client (or its `node:http` / `node:https` / `node:http2` chain), so `b.webhook.verify` runs in a Worker / edge runtime when the module is imported directly.** lib/webhook and its delivery store eagerly required the outbound HTTP client at module load — directly, and transitively through the persistence-backed dispatcher — so importing the webhook module threw in a Cloudflare Workers / edge runtime that has no node:http / node:net / node:tls, even though b.webhook.verify needs only HMAC-SHA-256 and a timing-safe compare. The HTTP client and the SQL-backed dispatcher are now resolved lazily, only on the outbound send / dispatch paths; importing the module for inbound verification loads no Node networking module. Verified by asserting no networking builtin appears in process.moduleLoadList on the verify path. The framework's aggregate entry point still initializes the networking stack eagerly, so the edge verify path is the webhook module imported directly rather than the aggregate b namespace. **Fixed:** *Inbound webhook verification loads without the Node networking stack (Worker / edge runtime)* — The webhook module and its dispatcher delivery store required the outbound HTTP client (node:http / node:https / node:http2) at module load, so importing the module threw in a runtime without those builtins — even though b.webhook.verify is HMAC-SHA-256 plus a timing-safe compare and the dispatcher (SQL-backed persistence) is only needed for outbound delivery. The HTTP client and the dispatcher are now resolved lazily, on the outbound send / dispatch paths only; the inbound verify path loads no Node networking module. An edge handler that imports the webhook module directly can pre-verify an inbound Stripe webhook signature with the primitive's hardening (Stripe-Signature size cap, v1-hex anti-DoS cap, minimum-tolerance floor, optional atomic replay store) instead of hand-rolling the t=/v1= parse, tolerance window, and timing-safe compare. The framework's aggregate entry still loads the networking stack eagerly; import the webhook module directly for the edge verify path.
@@ -247,7 +247,7 @@ function create(opts) {
247
247
  var exitCode = (process.exitCode !== undefined && process.exitCode !== 0)
248
248
  ? process.exitCode : (allOk ? 0 : 1);
249
249
  setImmediate(function () {
250
- // allow:process-exit — operator opted into exitAfterPhases,
250
+ // allow:process-exit-operator-optin — operator opted into exitAfterPhases,
251
251
  // delegating process lifecycle to the orchestrator
252
252
  process.exit(exitCode);
253
253
  });
@@ -280,7 +280,7 @@ function create(opts) {
280
280
  // Bounded forced exit after the grace deadline, armed ONLY inside the
281
281
  // signal handler (operator opted into installSignalHandlers,
282
282
  // delegating process lifecycle to the orchestrator).
283
- // allow:process-exit — operator-delegated lifecycle, watchdog only
283
+ // allow:process-exit-operator-optin — operator-delegated lifecycle, watchdog only
284
284
  process.exit(process.exitCode || 1);
285
285
  }, graceMs + forceExitMarginMs);
286
286
  if (typeof watchdog.unref === "function") watchdog.unref();
package/lib/arg-parser.js CHANGED
@@ -550,7 +550,7 @@ function create(opts) {
550
550
  // `<prog> help [<cmd>]`
551
551
  var topic = (split.rest && split.rest.length > 0) ? split.rest[0] : null;
552
552
  var msg = topic && commandsByName[topic] ? help(topic) : help();
553
- if (exitOnHelp) { stdout.write(msg + "\n"); process.exit(0); } // allow:process-exit — explicit { exit: true } from a bin/ shim
553
+ if (exitOnHelp) { stdout.write(msg + "\n"); process.exit(0); } // allow:process-exit-operator-optin — explicit { exit: true } from a bin/ shim
554
554
  return { command: null, flags: {}, positionals: [], helpRequested: true, helpText: msg };
555
555
  }
556
556
 
@@ -582,7 +582,7 @@ function create(opts) {
582
582
 
583
583
  if (cmdParsed.helpRequested || preParsed.helpRequested) {
584
584
  var cmsg = _renderCommandHelp(parser, cmdEntry);
585
- if (exitOnHelp) { stdout.write(cmsg + "\n"); process.exit(0); } // allow:process-exit — explicit { exit: true } from a bin/ shim
585
+ if (exitOnHelp) { stdout.write(cmsg + "\n"); process.exit(0); } // allow:process-exit-operator-optin — explicit { exit: true } from a bin/ shim
586
586
  return { command: cmdEntry.name, flags: {}, positionals: [], helpRequested: true, helpText: cmsg };
587
587
  }
588
588
 
@@ -606,7 +606,7 @@ function create(opts) {
606
606
  // as a flag-only parser. Honor `--` and aggregate everything else.
607
607
  if (preParsed.helpRequested) {
608
608
  var hmsg = _renderHelp(parser);
609
- if (exitOnHelp) { stdout.write(hmsg + "\n"); process.exit(0); } // allow:process-exit — explicit { exit: true } from a bin/ shim
609
+ if (exitOnHelp) { stdout.write(hmsg + "\n"); process.exit(0); } // allow:process-exit-operator-optin — explicit { exit: true } from a bin/ shim
610
610
  return { command: null, flags: {}, positionals: [], helpRequested: true, helpText: hmsg };
611
611
  }
612
612
  _applyDefaultsAndRequired(parser.flags.list, preParsed.flags, "top-level");
@@ -420,7 +420,7 @@ function _verifyAndParseBlob(token) {
420
420
  * typeof blob.entries.length === "number";
421
421
  * // → true
422
422
  */
423
- async function fetch(opts) { // allow:raw-outbound-http — function name is fetch, internal call routes through b.httpClient
423
+ async function fetch(opts) { // allow:raw-outbound-http-framework-internal — function name is fetch, internal call routes through b.httpClient
424
424
  opts = opts || {};
425
425
  validateOpts(opts, ["url", "caCertificate", "force", "timeoutMs"], "auth.fido_mds3.fetch");
426
426
 
package/lib/cert.js CHANGED
@@ -721,7 +721,7 @@ function create(opts) {
721
721
  var chain = _splitPemChain(ctx.cert);
722
722
  if (chain.length < 2) return; // no issuer in the served chain
723
723
  try {
724
- // allow:raw-outbound-http — b.network.tls.ocsp.fetch composes b.httpClient internally (SSRF guard + pinned DNS); not a raw outbound call
724
+ // allow:raw-outbound-http-framework-internal — b.network.tls.ocsp.fetch composes b.httpClient internally (SSRF guard + pinned DNS); not a raw outbound call
725
725
  var rv = await networkTls().ocsp.fetch({ leafPem: chain[0], issuerPem: chain[1] });
726
726
  ctx.ocspResponse = rv.ocspDer;
727
727
  _emitAudit("cert.ocsp.refreshed", "success", { name: name });
@@ -213,7 +213,7 @@ async function _applyMtaStsPolicy(domain, mxs, policyMode, auditEmit) {
213
213
  if (policyMode === "off") return mxs;
214
214
  var sts;
215
215
  try {
216
- sts = await smtpPolicy().mtaSts.fetch(domain); // allow:raw-outbound-http — method call on b.network.smtp.policy wrapper, not a raw `fetch(`
216
+ sts = await smtpPolicy().mtaSts.fetch(domain); // allow:raw-outbound-http-framework-internal — method call on b.network.smtp.policy wrapper, not a raw `fetch(`
217
217
  } catch (e) {
218
218
  if (policyMode === "enforce") {
219
219
  throw new DeliverError("deliver/mta-sts-fetch-failed",
@@ -488,7 +488,7 @@ async function _wireLookup(name, qtype, timeoutMs) {
488
488
  // Raw DoH wire-format request — bypasses b.httpClient envelope
489
489
  // because we need the raw binary response bytes for safeDns to
490
490
  // parse (httpClient assumes JSON/text shapes).
491
- var req = https.request({ // allow:raw-outbound-http — DoH wire-format response bytes; b.httpClient envelopes assume text/JSON, and httpClient → ssrfGuard → DNS → DoH would form a cycle
491
+ var req = https.request({ // allow:raw-outbound-http-framework-internal — DoH wire-format response bytes; b.httpClient envelopes assume text/JSON, and httpClient → ssrfGuard → DNS → DoH would form a cycle
492
492
  hostname: u.hostname,
493
493
  port: u.port || 443, // HTTPS port
494
494
  path: u.pathname + u.search,
@@ -660,7 +660,7 @@ async function tlsRptSubmit(report, opts) {
660
660
  try {
661
661
  if (/^https:\/\//i.test(uri)) {
662
662
  entry.kind = "https";
663
- // allow:raw-outbound-http — `client` is the framework httpClient
663
+ // allow:raw-outbound-http-framework-internal — `client` is the framework httpClient
664
664
  // (or operator-supplied test mock); SSRF + DNS-pin already
665
665
  // applied through the framework wrapper.
666
666
  var rv = await client.request({
package/lib/pqc-gate.js CHANGED
@@ -232,7 +232,7 @@ function create(opts) {
232
232
  // each chunk to read the record-length prefix) before deciding
233
233
  // whether more data is needed. boundedChunkCollector is append-
234
234
  // only with no peek, doesn't fit.
235
- // allow:handrolled-buffer-collect — see comment above
235
+ // allow:handrolled-buffer-collect-bounded-framing — see comment above
236
236
  var buf = Buffer.concat(chunks);
237
237
  var recordLen = buf.readUInt16BE(3);
238
238
  var neededLen = 5 + recordLen;
package/lib/vault-aad.js CHANGED
@@ -99,7 +99,7 @@ function _canonicalize(parts) {
99
99
  valLenBuf.writeUInt32BE(valBuf.length);
100
100
  chunks.push(keyLenBuf, keyBuf, valLenBuf, valBuf);
101
101
  }
102
- return Buffer.concat(chunks); // allow:handrolled-buffer-collect — AAD canonicalization, bounded by length-prefixed field shape
102
+ return Buffer.concat(chunks); // allow:handrolled-buffer-collect-bounded-framing — AAD canonicalization, bounded by length-prefixed field shape
103
103
  }
104
104
 
105
105
  function buildColumnAad(opts) {
package/lib/ws-client.js CHANGED
@@ -492,7 +492,7 @@ class WsClient extends EventEmitter {
492
492
  }
493
493
 
494
494
  _consumeHandshake(chunk) {
495
- // allow:handrolled-buffer-collect — handshake header capped at 64 KiB below; once handshake parses we switch to FrameParser
495
+ // allow:handrolled-buffer-collect-bounded-framing — handshake header capped at 64 KiB below; once handshake parses we switch to FrameParser
496
496
  this._handshakeBuf = Buffer.concat([this._handshakeBuf, chunk]);
497
497
  var headerEnd = this._handshakeBuf.indexOf("\r\n\r\n");
498
498
  if (headerEnd === -1) {
@@ -737,7 +737,7 @@ class WsClient extends EventEmitter {
737
737
  return;
738
738
  }
739
739
  if (frame.fin) {
740
- var fullPayload = Buffer.concat(this._fragmentChunks); // allow:handrolled-buffer-collect — bounded by maxMessageBytes below
740
+ var fullPayload = Buffer.concat(this._fragmentChunks); // allow:handrolled-buffer-collect-bounded-framing — bounded by maxMessageBytes below
741
741
  if (safeBuffer.byteLengthOf(fullPayload) > this._opts.maxMessageBytes) {
742
742
  this._handleSocketError(new WsClientError("ws-client/message-too-big",
743
743
  "incoming message exceeds maxMessageBytes (" + this._opts.maxMessageBytes + ")"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blamejs/core",
3
- "version": "0.15.31",
3
+ "version": "0.15.32",
4
4
  "description": "The Node framework that owns its stack.",
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:4097a213-458e-41ee-81c8-2db35819839f",
5
+ "serialNumber": "urn:uuid:c545cdae-c805-48ed-bc85-5ab5c993961a",
6
6
  "version": 1,
7
7
  "metadata": {
8
- "timestamp": "2026-06-26T19:40:07.451Z",
8
+ "timestamp": "2026-06-26T20:40:06.256Z",
9
9
  "lifecycles": [
10
10
  {
11
11
  "phase": "build"
@@ -19,14 +19,14 @@
19
19
  }
20
20
  ],
21
21
  "component": {
22
- "bom-ref": "@blamejs/core@0.15.31",
22
+ "bom-ref": "@blamejs/core@0.15.32",
23
23
  "type": "application",
24
24
  "name": "blamejs",
25
- "version": "0.15.31",
25
+ "version": "0.15.32",
26
26
  "scope": "required",
27
27
  "author": "blamejs contributors",
28
28
  "description": "The Node framework that owns its stack.",
29
- "purl": "pkg:npm/%40blamejs/core@0.15.31",
29
+ "purl": "pkg:npm/%40blamejs/core@0.15.32",
30
30
  "properties": [],
31
31
  "externalReferences": [
32
32
  {
@@ -54,7 +54,7 @@
54
54
  "components": [],
55
55
  "dependencies": [
56
56
  {
57
- "ref": "@blamejs/core@0.15.31",
57
+ "ref": "@blamejs/core@0.15.32",
58
58
  "dependsOn": []
59
59
  }
60
60
  ]