@blamejs/blamejs-shop 0.2.11 → 0.2.13

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.
Files changed (55) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/lib/asset-manifest.json +3 -3
  3. package/lib/storefront.js +276 -24
  4. package/lib/translations.js +2 -2
  5. package/lib/vendor/MANIFEST.json +2 -2
  6. package/lib/vendor/blamejs/.github/workflows/actions-lint.yml +71 -23
  7. package/lib/vendor/blamejs/.github/workflows/cflite_batch.yml +2 -0
  8. package/lib/vendor/blamejs/.github/workflows/cflite_pr.yml +2 -0
  9. package/lib/vendor/blamejs/.github/workflows/ci.yml +17 -0
  10. package/lib/vendor/blamejs/.github/workflows/npm-publish.yml +18 -10
  11. package/lib/vendor/blamejs/.github/workflows/release-container.yml +29 -16
  12. package/lib/vendor/blamejs/.github/workflows/sha-to-tag-verify.yml +22 -3
  13. package/lib/vendor/blamejs/.github/zizmor.yml +29 -0
  14. package/lib/vendor/blamejs/.pinact.yaml +24 -8
  15. package/lib/vendor/blamejs/CHANGELOG.md +4 -0
  16. package/lib/vendor/blamejs/api-snapshot.json +2 -2
  17. package/lib/vendor/blamejs/lib/archive-wrap.js +1 -1
  18. package/lib/vendor/blamejs/lib/auth/jwt.js +7 -4
  19. package/lib/vendor/blamejs/lib/auth/saml.js +2 -2
  20. package/lib/vendor/blamejs/lib/cose.js +1 -1
  21. package/lib/vendor/blamejs/lib/did.js +1 -1
  22. package/lib/vendor/blamejs/lib/guard-archive.js +2 -2
  23. package/lib/vendor/blamejs/lib/guard-auth.js +5 -5
  24. package/lib/vendor/blamejs/lib/guard-cidr.js +4 -4
  25. package/lib/vendor/blamejs/lib/guard-csv.js +6 -6
  26. package/lib/vendor/blamejs/lib/guard-domain.js +4 -4
  27. package/lib/vendor/blamejs/lib/guard-email.js +6 -5
  28. package/lib/vendor/blamejs/lib/guard-filename.js +4 -4
  29. package/lib/vendor/blamejs/lib/guard-graphql.js +5 -5
  30. package/lib/vendor/blamejs/lib/guard-html.js +2 -2
  31. package/lib/vendor/blamejs/lib/guard-image.js +1 -1
  32. package/lib/vendor/blamejs/lib/guard-json.js +5 -5
  33. package/lib/vendor/blamejs/lib/guard-jsonpath.js +4 -4
  34. package/lib/vendor/blamejs/lib/guard-jwt.js +5 -5
  35. package/lib/vendor/blamejs/lib/guard-markdown.js +6 -6
  36. package/lib/vendor/blamejs/lib/guard-mime.js +6 -6
  37. package/lib/vendor/blamejs/lib/guard-oauth.js +5 -5
  38. package/lib/vendor/blamejs/lib/guard-pdf.js +1 -1
  39. package/lib/vendor/blamejs/lib/guard-regex.js +4 -4
  40. package/lib/vendor/blamejs/lib/guard-shell.js +4 -4
  41. package/lib/vendor/blamejs/lib/guard-svg.js +5 -5
  42. package/lib/vendor/blamejs/lib/guard-template.js +4 -4
  43. package/lib/vendor/blamejs/lib/guard-time.js +6 -6
  44. package/lib/vendor/blamejs/lib/guard-uuid.js +6 -6
  45. package/lib/vendor/blamejs/lib/guard-xml.js +4 -4
  46. package/lib/vendor/blamejs/lib/guard-yaml.js +5 -5
  47. package/lib/vendor/blamejs/lib/link-header.js +3 -2
  48. package/lib/vendor/blamejs/lib/mail-agent.js +4 -2
  49. package/lib/vendor/blamejs/lib/middleware/rate-limit.js +2 -2
  50. package/lib/vendor/blamejs/lib/tsa.js +2 -1
  51. package/lib/vendor/blamejs/package.json +1 -1
  52. package/lib/vendor/blamejs/release-notes/v0.13.23.json +42 -0
  53. package/lib/vendor/blamejs/release-notes/v0.13.24.json +26 -0
  54. package/lib/vendor/blamejs/test/smoke.js +25 -0
  55. package/package.json +1 -1
