@blamejs/core 0.13.31 → 0.13.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 +2 -0
- package/lib/ai-adverse-decision.js +1 -1
- package/lib/audit-daily-review.js +3 -3
- package/lib/compliance-ai-act-transparency.js +2 -2
- package/lib/compliance.js +7 -9
- package/lib/data-act.js +4 -3
- package/lib/sec-cyber.js +1 -1
- package/package.json +1 -1
- package/sbom.cdx.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,8 @@ upgrading across more than a few patches at a time.
|
|
|
8
8
|
|
|
9
9
|
## v0.13.x
|
|
10
10
|
|
|
11
|
+
- v0.13.32 (2026-05-28) — **`b.auditDailyReview` enforces notify under the sox-404 posture; compliance doc corrections.** b.auditDailyReview documented `sox-404` (SOX §404 ICFR — the internal-controls regime this primitive serves) as one of the postures that make a `notify` callback mandatory at construction, but the enforcement set used only `sox`, so pinning `posture: "sox-404"` without a notify channel was silently accepted. `sox-404` is now in the mandatory-notify set, so the advertised guarantee holds (a regression test pins it). The rest are documentation corrections with no behavior change: b.compliance.posturesByDomain / posturesByJurisdiction examples showed small fixed arrays where the functions return every matching posture (the catalog has grown); b.dataAct's surface list named two methods that do not exist (the real surface is declareProduct / recordUserAccess / shareWithThirdParty / recordSwitchRequest, with gatekeeper refusal folded into shareWithThirdParty); b.secCyber.eightKArtifact's documented return key `audit` is actually `deadlineBusinessDays`; and b.compliance.aiAct.transparency's helper summary named `cspMetaTag` / a `watermark({ kind })` argument that are really `metaTags` / `watermark({ mediaKind })`. **Fixed:** *`b.auditDailyReview` requires a notify channel under the `sox-404` posture* — The docs listed `sox-404` among the postures that make a `notify` callback mandatory at create-time, but the enforcement set contained only `sox` — so `posture: "sox-404"` without `notify` was accepted instead of refused. `sox-404` (SOX §404 ICFR) is now in the mandatory-notify set, matching the documented guarantee; constructing without a notify channel under it throws `auditDailyReview/notify-required-under-posture`. · *`b.compliance` jurisdiction/domain lister examples no longer enumerate a stale fixed set* — `posturesByDomain` and `posturesByJurisdiction` return every posture matching the domain/jurisdiction, but their `@example`s showed small fixed arrays from before the posture catalog grew. The examples now show a representative prefix with `...` and note they return the full matching set. · *`b.dataAct` surface list matches the real methods* — The module surface listed `userAccessible(...)` and `refuseGatekeeper(...)`, neither of which exists. The real surface is `declareProduct` / `recordUserAccess` / `shareWithThirdParty` / `recordSwitchRequest`, and DMA-gatekeeper refusal (Art 32 §1) is enforced inside `shareWithThirdParty`. The doc now reflects that. · *`b.secCyber.eightKArtifact` documented return shape corrected* — The signature line showed `{ artifact, deadline, audit }`; the function returns `{ artifact, deadline, deadlineBusinessDays }` (there is no `audit` key). The doc now matches. · *`b.compliance.aiAct.transparency` helper names corrected* — The helper summary named a `cspMetaTag(...)` function and a `watermark({ kind })` argument; the real names are `metaTags(...)` and `watermark({ mediaKind })`. Calling the documented names threw. Also corrected: a `b.aiAdverseDecision` illustration showed an ECOA `statutoryDeadlines` shape that didn't match the regime's actual deadlines.
|
|
12
|
+
|
|
11
13
|
- v0.13.31 (2026-05-28) — **Circuit-breaker onStateChange callback now fires; mcp / vault-aad doc corrections.** b.circuitBreaker documented an `onStateChange` callback (both an option and an `onStateChange(handler)` registration method) plus a state-change payload, but the callback was never invoked — only an observability event fired. The callback is now implemented: it fires on every transition with `{ name, from, to, at }`, the registration method works, and a non-function handler is rejected at construction. The same primitive's docs are corrected to name the real accessor (`getState()`, not `state()`) and drop a never-read `audit` option. Plus two doc-only corrections: b.mcp.toolResult.sanitize described composing b.guardHtml / b.ai.input.classify (it uses built-in detection) and documented a `classifyInput` option it never read; and b.vault.aad's prose said HKDF-SHAKE256 where the derivation is SHAKE256 (the AEAD AAD-binding itself is unchanged and sound). **Fixed:** *`b.circuitBreaker` onStateChange callback is invoked on every transition* — The `onStateChange` option and the `onStateChange(handler)` registration method are now wired: each registered handler is called with `{ name, from, to, at }` on every state transition (closed→open, open→half, half→closed/open), alongside the existing `breaker.state.change` observability event. A non-function `onStateChange` is rejected at construction. Previously the documented callback never fired. The docs are also corrected to name the real state accessor `getState()` (there is a `state` property, so `state()` was never a method) and to drop a never-read `audit` option. · *`b.mcp.toolResult.sanitize` documents its actual detection and options* — The prose said the sanitizer composes `b.guardHtml`'s strict profile and `b.ai.input.classify`; it uses built-in dangerous-HTML and prompt-injection-marker detection. The `@opts` also listed a `classifyInput` override the function never read. The prose now describes the built-in detection and the unwired `classifyInput` option is removed. The fail-closed refusal behavior (default `posture: "refuse"`) is unchanged. · *`b.vault.aad` derivation named correctly (SHAKE256)* — The module prose described the per-binding key derivation as HKDF-SHAKE256; it is SHAKE256 over the vault root concatenated with the binding inputs (no HKDF extract/expand). The AEAD AAD-binding to (table, row, column, schema version) — the file's actual security guarantee — is unchanged and sound; only the KDF name in the doc was wrong.
|
|
12
14
|
|
|
13
15
|
- v0.13.30 (2026-05-28) — **Doc corrections in the safe-* parsers (defaults, an error code, an example, a status list).** Four documentation corrections in the safe-* input parsers; no code behavior changed. The parsers' enforced limits and controls are unchanged — these align the docs with what the code already does. b.safeMime.parse's documented default transfer-encoding allowlist listed `binary`, which is excluded by default (opt-in per RFC 3030 BINARYMIME). b.safeDecompress documented a refusal code (`output-too-large`) it never emits — an absolute-size bomb surfaces under `decompress-failed`. b.safeSmtp.findDotTerminator's example output was off by one. b.safeIcap's intro status-code summary omitted 404 / 405 / 408 (the detailed block already listed them). **Fixed:** *`b.safeMime.parse` documents the actual default transfer-encoding allowlist* — The `@opts` default listed `7bit/8bit/binary/qp/base64`, but `binary` is deliberately excluded by default (RFC 3030 BINARYMIME is opt-in); the default is `7bit/8bit/quoted-printable/base64`. The doc now matches, so operators don't expect inbound `Content-Transfer-Encoding: binary` parts to pass without opting in. · *`b.safeDecompress` names the real absolute-size-bomb refusal code* — The refusal-posture list documented `safe-decompress/output-too-large` for a bomb-by-absolute-size, but that code is never emitted — zlib's `maxOutputLength` throws before allocation and the failure surfaces as `safe-decompress/decompress-failed`. The doc now names the code an operator branching on the result will actually see (the ratio, output-byte, and compressed-input caps are unchanged and enforced). · *`b.safeSmtp.findDotTerminator` example output corrected* — The example claimed the `\r\n.\r\n` terminator in `"Hello world.\r\n.\r\n"` is at index 13; it is at index 12. The example now shows 12 (the implementation was already correct). · *`b.safeIcap` intro status-code summary lists 404 / 405 / 408* — The intro summary said only `100 / 200 / 204 / 400 / 403 / 5xx` are honored, but the parser also accepts `404 / 405 / 408` (legitimate RFC 3507 §4.3.3 codes, already listed in the detailed `parse` block). The intro summary now matches.
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
* review of activity records), SOX §302/§404 (quarterly self-
|
|
18
18
|
* attestation), SOC 2 CC7.2 (anomaly identification and response),
|
|
19
19
|
* GDPR Art. 32 (ongoing security testing/evaluation). When `posture`
|
|
20
|
-
* is one of `pci-dss` / `hipaa` / `sox` / `soc2`, a
|
|
21
|
-
* callback is mandatory at create-time — the regulators all demand
|
|
20
|
+
* is one of `pci-dss` / `hipaa` / `sox` / `sox-404` / `soc2`, a
|
|
21
|
+
* `notify` callback is mandatory at create-time — the regulators all demand
|
|
22
22
|
* a follow-up channel.
|
|
23
23
|
*
|
|
24
24
|
* Severity classification: `denied` / `failure` outcomes default to
|
|
@@ -65,7 +65,7 @@ var CRITICAL_PATTERNS = [
|
|
|
65
65
|
/^ato\.killSwitch\.tripped/,
|
|
66
66
|
];
|
|
67
67
|
|
|
68
|
-
var POSTURES_REQUIRING_NOTIFY = ["pci-dss", "hipaa", "sox", "soc2"];
|
|
68
|
+
var POSTURES_REQUIRING_NOTIFY = ["pci-dss", "hipaa", "sox", "sox-404", "soc2"];
|
|
69
69
|
|
|
70
70
|
function _defaultClassify(event) {
|
|
71
71
|
if (!event || typeof event !== "object" || typeof event.action !== "string") {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
* The framework provides:
|
|
32
32
|
*
|
|
33
33
|
* - banner({ kind }) → builder for the standard disclosure banner
|
|
34
|
-
* - watermark({
|
|
35
|
-
* -
|
|
34
|
+
* - watermark({ mediaKind, ... }) → builder for content-marking tags
|
|
35
|
+
* - metaTags({ ... }) → meta tag pair for HTML pages
|
|
36
36
|
* - jsonLdDisclosure({ ... }) → JSON-LD <script> for structured-data emit
|
|
37
37
|
* - C2pa-stub → operator-feeds-claims pattern for
|
|
38
38
|
* C2PA Content Credentials integration
|
package/lib/compliance.js
CHANGED
|
@@ -1407,14 +1407,11 @@ function postureDefault(posture, key) {
|
|
|
1407
1407
|
*
|
|
1408
1408
|
* @example
|
|
1409
1409
|
* b.compliance.posturesByDomain("privacy");
|
|
1410
|
-
* // → ["ccpa", "gdpr", "lgpd-br",
|
|
1411
|
-
* //
|
|
1410
|
+
* // → ["ccpa", "gdpr", "lgpd-br", ...] — every posture whose
|
|
1411
|
+
* // domain is "privacy" (the full set grows as regimes are added)
|
|
1412
1412
|
*
|
|
1413
1413
|
* b.compliance.posturesByDomain("health");
|
|
1414
|
-
* // → ["hipaa", "wmhmda"]
|
|
1415
|
-
*
|
|
1416
|
-
* b.compliance.posturesByDomain("payment");
|
|
1417
|
-
* // → ["pci-dss"]
|
|
1414
|
+
* // → ["hipaa", "wmhmda", ...] — every "health"-domain posture
|
|
1418
1415
|
*
|
|
1419
1416
|
* b.compliance.posturesByDomain("not-a-domain");
|
|
1420
1417
|
* // → []
|
|
@@ -1450,13 +1447,14 @@ function posturesByDomain(domain) {
|
|
|
1450
1447
|
*
|
|
1451
1448
|
* @example
|
|
1452
1449
|
* b.compliance.posturesByJurisdiction("EU");
|
|
1453
|
-
* // → ["gdpr", "dora", "nis2",
|
|
1450
|
+
* // → ["gdpr", "dora", "nis2", ...] — every EU-jurisdiction posture
|
|
1451
|
+
* // (the full set grows as regimes are added)
|
|
1454
1452
|
*
|
|
1455
1453
|
* b.compliance.posturesByJurisdiction("US");
|
|
1456
|
-
* // → ["hipaa", "soc2", "sox"]
|
|
1454
|
+
* // → ["hipaa", "soc2", "sox", ...] — every US-jurisdiction posture
|
|
1457
1455
|
*
|
|
1458
1456
|
* b.compliance.posturesByJurisdiction("US-CA");
|
|
1459
|
-
* // → ["ccpa"]
|
|
1457
|
+
* // → ["ccpa", ...] — every US-CA (California) posture
|
|
1460
1458
|
*
|
|
1461
1459
|
* b.compliance.posturesByJurisdiction("XX");
|
|
1462
1460
|
* // → []
|
package/lib/data-act.js
CHANGED
|
@@ -20,8 +20,9 @@
|
|
|
20
20
|
*
|
|
21
21
|
* - Art 4 §1 — let the user access "readily available product
|
|
22
22
|
* data" generated by their use of the connected product.
|
|
23
|
-
* `b.dataAct.
|
|
24
|
-
* operator-supplied data slice
|
|
23
|
+
* `b.dataAct.recordUserAccess({ productId, userId, dataSlice })`
|
|
24
|
+
* records the operator-supplied data slice for the regulator
|
|
25
|
+
* record.
|
|
25
26
|
* - Art 5 §1 — share that data with a third-party data
|
|
26
27
|
* recipient on the user's request, "without undue delay,
|
|
27
28
|
* free of charge to the user, of the same quality as is
|
|
@@ -46,7 +47,7 @@
|
|
|
46
47
|
* b.dataAct.declareProduct({ productId, dataHolder, ... })
|
|
47
48
|
* b.dataAct.recordUserAccess({ productId, userId, dataSlice, ... })
|
|
48
49
|
* b.dataAct.shareWithThirdParty({ productId, userId, recipient, scope })
|
|
49
|
-
*
|
|
50
|
+
* — refuses a DMA-gatekeeper recipient per Art 32 §1
|
|
50
51
|
* b.dataAct.recordSwitchRequest({ customerId, targetProvider, dataSlices })
|
|
51
52
|
*
|
|
52
53
|
* The framework does NOT host the connected-product data itself;
|
package/lib/sec-cyber.js
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
*
|
|
33
33
|
* Public API:
|
|
34
34
|
*
|
|
35
|
-
* b.secCyber.eightKArtifact(opts) -> { artifact, deadline,
|
|
35
|
+
* b.secCyber.eightKArtifact(opts) -> { artifact, deadline, deadlineBusinessDays }
|
|
36
36
|
* opts:
|
|
37
37
|
* incidentId: operator-supplied incident reference (string).
|
|
38
38
|
* registrant: { name, cik, filer }
|
package/package.json
CHANGED
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:
|
|
5
|
+
"serialNumber": "urn:uuid:14f840f1-29a7-4656-93d0-e5fa6ece6ae2",
|
|
6
6
|
"version": 1,
|
|
7
7
|
"metadata": {
|
|
8
|
-
"timestamp": "2026-05-
|
|
8
|
+
"timestamp": "2026-05-29T02:13:04.485Z",
|
|
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.13.
|
|
22
|
+
"bom-ref": "@blamejs/core@0.13.32",
|
|
23
23
|
"type": "application",
|
|
24
24
|
"name": "blamejs",
|
|
25
|
-
"version": "0.13.
|
|
25
|
+
"version": "0.13.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.13.
|
|
29
|
+
"purl": "pkg:npm/%40blamejs/core@0.13.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.13.
|
|
57
|
+
"ref": "@blamejs/core@0.13.32",
|
|
58
58
|
"dependsOn": []
|
|
59
59
|
}
|
|
60
60
|
]
|