@@ -48,10 +48,13 @@
48
48
  * subject: claims.sub override
49
49
  * expiresInSec: relative exp (claims.exp = now + expiresInSec)
50
50
  * notBeforeSec: relative nbf (claims.nbf = now + notBeforeSec)
51
- * jti: claims.jti override (string; if missing, no jti is added —
52
- * the framework doesn't auto-mint without an operator request
53
- * since jti has uniqueness/replay-tracking semantics that
54
- * belong at the application layer)
51
+ * jti: claims.jti override (string). When omitted, a random
52
+ * 128-bit jti is auto-minted if (and only if) the token
53
+ * carries an exp — so a replay-protected token always
54
+ * has the jti the verifier's replay store requires,
55
+ * closing the silent hole where a sign without jti would
56
+ * never replay-protect. Pass an explicit jti for a
57
+ * deterministic value.
55
58
  * now: test-time clock injection (epoch milliseconds)
56
59
  *
57
60
  * Verify opts:
@@ -415,7 +415,7 @@ function create(opts) {
415
415
  * (Response-level OR Assertion-level signature), the assertion's
416
416
  * SubjectConfirmation Bearer constraints, and Conditions audience
417
417
  * + time bounds. Returns `{ nameId, nameIdFormat, sessionIndex,
418
- * attributes, audience, inResponseTo }`.
418
+ * attributes, audience, inResponseTo, issuer }`.
419
419
  *
420
420
  * @opts
421
421
  * {
@@ -428,7 +428,7 @@ function create(opts) {
428
428
  * var info = sp.verifyResponse(req.body.SAMLResponse, {
429
429
  * expectedInResponseTo: req.session.samlRequestId,
430
430
  * });
431
- * // → { nameId, nameIdFormat, sessionIndex, attributes, audience, issuer }
431
+ * // → { nameId, nameIdFormat, sessionIndex, attributes, audience, inResponseTo, issuer }
432
432
  * });
433
433
  */
434
434
  function verifyResponse(samlResponseB64, vopts) {
@@ -227,7 +227,7 @@ async function sign(payload, opts) {
227
227
  * @primitive b.cose.verify
228
228
  * @signature b.cose.verify(coseSign1, opts)
229
229
  * @since 0.12.33
230
- * @status experimental
230
+ * @status stable
231
231
  * @related b.cose.sign, b.cbor.decode
232
232
  *
233
233
  * Verify a COSE_Sign1 (RFC 9052) and return its payload + headers.
@@ -365,7 +365,7 @@ function resolve(did, opts) {
365
365
  return { didDocument: docW, verificationMethods: _extractVerificationMethods(docW) };
366
366
  }
367
367
 
368
- throw new DidError("did/unsupported-method", "did.resolve: unsupported DID method '" + parsed.method + "' (did:key and did:web only)");
368
+ throw new DidError("did/unsupported-method", "did.resolve: unsupported DID method '" + parsed.method + "' (did:key, did:jwk, and did:web only)");
369
369
  }
370
370
 
371
371
  // Import a publicKeyJwk after allowlisting its kty/crv — a DID document
@@ -650,7 +650,7 @@ function _detectIssues(entries, opts) {
650
650
  *
651
651
  * @opts
652
652
  * profile: "strict"|"balanced"|"permissive",
653
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
653
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
654
654
  * traversalPolicy: "reject"|"audit"|"allow",
655
655
  * absolutePathPolicy: "reject"|"audit"|"allow",
656
656
  * symlinkPolicy: "reject"|"audit"|"allow",
@@ -723,7 +723,7 @@ function validateEntries(entries, opts) {
723
723
  *
724
724
  * @opts
725
725
  * profile: "strict"|"balanced"|"permissive",
726
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
726
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
727
727
  * name: string,
728
728
  * ...: any validateEntries opt
729
729
  *
@@ -34,7 +34,7 @@
34
34
  *
35
35
  * Profiles: `strict` / `balanced` / `permissive`. Compliance postures:
36
36
  * `hipaa` / `pci-dss` / `gdpr` / `soc2`. Operators select via
37
- * `{ profile: "strict" }` or `{ compliance: "hipaa" }`; postures
37
+ * `{ profile: "strict" }` or `{ compliancePosture: "hipaa" }`; postures
38
38
  * overlay on the profile baseline.
39
39
  *
40
40
  * @card
@@ -205,7 +205,7 @@ function _detectIssues(bundle, opts) {
205
205
  * @compliance hipaa, pci-dss, gdpr, soc2
206
206
  * @related b.guardAuth.sanitize, b.guardAuth.gate, b.guardJwt.validate, b.guardOauth.validate
207
207
  *
208
- * Inspect an auth-bundle object and return `{ ok, issues, summary }`.
208
+ * Inspect an auth-bundle object and return `{ ok, issues }`.
209
209
  * Each issue carries `{ kind, severity, ruleId, source, snippet }`
210
210
  * with severity in `"warn"|"high"|"critical"` and `source` tagging
211
211
  * the sub-guard that raised it (`"jwt"` / `"oauth"` / `"cookies"` /
@@ -219,7 +219,7 @@ function _detectIssues(bundle, opts) {
219
219
  *
220
220
  * @opts
221
221
  * profile: "strict"|"balanced"|"permissive",
222
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
222
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
223
223
  * childProfile: "strict"|"balanced"|"permissive", // forwarded to guardJwt / guardOauth
224
224
  * requireAtLeastOne: boolean,
225
225
  * allowedRedirectUris: string[], // forwarded to guardOauth
@@ -256,7 +256,7 @@ function validate(input, opts) {
256
256
  *
257
257
  * @opts
258
258
  * profile: "strict"|"balanced"|"permissive",
259
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
259
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
260
260
  *
261
261
  * @example
262
262
  * var clean = b.guardAuth.sanitize({
@@ -300,7 +300,7 @@ function sanitize(input, opts) {
300
300
  *
301
301
  * @opts
302
302
  * profile: "strict"|"balanced"|"permissive",
303
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
303
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
304
304
  * name: string, // gate identity for audit / observability
305
305
  * childProfile: "strict"|"balanced"|"permissive",
306
306
  * allowedRedirectUris: string[],
@@ -437,7 +437,7 @@ function _detectIssues(input, opts) {
437
437
  * @compliance hipaa, pci-dss, gdpr, soc2
438
438
  * @related b.guardCidr.sanitize, b.guardCidr.gate
439
439
  *
440
- * Inspect a CIDR notation string and return `{ ok, issues, summary }`.
440
+ * Inspect a CIDR notation string and return `{ ok, issues }`.
441
441
  * Each issue carries `{ kind, severity, ruleId, snippet }` with
442
442
  * severity in `"warn"|"high"|"critical"`. Detected: malformed address
443
443
  * shape, octet-out-of-range, mask-out-of-range, network-address
@@ -448,7 +448,7 @@ function _detectIssues(input, opts) {
448
448
  *
449
449
  * @opts
450
450
  * profile: "strict"|"balanced"|"permissive",
451
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
451
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
452
452
  * family: "either"|"ipv4-only"|"ipv6-only",
453
453
  * networkAlignmentPolicy: "reject"|"audit"|"allow",
454
454
  * reservedRangesPolicy: "reject"|"audit"|"allow",
@@ -496,7 +496,7 @@ function validate(input, opts) {
496
496
  *
497
497
  * @opts
498
498
  * profile: "strict"|"balanced"|"permissive",
499
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
499
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
500
500
  *
501
501
  * @example
502
502
  * var safe = b.guardCidr.sanitize("2001:DB8::/32", { profile: "permissive" });
@@ -542,7 +542,7 @@ function sanitize(input, opts) {
542
542
  *
543
543
  * @opts
544
544
  * profile: "strict"|"balanced"|"permissive",
545
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
545
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
546
546
  * name: string, // gate identity for audit / observability
547
547
  * family: "either"|"ipv4-only"|"ipv6-only",
548
548
  *
@@ -43,7 +43,7 @@
43
43
  * Profiles: `strict` / `balanced` / `permissive` /
44
44
  * `email-attachment`. Compliance postures: `hipaa` / `pci-dss` /
45
45
  * `gdpr` / `soc2`. Operators select via `{ profile: "strict" }` or
46
- * `{ compliance: "hipaa" }`; postures overlay on top of the
46
+ * `{ compliancePosture: "hipaa" }`; postures overlay on top of the
47
47
  * profile baseline.
48
48
  *
49
49
  * Threat-detection regex literals are composed programmatically
@@ -696,7 +696,7 @@ function schema(spec) {
696
696
  *
697
697
  * @opts
698
698
  * profile: "strict"|"balanced"|"permissive"|"email-attachment",
699
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
699
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
700
700
  * headers: string[]|false, // explicit column order; false suppresses header row
701
701
  * delimiter: string, // default ","
702
702
  * lineEnding: string, // default "\r\n"
@@ -802,7 +802,7 @@ function serialize(rows, opts) {
802
802
  * @related b.guardCsv.sanitize, b.guardCsv.gate
803
803
  *
804
804
  * Inspect `input` (string or Buffer of CSV text) and return
805
- * `{ ok, issues, summary }`. Each issue carries `{ kind, severity,
805
+ * `{ ok, issues }`. Each issue carries `{ kind, severity,
806
806
  * ruleId, location, snippet }` with severity in
807
807
  * `"warn"|"high"|"critical"`. Detected: BOM mid-stream, Unicode
808
808
  * bidi override (CVE-2021-42574), C0 control char, null byte,
@@ -813,7 +813,7 @@ function serialize(rows, opts) {
813
813
  *
814
814
  * @opts
815
815
  * profile: "strict"|"balanced"|"permissive"|"email-attachment",
816
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
816
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
817
817
  * bidiCharPolicy: "reject"|"strip"|"audit"|"allow",
818
818
  * controlCharPolicy: "reject"|"strip"|"allow",
819
819
  * nullByteHandling: "reject"|"strip"|"allow",
@@ -860,7 +860,7 @@ function validate(input, opts) {
860
860
  *
861
861
  * @opts
862
862
  * profile: "strict"|"balanced"|"permissive"|"email-attachment",
863
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
863
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
864
864
  * bidiCharPolicy: "reject"|"strip"|"audit"|"allow",
865
865
  * controlCharPolicy: "reject"|"strip"|"allow",
866
866
  * nullByteHandling: "reject"|"strip"|"allow",
@@ -981,7 +981,7 @@ function detect(input) {
981
981
  *
982
982
  * @opts
983
983
  * profile: "strict"|"balanced"|"permissive"|"email-attachment",
984
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
984
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
985
985
  * name: string, // gate identity for audit / observability
986
986
  * operatorRules: [{ id: string, severity: "warn"|"high"|"critical",
987
987
  * detect: function, reason: string }],
@@ -563,7 +563,7 @@ function _detectIssues(input, opts) {
563
563
  * @compliance hipaa, pci-dss, gdpr, soc2
564
564
  * @related b.guardDomain.sanitize, b.guardDomain.gate
565
565
  *
566
- * Inspect a domain-name string and return `{ ok, issues, summary }`.
566
+ * Inspect a domain-name string and return `{ ok, issues }`.
567
567
  * Each issue carries `{ kind, severity, ruleId, snippet }` with
568
568
  * severity in `"warn"|"high"|"critical"`. Detected: domain/label
569
569
  * length cap (RFC 1035 §2.3.4), LDH violation, IDN A-label
@@ -575,7 +575,7 @@ function _detectIssues(input, opts) {
575
575
  *
576
576
  * @opts
577
577
  * profile: "strict"|"balanced"|"permissive",
578
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
578
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
579
579
  * ldhPolicy: "reject"|"audit"|"allow",
580
580
  * punycodePolicy: "reject"|"audit"|"allow",
581
581
  * mixedScriptPolicy: "reject"|"audit"|"allow",
@@ -635,7 +635,7 @@ function validate(input, opts) {
635
635
  *
636
636
  * @opts
637
637
  * profile: "strict"|"balanced"|"permissive",
638
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
638
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
639
639
  *
640
640
  * @example
641
641
  * var safe = b.guardDomain.sanitize("Example.Com.", { profile: "balanced" });
@@ -677,7 +677,7 @@ function sanitize(input, opts) {
677
677
  *
678
678
  * @opts
679
679
  * profile: "strict"|"balanced"|"permissive",
680
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
680
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
681
681
  * name: string, // gate identity for audit / observability
682
682
  *
683
683
  * @example
@@ -840,9 +840,10 @@ function sanitize(input, opts) {
840
840
  * @status stable
841
841
  * @related b.guardEmail.validateMessage, b.guardEmail.sanitize, b.guardAll.gate
842
842
  *
843
- * Build a guard gate function compatible with the `b.guardAll` family
844
- * dispatch. The returned async gate accepts a request-shaped context,
845
- * runs `validateMessage` against the extracted bytes, and returns
843
+ * Build a guard gate compatible with the `b.guardAll` family
844
+ * dispatch. The returned gate's async `check(ctx)` method accepts a
845
+ * request-shaped context, runs `validateMessage` against the extracted
846
+ * bytes, and returns
846
847
  * `{ ok, action, issues? }` where `action` is `serve` (no issues),
847
848
  * `audit-only` (warn-level), or `refuse` (high / critical severity).
848
849
  *
@@ -854,11 +855,11 @@ function sanitize(input, opts) {
854
855
  * @example
855
856
  * var guardEmail = require("./lib/guard-email");
856
857
  * var g = guardEmail.gate({ profile: "strict" });
857
- * typeof g; // → "function"
858
+ * typeof g.check; // → "function"
858
859
  *
859
860
  * var msg = "From: alice@example.com\r\nTo: bob@example.com\r\n" +
860
861
  * "Subject: hi\r\nDate: Mon, 5 May 2026 10:00:00 +0000\r\n\r\nbody\r\n";
861
- * g({ body: Buffer.from(msg, "utf8") }).then(function (rv) {
862
+ * g.check({ body: Buffer.from(msg, "utf8") }).then(function (rv) {
862
863
  * rv.action; // → "serve"
863
864
  * });
864
865
  */
@@ -634,7 +634,7 @@ function _sanitize(input, opts) {
634
634
  * @related b.guardFilename.sanitize, b.guardFilename.gate
635
635
  *
636
636
  * Inspect a filename (string or Buffer) and return
637
- * `{ ok, issues, summary }`. Each issue carries
637
+ * `{ ok, issues }`. Each issue carries
638
638
  * `{ kind, severity, ruleId, location, snippet }` with severity in
639
639
  * `"warn"|"high"|"critical"`. Detected: path-traversal raw and
640
640
  * percent-encoded, null-byte truncation, NTFS ADS, UNC path,
@@ -647,7 +647,7 @@ function _sanitize(input, opts) {
647
647
  *
648
648
  * @opts
649
649
  * profile: "strict"|"balanced"|"permissive",
650
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
650
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
651
651
  * bidiPolicy: "reject"|"strip"|"allow",
652
652
  * controlPolicy: "reject"|"strip"|"allow",
653
653
  * nullBytePolicy: "reject", // always reject
@@ -759,7 +759,7 @@ function _sanitizeStripMode(input, opts) {
759
759
  *
760
760
  * @opts
761
761
  * profile: "strict"|"balanced"|"permissive",
762
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
762
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
763
763
  * mode: "enforce"|"strip",
764
764
  * audit: { safeEmit: function }, // optional sink for strip mode
765
765
  * unicodeNormalization: "NFC"|null,
@@ -820,7 +820,7 @@ function sanitize(input, opts) {
820
820
  *
821
821
  * @opts
822
822
  * profile: "strict"|"balanced"|"permissive",
823
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
823
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
824
824
  * name: string, // gate identity for audit / observability
825
825
  *
826
826
  * @example
@@ -458,7 +458,7 @@ function _detectIssues(req, opts) {
458
458
  * @related b.guardGraphql.sanitize, b.guardGraphql.gate
459
459
  *
460
460
  * Apply the full guard-graphql threat catalog to a request bundle
461
- * (or batch array). Returns `{ ok, issues, refusal? }` per
461
+ * (or batch array). Returns `{ ok, issues }` per
462
462
  * `gateContract.aggregateIssues`. Detected classes include
463
463
  * `query-missing`, `query-cap`, `variables-cap`, `request-cap`,
464
464
  * `batch-size`, `introspection`, `persisted-query-missing`,
@@ -469,7 +469,7 @@ function _detectIssues(req, opts) {
469
469
  *
470
470
  * @opts
471
471
  * profile: "strict"|"balanced"|"permissive",
472
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
472
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
473
473
  * introspectionPolicy: "reject"|"audit"|"allow",
474
474
  * persistedQueryPolicy: "require"|"audit"|"allow",
475
475
  * operationNamePolicy: "reject"|"audit"|"allow",
@@ -528,7 +528,7 @@ function validate(input, opts) {
528
528
  *
529
529
  * @opts
530
530
  * profile: "strict"|"balanced"|"permissive",
531
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
531
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
532
532
  * ...: every guardGraphql.validate opt is honored,
533
533
  *
534
534
  * @example
@@ -573,13 +573,13 @@ function sanitize(input, opts) {
573
573
  *
574
574
  * @opts
575
575
  * profile: "strict"|"balanced"|"permissive",
576
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
576
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
577
577
  * name: string, // gate label for audit trails
578
578
  * ...: every guardGraphql.validate opt is honored,
579
579
  *
580
580
  * @example
581
581
  * var gqlGate = b.guardGraphql.gate({ profile: "strict" });
582
- * var rv = await gqlGate.run({
582
+ * var rv = await gqlGate.check({
583
583
  * graphqlRequest: {
584
584
  * query: "{ a:me { id } b:me { id } c:me { id } d:me { id } " +
585
585
  * "e:me { id } f:me { id } g:me { id } h:me { id } " +
@@ -1030,7 +1030,7 @@ function sanitize(input, opts) {
1030
1030
  * Returns a guard descriptor that plugs into the framework's
1031
1031
  * content-safety wiring (`b.fileUpload.contentSafety` /
1032
1032
  * `b.staticServe.contentSafety` / `b.guardAll`). The descriptor's
1033
- * `inspect(ctx)` resolves to one of four actions: `serve` (no
1033
+ * `check(ctx)` resolves to one of four actions: `serve` (no
1034
1034
  * issues), `audit-only` (low-severity issues observed), `sanitize`
1035
1035
  * (sanitized buffer attached when no policy is "reject"), or
1036
1036
  * `refuse` (critical issue with at least one reject-policy active).
@@ -1057,7 +1057,7 @@ function sanitize(input, opts) {
1057
1057
  *
1058
1058
  * // Refuse on tag-budget exceeded — strict profile rejects <script>.
1059
1059
  * var hostileBuf = Buffer.from("<p>hi</p><script>alert(1)</script>", "utf8");
1060
- * var rv = await g.inspect({ bytes: hostileBuf, contentType: "text/html" });
1060
+ * var rv = await g.check({ bytes: hostileBuf, contentType: "text/html" });
1061
1061
  * rv.ok; // → false
1062
1062
  * rv.action; // → "refuse"
1063
1063
  */
@@ -421,7 +421,7 @@ function sanitize(input, opts) {
421
421
  *
422
422
  * @opts
423
423
  * profile: "strict"|"balanced"|"permissive",
424
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
424
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
425
425
  * name: string,
426
426
  * ...: any validate opt
427
427
  *
@@ -59,7 +59,7 @@
59
59
  *
60
60
  * Profiles: `strict` / `balanced` / `permissive`. Compliance
61
61
  * postures: `hipaa` / `pci-dss` / `gdpr` / `soc2`. Operators select
62
- * via `{ profile: "strict" }` or `{ compliance: "hipaa" }`;
62
+ * via `{ profile: "strict" }` or `{ compliancePosture: "hipaa" }`;
63
63
  * postures overlay on top of the profile baseline.
64
64
  *
65
65
  * Source files MUST be pure ASCII; threat-detection regexes
@@ -571,7 +571,7 @@ function _stripPollutionTree(value, opts, depth) {
571
571
  *
572
572
  * Inspect `input` (string of JSON source) for the full guard-json
573
573
  * threat catalog without committing to a parsed value. Returns
574
- * `{ ok, issues, severities }` where `issues` is the aggregated
574
+ * `{ ok, issues }` where `issues` is the aggregated
575
575
  * detector output — every prototype-pollution key, depth/breadth
576
576
  * cap hit, duplicate-key smuggle, JSON5-quirk match, BOM placement,
577
577
  * unicode threat, and numeric-precision-loss candidate is reported
@@ -587,7 +587,7 @@ function _stripPollutionTree(value, opts, depth) {
587
587
  *
588
588
  * @opts
589
589
  * profile: "strict"|"balanced"|"permissive",
590
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
590
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
591
591
  * pollutionPolicy: "reject"|"strip"|"audit"|"allow",
592
592
  * duplicateKeyPolicy: "reject"|"audit"|"allow",
593
593
  * nanInfinityPolicy: "reject"|"audit"|"allow",
@@ -660,7 +660,7 @@ function validate(input, opts) {
660
660
  *
661
661
  * @opts
662
662
  * profile: "strict"|"balanced"|"permissive",
663
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
663
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
664
664
  * pollutionPolicy: "reject"|"strip"|"audit"|"allow",
665
665
  * bomPolicy: "reject"|"strip"|"allow",
666
666
  * controlPolicy: "reject"|"strip"|"allow",
@@ -770,7 +770,7 @@ function _policyKeyForRuleId(ruleId) {
770
770
  *
771
771
  * @opts
772
772
  * profile: "strict"|"balanced"|"permissive",
773
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
773
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
774
774
  * name: string, // gate identity for audit / observability
775
775
  *
776
776
  * @example
@@ -34,7 +34,7 @@
34
34
  * Profiles: `strict` / `balanced` / `permissive`. Compliance
35
35
  * postures: `hipaa` / `pci-dss` / `gdpr` / `soc2`. Operators
36
36
  * select via `{ profile: "strict" }` or
37
- * `{ compliance: "hipaa" }`; postures overlay on top of the
37
+ * `{ compliancePosture: "hipaa" }`; postures overlay on top of the
38
38
  * profile baseline. Filter / script / dynamic-hint refusal holds
39
39
  * at every profile — the RCE class is never an operator opt-in.
40
40
  *
@@ -257,7 +257,7 @@ function _detectIssues(input, opts) {
257
257
  *
258
258
  * @opts
259
259
  * profile: "strict"|"balanced"|"permissive",
260
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
260
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
261
261
  * bidiPolicy: "reject"|"audit"|"allow",
262
262
  * controlPolicy: "reject"|"audit"|"allow",
263
263
  * nullBytePolicy: "reject"|"audit"|"allow",
@@ -308,7 +308,7 @@ function validate(input, opts) {
308
308
  *
309
309
  * @opts
310
310
  * profile: "strict"|"balanced"|"permissive",
311
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
311
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
312
312
  * filterExprPolicy: "reject"|"audit"|"allow",
313
313
  * scriptExprPolicy: "reject"|"audit"|"allow",
314
314
  * dynamicHintPolicy: "reject"|"audit"|"allow",
@@ -360,7 +360,7 @@ function sanitize(input, opts) {
360
360
  *
361
361
  * @opts
362
362
  * profile: "strict"|"balanced"|"permissive",
363
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
363
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
364
364
  * name: string, // override gate name in audit emissions
365
365
  * filterExprPolicy: "reject"|"audit"|"allow",
366
366
  * scriptExprPolicy: "reject"|"audit"|"allow",
@@ -441,7 +441,7 @@ function _detectIssues(input, opts) {
441
441
  * @related b.guardJwt.sanitize, b.guardJwt.gate
442
442
  *
443
443
  * Apply the full guard-jwt threat catalog to a JWT compact-
444
- * serialization string. Returns `{ ok, issues, refusal? }` per
444
+ * serialization string. Returns `{ ok, issues }` per
445
445
  * `gateContract.aggregateIssues`. Detected classes include
446
446
  * `alg-none` (always critical), `kid-traversal` (always critical),
447
447
  * `alg-not-allowed`, `typ-confusion`, `crit-unknown`, `exp-past`,
@@ -456,7 +456,7 @@ function _detectIssues(input, opts) {
456
456
  *
457
457
  * @opts
458
458
  * profile: "strict"|"balanced"|"permissive",
459
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
459
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
460
460
  * allowedAlgs: string[],
461
461
  * requiredClaims: string[],
462
462
  * knownCrit: string[],
@@ -524,7 +524,7 @@ function validate(input, opts) {
524
524
  *
525
525
  * @opts
526
526
  * profile: "strict"|"balanced"|"permissive",
527
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
527
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
528
528
  * ...: every guardJwt.validate opt is honored,
529
529
  *
530
530
  * @example
@@ -573,13 +573,13 @@ function sanitize(input, opts) {
573
573
  *
574
574
  * @opts
575
575
  * profile: "strict"|"balanced"|"permissive",
576
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
576
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
577
577
  * name: string, // gate label for audit trails
578
578
  * ...: every guardJwt.validate opt is honored,
579
579
  *
580
580
  * @example
581
581
  * var jwtGate = b.guardJwt.gate({ profile: "strict" });
582
- * var rv = await jwtGate.run({
582
+ * var rv = await jwtGate.check({
583
583
  * identifier:
584
584
  * "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0." +
585
585
  * "eyJzdWIiOiJhdHRhY2tlciJ9.",
@@ -505,7 +505,7 @@ function _detectIssues(input, opts) {
505
505
  *
506
506
  * @opts
507
507
  * profile: "strict"|"balanced"|"permissive",
508
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
508
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
509
509
  * bidiPolicy: "reject"|"strip"|"audit"|"allow",
510
510
  * controlPolicy: "reject"|"strip"|"allow",
511
511
  * nullBytePolicy: "reject"|"strip"|"allow",
@@ -568,7 +568,7 @@ function validate(input, opts) {
568
568
  *
569
569
  * @opts
570
570
  * profile: "strict"|"balanced"|"permissive",
571
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
571
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
572
572
  * ...: same shape as b.guardMarkdown.validate opts,
573
573
  *
574
574
  * @example
@@ -606,7 +606,7 @@ function sanitize(input, opts) {
606
606
  * @compliance hipaa, pci-dss, gdpr, soc2
607
607
  * @related b.guardMarkdown.validate, b.guardMarkdown.sanitize, b.guardAll.gate, b.staticServe.create
608
608
  *
609
- * Build an async gate `(ctx) -> { ok, action, issues }` consumable
609
+ * Build a guard gate whose async `check(ctx)` returns `{ ok, action, issues }`, consumable
610
610
  * by `b.guardAll`, `b.staticServe`, `b.fileUpload`, and any host
611
611
  * that ingests user-supplied markdown. The gate decodes
612
612
  * `ctx.bytes` / `ctx.bodyText`, runs `validate`, and maps
@@ -617,15 +617,15 @@ function sanitize(input, opts) {
617
617
  * @opts
618
618
  * name: string, // gate label for audit / observability
619
619
  * profile: "strict"|"balanced"|"permissive",
620
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
620
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
621
621
  * ...: same shape as b.guardMarkdown.validate opts,
622
622
  *
623
623
  * @example
624
624
  * var g = b.guardMarkdown.gate({ profile: "strict" });
625
- * var rv = await g({ bytes: Buffer.from("# hello\n", "utf8") });
625
+ * var rv = await g.check({ bytes: Buffer.from("# hello\n", "utf8") });
626
626
  * rv.action; // → "serve"
627
627
  *
628
- * var bad = await g({ bytes: Buffer.from("[x](javascript:1)", "utf8") });
628
+ * var bad = await g.check({ bytes: Buffer.from("[x](javascript:1)", "utf8") });
629
629
  * bad.action; // → "refuse"
630
630
  */
631
631
  function gate(opts) {
@@ -369,7 +369,7 @@ function _detectIssues(input, opts) {
369
369
  *
370
370
  * @opts
371
371
  * profile: "strict"|"balanced"|"permissive",
372
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
372
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
373
373
  * bidiPolicy: "reject"|"strip"|"audit"|"allow",
374
374
  * controlPolicy: "reject"|"strip"|"allow",
375
375
  * nullBytePolicy: "reject"|"strip"|"allow",
@@ -423,7 +423,7 @@ function validate(input, opts) {
423
423
  *
424
424
  * @opts
425
425
  * profile: "strict"|"balanced"|"permissive",
426
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
426
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
427
427
  * ...: same shape as b.guardMime.validate opts,
428
428
  *
429
429
  * @example
@@ -467,7 +467,7 @@ function sanitize(input, opts) {
467
467
  * @compliance hipaa, pci-dss, gdpr, soc2
468
468
  * @related b.guardMime.validate, b.guardMime.sanitize, b.guardAll.gate
469
469
  *
470
- * Build an async gate `(ctx) -> { ok, action, issues }` consumable
470
+ * Build a guard gate whose async `check(ctx)` returns `{ ok, action, issues }`, consumable
471
471
  * by `b.guardAll`, `b.staticServe`, `b.fileUpload`, and any other
472
472
  * host that integrates the guard contract. The gate reads
473
473
  * `ctx.identifier` (or `ctx.mime`), runs `validate`, and maps
@@ -477,15 +477,15 @@ function sanitize(input, opts) {
477
477
  * @opts
478
478
  * name: string, // gate label for audit / observability
479
479
  * profile: "strict"|"balanced"|"permissive",
480
- * compliance: "hipaa"|"pci-dss"|"gdpr"|"soc2",
480
+ * compliancePosture: "hipaa"|"pci-dss"|"gdpr"|"soc2",
481
481
  * ...: same shape as b.guardMime.validate opts,
482
482
  *
483
483
  * @example
484
484
  * var g = b.guardMime.gate({ profile: "strict" });
485
- * var rv = await g({ identifier: "application/json" });
485
+ * var rv = await g.check({ identifier: "application/json" });
486
486
  * rv.action; // → "serve"
487
487
  *
488
- * var bad = await g({ identifier: "application/x-msdownload" });
488
+ * var bad = await g.check({ identifier: "application/x-msdownload" });
489
489
  * bad.action; // → "refuse"
490
490
  */
491
491
  function gate(opts) {