@blamejs/blamejs-shop 0.5.12 → 0.5.14

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 (522) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/lib/asset-manifest.json +1 -1
  3. package/lib/sales-tax-filings.js +143 -0
  4. package/lib/vendor/MANIFEST.json +632 -416
  5. package/lib/vendor/blamejs/.clusterfuzzlite/Dockerfile +21 -10
  6. package/lib/vendor/blamejs/.clusterfuzzlite/build.sh +30 -9
  7. package/lib/vendor/blamejs/.github/dependabot.yml +8 -0
  8. package/lib/vendor/blamejs/.github/workflows/actions-lint.yml +3 -3
  9. package/lib/vendor/blamejs/.github/workflows/cflite_batch.yml +7 -2
  10. package/lib/vendor/blamejs/.github/workflows/cflite_pr.yml +7 -2
  11. package/lib/vendor/blamejs/.github/workflows/ci.yml +21 -21
  12. package/lib/vendor/blamejs/.github/workflows/codeql.yml +3 -3
  13. package/lib/vendor/blamejs/.github/workflows/npm-publish.yml +4 -4
  14. package/lib/vendor/blamejs/.github/workflows/release-container.yml +7 -7
  15. package/lib/vendor/blamejs/.github/workflows/scorecard.yml +3 -3
  16. package/lib/vendor/blamejs/.github/workflows/sha-to-tag-verify.yml +1 -1
  17. package/lib/vendor/blamejs/.gitignore +2 -0
  18. package/lib/vendor/blamejs/CHANGELOG.md +122 -0
  19. package/lib/vendor/blamejs/NOTICE +26 -1
  20. package/lib/vendor/blamejs/SECURITY.md +1 -1
  21. package/lib/vendor/blamejs/api-snapshot.json +207 -5
  22. package/lib/vendor/blamejs/docker/keycloak/realm-blamejs-test.json +29 -0
  23. package/lib/vendor/blamejs/examples/wiki/DEPLOY.md +1 -0
  24. package/lib/vendor/blamejs/examples/wiki/lib/build-app.js +31 -0
  25. package/lib/vendor/blamejs/examples/wiki/lib/source-comment-block-validator.js +109 -0
  26. package/lib/vendor/blamejs/examples/wiki/nginx.conf +106 -0
  27. package/lib/vendor/blamejs/examples/wiki/package-lock.json +1 -1
  28. package/lib/vendor/blamejs/examples/wiki/test/e2e.js +92 -0
  29. package/lib/vendor/blamejs/fuzz/asn1-der.fuzz.js +28 -0
  30. package/lib/vendor/blamejs/fuzz/cms-codec.fuzz.js +17 -0
  31. package/lib/vendor/blamejs/fuzz/link-header.fuzz.js +18 -0
  32. package/lib/vendor/blamejs/index.js +6 -0
  33. package/lib/vendor/blamejs/lib/a2a.js +4 -4
  34. package/lib/vendor/blamejs/lib/agent-idempotency.js +18 -2
  35. package/lib/vendor/blamejs/lib/agent-saga.js +36 -8
  36. package/lib/vendor/blamejs/lib/agent-snapshot.js +63 -6
  37. package/lib/vendor/blamejs/lib/app-shutdown.js +23 -20
  38. package/lib/vendor/blamejs/lib/archive-read.js +8 -0
  39. package/lib/vendor/blamejs/lib/archive-tar.js +12 -2
  40. package/lib/vendor/blamejs/lib/arg-parser.js +49 -5
  41. package/lib/vendor/blamejs/lib/asn1-der.js +12 -0
  42. package/lib/vendor/blamejs/lib/audit-sign.js +47 -1
  43. package/lib/vendor/blamejs/lib/audit.js +71 -8
  44. package/lib/vendor/blamejs/lib/auth/ciba.js +14 -2
  45. package/lib/vendor/blamejs/lib/auth/fido-mds3.js +58 -47
  46. package/lib/vendor/blamejs/lib/auth/jwt.js +34 -0
  47. package/lib/vendor/blamejs/lib/auth/oauth.js +90 -13
  48. package/lib/vendor/blamejs/lib/auth/oid4vci.js +20 -17
  49. package/lib/vendor/blamejs/lib/auth/openid-federation.js +214 -23
  50. package/lib/vendor/blamejs/lib/auth/saml.js +38 -20
  51. package/lib/vendor/blamejs/lib/auth/sd-jwt-vc.js +10 -4
  52. package/lib/vendor/blamejs/lib/backup/bundle.js +13 -3
  53. package/lib/vendor/blamejs/lib/backup/index.js +16 -5
  54. package/lib/vendor/blamejs/lib/backup/manifest.js +18 -5
  55. package/lib/vendor/blamejs/lib/base32.js +21 -0
  56. package/lib/vendor/blamejs/lib/break-glass.js +19 -10
  57. package/lib/vendor/blamejs/lib/bundler.js +5 -1
  58. package/lib/vendor/blamejs/lib/cache-status.js +3 -7
  59. package/lib/vendor/blamejs/lib/calendar.js +21 -1
  60. package/lib/vendor/blamejs/lib/cbor.js +12 -1
  61. package/lib/vendor/blamejs/lib/cert.js +29 -11
  62. package/lib/vendor/blamejs/lib/cli.js +94 -24
  63. package/lib/vendor/blamejs/lib/cloud-events.js +2 -2
  64. package/lib/vendor/blamejs/lib/cluster-provider-db.js +13 -3
  65. package/lib/vendor/blamejs/lib/codepoint-class.js +85 -0
  66. package/lib/vendor/blamejs/lib/compliance-ai-act-prohibited.js +8 -4
  67. package/lib/vendor/blamejs/lib/compliance-ai-act-transparency.js +19 -4
  68. package/lib/vendor/blamejs/lib/compliance-ai-act.js +6 -8
  69. package/lib/vendor/blamejs/lib/content-credentials.js +1 -1
  70. package/lib/vendor/blamejs/lib/content-digest.js +2 -1
  71. package/lib/vendor/blamejs/lib/cookies.js +13 -3
  72. package/lib/vendor/blamejs/lib/cose.js +31 -16
  73. package/lib/vendor/blamejs/lib/crypto-field.js +32 -0
  74. package/lib/vendor/blamejs/lib/crypto-oprf.js +11 -2
  75. package/lib/vendor/blamejs/lib/crypto-xwing.js +22 -4
  76. package/lib/vendor/blamejs/lib/crypto.js +314 -19
  77. package/lib/vendor/blamejs/lib/csp.js +11 -3
  78. package/lib/vendor/blamejs/lib/daemon.js +270 -24
  79. package/lib/vendor/blamejs/lib/dark-patterns.js +5 -2
  80. package/lib/vendor/blamejs/lib/db-declare-view.js +2 -2
  81. package/lib/vendor/blamejs/lib/db-query.js +34 -7
  82. package/lib/vendor/blamejs/lib/db.js +18 -6
  83. package/lib/vendor/blamejs/lib/dbsc.js +17 -0
  84. package/lib/vendor/blamejs/lib/dev.js +21 -2
  85. package/lib/vendor/blamejs/lib/dsr.js +157 -102
  86. package/lib/vendor/blamejs/lib/external-db.js +41 -2
  87. package/lib/vendor/blamejs/lib/file-upload.js +25 -7
  88. package/lib/vendor/blamejs/lib/flag-providers.js +27 -15
  89. package/lib/vendor/blamejs/lib/forms.js +113 -27
  90. package/lib/vendor/blamejs/lib/gate-contract.js +23 -10
  91. package/lib/vendor/blamejs/lib/gdpr-ropa.js +8 -1
  92. package/lib/vendor/blamejs/lib/guard-agent-registry.js +1 -1
  93. package/lib/vendor/blamejs/lib/guard-archive.js +2 -2
  94. package/lib/vendor/blamejs/lib/guard-cidr.js +27 -1
  95. package/lib/vendor/blamejs/lib/guard-graphql.js +30 -11
  96. package/lib/vendor/blamejs/lib/guard-html.js +26 -53
  97. package/lib/vendor/blamejs/lib/guard-image.js +24 -5
  98. package/lib/vendor/blamejs/lib/guard-imap-command.js +10 -2
  99. package/lib/vendor/blamejs/lib/guard-jmap.js +19 -3
  100. package/lib/vendor/blamejs/lib/guard-jwt.js +18 -2
  101. package/lib/vendor/blamejs/lib/guard-list-unsubscribe.js +2 -2
  102. package/lib/vendor/blamejs/lib/guard-managesieve-command.js +10 -2
  103. package/lib/vendor/blamejs/lib/guard-markdown.js +11 -24
  104. package/lib/vendor/blamejs/lib/guard-pdf.js +18 -2
  105. package/lib/vendor/blamejs/lib/guard-pop3-command.js +10 -2
  106. package/lib/vendor/blamejs/lib/guard-regex.js +8 -5
  107. package/lib/vendor/blamejs/lib/guard-svg.js +31 -32
  108. package/lib/vendor/blamejs/lib/guard-time.js +1 -1
  109. package/lib/vendor/blamejs/lib/guard-uuid.js +2 -2
  110. package/lib/vendor/blamejs/lib/html-balance.js +3 -3
  111. package/lib/vendor/blamejs/lib/http-client-cache.js +82 -4
  112. package/lib/vendor/blamejs/lib/http-client-cookie-jar.js +16 -1
  113. package/lib/vendor/blamejs/lib/http-client.js +39 -7
  114. package/lib/vendor/blamejs/lib/http-message-signature.js +35 -1
  115. package/lib/vendor/blamejs/lib/i18n-messageformat.js +31 -6
  116. package/lib/vendor/blamejs/lib/i18n.js +35 -21
  117. package/lib/vendor/blamejs/lib/incident-report.js +8 -1
  118. package/lib/vendor/blamejs/lib/ip-utils.js +11 -1
  119. package/lib/vendor/blamejs/lib/json-path.js +23 -1
  120. package/lib/vendor/blamejs/lib/jwk.js +20 -3
  121. package/lib/vendor/blamejs/lib/link-header.js +2 -1
  122. package/lib/vendor/blamejs/lib/log-stream-otlp-grpc.js +5 -1
  123. package/lib/vendor/blamejs/lib/log-stream-otlp.js +5 -1
  124. package/lib/vendor/blamejs/lib/log-stream.js +8 -3
  125. package/lib/vendor/blamejs/lib/mail-auth.js +123 -22
  126. package/lib/vendor/blamejs/lib/mail-bimi.js +1 -1
  127. package/lib/vendor/blamejs/lib/mail-bounce.js +8 -0
  128. package/lib/vendor/blamejs/lib/mail-crypto-pgp.js +46 -10
  129. package/lib/vendor/blamejs/lib/mail-dav.js +22 -3
  130. package/lib/vendor/blamejs/lib/mail-dkim.js +96 -30
  131. package/lib/vendor/blamejs/lib/mail-helo.js +6 -1
  132. package/lib/vendor/blamejs/lib/mail-scan.js +23 -16
  133. package/lib/vendor/blamejs/lib/mail-send-deliver.js +34 -8
  134. package/lib/vendor/blamejs/lib/mail-server-imap.js +3 -4
  135. package/lib/vendor/blamejs/lib/mail-server-managesieve.js +7 -11
  136. package/lib/vendor/blamejs/lib/mail-server-mx.js +93 -7
  137. package/lib/vendor/blamejs/lib/mail-server-registry.js +8 -2
  138. package/lib/vendor/blamejs/lib/mail.js +15 -5
  139. package/lib/vendor/blamejs/lib/metrics.js +268 -63
  140. package/lib/vendor/blamejs/lib/middleware/age-gate.js +7 -1
  141. package/lib/vendor/blamejs/lib/middleware/asyncapi-serve.js +1 -1
  142. package/lib/vendor/blamejs/lib/middleware/body-parser.js +19 -4
  143. package/lib/vendor/blamejs/lib/middleware/bot-guard.js +5 -9
  144. package/lib/vendor/blamejs/lib/middleware/csp-report.js +40 -8
  145. package/lib/vendor/blamejs/lib/middleware/csrf-protect.js +24 -10
  146. package/lib/vendor/blamejs/lib/middleware/dpop.js +10 -5
  147. package/lib/vendor/blamejs/lib/middleware/index.js +6 -1
  148. package/lib/vendor/blamejs/lib/middleware/nel.js +1 -1
  149. package/lib/vendor/blamejs/lib/middleware/openapi-serve.js +1 -1
  150. package/lib/vendor/blamejs/lib/middleware/rate-limit.js +12 -1
  151. package/lib/vendor/blamejs/lib/middleware/require-bound-key.js +1 -1
  152. package/lib/vendor/blamejs/lib/middleware/scim-server.js +1 -1
  153. package/lib/vendor/blamejs/lib/middleware/tus-upload.js +6 -2
  154. package/lib/vendor/blamejs/lib/mtls-ca.js +18 -2
  155. package/lib/vendor/blamejs/lib/network-dns-resolver.js +11 -1
  156. package/lib/vendor/blamejs/lib/network-dns.js +21 -2
  157. package/lib/vendor/blamejs/lib/network-tls.js +69 -7
  158. package/lib/vendor/blamejs/lib/nonce-store.js +9 -1
  159. package/lib/vendor/blamejs/lib/object-store/gcs.js +7 -0
  160. package/lib/vendor/blamejs/lib/object-store/sigv4.js +31 -0
  161. package/lib/vendor/blamejs/lib/observability-otlp-exporter.js +1 -1
  162. package/lib/vendor/blamejs/lib/outbox.js +1 -1
  163. package/lib/vendor/blamejs/lib/parsers/safe-ini.js +9 -1
  164. package/lib/vendor/blamejs/lib/parsers/safe-toml.js +10 -1
  165. package/lib/vendor/blamejs/lib/permissions.js +6 -3
  166. package/lib/vendor/blamejs/lib/pid-probe.js +55 -0
  167. package/lib/vendor/blamejs/lib/pqc-agent.js +8 -1
  168. package/lib/vendor/blamejs/lib/pqc-software.js +3 -3
  169. package/lib/vendor/blamejs/lib/pubsub.js +20 -9
  170. package/lib/vendor/blamejs/lib/queue-local.js +8 -1
  171. package/lib/vendor/blamejs/lib/queue-redis.js +5 -0
  172. package/lib/vendor/blamejs/lib/redact.js +54 -0
  173. package/lib/vendor/blamejs/lib/restore-bundle.js +10 -2
  174. package/lib/vendor/blamejs/lib/restore.js +19 -0
  175. package/lib/vendor/blamejs/lib/retention.js +12 -4
  176. package/lib/vendor/blamejs/lib/router.js +60 -6
  177. package/lib/vendor/blamejs/lib/safe-buffer.js +69 -0
  178. package/lib/vendor/blamejs/lib/safe-decompress.js +8 -2
  179. package/lib/vendor/blamejs/lib/safe-dns.js +25 -20
  180. package/lib/vendor/blamejs/lib/safe-ical.js +7 -3
  181. package/lib/vendor/blamejs/lib/safe-mime.js +12 -1
  182. package/lib/vendor/blamejs/lib/safe-object.js +80 -0
  183. package/lib/vendor/blamejs/lib/safe-path.js +52 -4
  184. package/lib/vendor/blamejs/lib/safe-redirect.js +10 -2
  185. package/lib/vendor/blamejs/lib/safe-schema.js +4 -1
  186. package/lib/vendor/blamejs/lib/safe-sieve.js +33 -1
  187. package/lib/vendor/blamejs/lib/safe-sql.js +88 -0
  188. package/lib/vendor/blamejs/lib/safe-vcard.js +7 -3
  189. package/lib/vendor/blamejs/lib/scheduler.js +8 -1
  190. package/lib/vendor/blamejs/lib/security-assert.js +6 -6
  191. package/lib/vendor/blamejs/lib/self-update-standalone-verifier.js +74 -27
  192. package/lib/vendor/blamejs/lib/self-update.js +517 -87
  193. package/lib/vendor/blamejs/lib/server-timing.js +2 -4
  194. package/lib/vendor/blamejs/lib/session.js +34 -12
  195. package/lib/vendor/blamejs/lib/sql.js +15 -1
  196. package/lib/vendor/blamejs/lib/ssrf-guard.js +52 -0
  197. package/lib/vendor/blamejs/lib/static.js +55 -13
  198. package/lib/vendor/blamejs/lib/storage.js +8 -2
  199. package/lib/vendor/blamejs/lib/subject.js +6 -1
  200. package/lib/vendor/blamejs/lib/tenant-quota.js +52 -13
  201. package/lib/vendor/blamejs/lib/tls-exporter.js +3 -3
  202. package/lib/vendor/blamejs/lib/tsa.js +34 -13
  203. package/lib/vendor/blamejs/lib/uri-template.js +8 -1
  204. package/lib/vendor/blamejs/lib/vault/index.js +13 -0
  205. package/lib/vendor/blamejs/lib/vc.js +44 -5
  206. package/lib/vendor/blamejs/lib/vendor/MANIFEST.json +26 -26
  207. package/lib/vendor/blamejs/lib/vendor/noble-ciphers.cjs +792 -1
  208. package/lib/vendor/blamejs/lib/vendor/noble-curves.cjs +3443 -1
  209. package/lib/vendor/blamejs/lib/vendor/noble-post-quantum.cjs +2737 -1
  210. package/lib/vendor/blamejs/lib/vendor/pki.cjs +39550 -13
  211. package/lib/vendor/blamejs/lib/vendor/public-suffix-list.dat +55 -53
  212. package/lib/vendor/blamejs/lib/vendor/public-suffix-list.data.js +5551 -5554
  213. package/lib/vendor/blamejs/lib/vendor/simplewebauthn-server.cjs +22459 -32
  214. package/lib/vendor/blamejs/lib/watcher.js +89 -17
  215. package/lib/vendor/blamejs/lib/webhook-dispatcher.js +25 -3
  216. package/lib/vendor/blamejs/lib/webhook.js +12 -2
  217. package/lib/vendor/blamejs/lib/ws-client.js +32 -1
  218. package/lib/vendor/blamejs/lib/xml-c14n.js +29 -1
  219. package/lib/vendor/blamejs/oss-fuzz/projects/blamejs/Dockerfile +1 -1
  220. package/lib/vendor/blamejs/package-lock.json +2 -2
  221. package/lib/vendor/blamejs/package.json +1 -1
  222. package/lib/vendor/blamejs/release-notes/v0.16.x.json +1462 -0
  223. package/lib/vendor/blamejs/release-notes/v0.17.0.json +31 -0
  224. package/lib/vendor/blamejs/release-notes/v0.17.1.json +31 -0
  225. package/lib/vendor/blamejs/release-notes/v0.17.10.json +30 -0
  226. package/lib/vendor/blamejs/release-notes/v0.17.11.json +22 -0
  227. package/lib/vendor/blamejs/release-notes/v0.17.12.json +18 -0
  228. package/lib/vendor/blamejs/release-notes/v0.17.13.json +77 -0
  229. package/lib/vendor/blamejs/release-notes/v0.17.14.json +40 -0
  230. package/lib/vendor/blamejs/release-notes/v0.17.15.json +18 -0
  231. package/lib/vendor/blamejs/release-notes/v0.17.16.json +27 -0
  232. package/lib/vendor/blamejs/release-notes/v0.17.17.json +31 -0
  233. package/lib/vendor/blamejs/release-notes/v0.17.18.json +18 -0
  234. package/lib/vendor/blamejs/release-notes/v0.17.19.json +18 -0
  235. package/lib/vendor/blamejs/release-notes/v0.17.2.json +26 -0
  236. package/lib/vendor/blamejs/release-notes/v0.17.20.json +43 -0
  237. package/lib/vendor/blamejs/release-notes/v0.17.21.json +26 -0
  238. package/lib/vendor/blamejs/release-notes/v0.17.22.json +18 -0
  239. package/lib/vendor/blamejs/release-notes/v0.17.3.json +43 -0
  240. package/lib/vendor/blamejs/release-notes/v0.17.4.json +35 -0
  241. package/lib/vendor/blamejs/release-notes/v0.17.5.json +26 -0
  242. package/lib/vendor/blamejs/release-notes/v0.17.6.json +26 -0
  243. package/lib/vendor/blamejs/release-notes/v0.17.7.json +35 -0
  244. package/lib/vendor/blamejs/release-notes/v0.17.8.json +22 -0
  245. package/lib/vendor/blamejs/release-notes/v0.17.9.json +26 -0
  246. package/lib/vendor/blamejs/scripts/validate-source-comment-blocks.js +4 -0
  247. package/lib/vendor/blamejs/scripts/vendor-update.sh +293 -9
  248. package/lib/vendor/blamejs/socket.yml +94 -0
  249. package/lib/vendor/blamejs/test/00-primitives.js +605 -0
  250. package/lib/vendor/blamejs/test/helpers/drivers.js +12 -9
  251. package/lib/vendor/blamejs/test/integration/audit-stack-mysql.test.js +90 -1
  252. package/lib/vendor/blamejs/test/integration/audit-stack-postgres.test.js +122 -1
  253. package/lib/vendor/blamejs/test/integration/data-layer-mysql.test.js +30 -0
  254. package/lib/vendor/blamejs/test/integration/data-layer-pg.test.js +29 -0
  255. package/lib/vendor/blamejs/test/integration/dsr-cluster-mysql.test.js +479 -0
  256. package/lib/vendor/blamejs/test/integration/dsr-cluster-pg.test.js +487 -0
  257. package/lib/vendor/blamejs/test/integration/federation-auth.test.js +313 -5
  258. package/lib/vendor/blamejs/test/integration/mail-dkim.test.js +80 -0
  259. package/lib/vendor/blamejs/test/integration/openid-federation-chain.test.js +275 -0
  260. package/lib/vendor/blamejs/test/integration/webhook-dispatcher-pg.test.js +96 -0
  261. package/lib/vendor/blamejs/test/layer-0-primitives/a2a-tasks.test.js +401 -0
  262. package/lib/vendor/blamejs/test/layer-0-primitives/acme.test.js +1649 -2
  263. package/lib/vendor/blamejs/test/layer-0-primitives/age-gate.test.js +33 -0
  264. package/lib/vendor/blamejs/test/layer-0-primitives/agent-idempotency.test.js +0 -0
  265. package/lib/vendor/blamejs/test/layer-0-primitives/agent-saga.test.js +60 -0
  266. package/lib/vendor/blamejs/test/layer-0-primitives/agent-snapshot.test.js +524 -0
  267. package/lib/vendor/blamejs/test/layer-0-primitives/api-encrypt.test.js +891 -0
  268. package/lib/vendor/blamejs/test/layer-0-primitives/app-shutdown.test.js +128 -1
  269. package/lib/vendor/blamejs/test/layer-0-primitives/archive-adapters.test.js +271 -0
  270. package/lib/vendor/blamejs/test/layer-0-primitives/archive-read.test.js +628 -1
  271. package/lib/vendor/blamejs/test/layer-0-primitives/archive-tar-read.test.js +0 -0
  272. package/lib/vendor/blamejs/test/layer-0-primitives/archive-wrap.test.js +227 -0
  273. package/lib/vendor/blamejs/test/layer-0-primitives/arg-parser.test.js +15 -0
  274. package/lib/vendor/blamejs/test/layer-0-primitives/asn1-der.test.js +73 -0
  275. package/lib/vendor/blamejs/test/layer-0-primitives/atomic-file.test.js +114 -0
  276. package/lib/vendor/blamejs/test/layer-0-primitives/audit-sign-anchor.test.js +141 -0
  277. package/lib/vendor/blamejs/test/layer-0-primitives/audit-tools.test.js +624 -0
  278. package/lib/vendor/blamejs/test/layer-0-primitives/audit.test.js +769 -0
  279. package/lib/vendor/blamejs/test/layer-0-primitives/auth-jwt-defenses.test.js +436 -0
  280. package/lib/vendor/blamejs/test/layer-0-primitives/auth-oauth.test.js +1697 -0
  281. package/lib/vendor/blamejs/test/layer-0-primitives/auth-oid4vp.test.js +495 -0
  282. package/lib/vendor/blamejs/test/layer-0-primitives/auth-password.test.js +500 -0
  283. package/lib/vendor/blamejs/test/layer-0-primitives/auth-saml.test.js +1809 -0
  284. package/lib/vendor/blamejs/test/layer-0-primitives/auth-status-list.test.js +243 -1
  285. package/lib/vendor/blamejs/test/layer-0-primitives/backup-index.test.js +2226 -0
  286. package/lib/vendor/blamejs/test/layer-0-primitives/backup-manifest-signature.test.js +183 -0
  287. package/lib/vendor/blamejs/test/layer-0-primitives/base32.test.js +105 -0
  288. package/lib/vendor/blamejs/test/layer-0-primitives/break-glass.test.js +693 -0
  289. package/lib/vendor/blamejs/test/layer-0-primitives/cache.test.js +603 -0
  290. package/lib/vendor/blamejs/test/layer-0-primitives/calendar.test.js +557 -0
  291. package/lib/vendor/blamejs/test/layer-0-primitives/case-insensitive-security-token-guard.test.js +214 -0
  292. package/lib/vendor/blamejs/test/layer-0-primitives/cbor.test.js +25 -0
  293. package/lib/vendor/blamejs/test/layer-0-primitives/cert.test.js +843 -6
  294. package/lib/vendor/blamejs/test/layer-0-primitives/ciba-authreqid-binding.test.js +77 -2
  295. package/lib/vendor/blamejs/test/layer-0-primitives/ciba.test.js +866 -0
  296. package/lib/vendor/blamejs/test/layer-0-primitives/clear-site-data.test.js +18 -0
  297. package/lib/vendor/blamejs/test/layer-0-primitives/cli-erase.test.js +19 -0
  298. package/lib/vendor/blamejs/test/layer-0-primitives/cli.test.js +2790 -0
  299. package/lib/vendor/blamejs/test/layer-0-primitives/cluster-lease-renewal-ttl.test.js +114 -0
  300. package/lib/vendor/blamejs/test/layer-0-primitives/cluster.test.js +1032 -0
  301. package/lib/vendor/blamejs/test/layer-0-primitives/cms-codec.test.js +575 -0
  302. package/lib/vendor/blamejs/test/layer-0-primitives/codebase-patterns.test.js +739 -1
  303. package/lib/vendor/blamejs/test/layer-0-primitives/codepoint-class.test.js +8 -0
  304. package/lib/vendor/blamejs/test/layer-0-primitives/compliance-ai-act.test.js +194 -0
  305. package/lib/vendor/blamejs/test/layer-0-primitives/compliance-lifecycle-proto-key.test.js +104 -0
  306. package/lib/vendor/blamejs/test/layer-0-primitives/compliance-sanctions.test.js +254 -0
  307. package/lib/vendor/blamejs/test/layer-0-primitives/content-credentials.test.js +613 -3
  308. package/lib/vendor/blamejs/test/layer-0-primitives/cookies.test.js +140 -0
  309. package/lib/vendor/blamejs/test/layer-0-primitives/cose.test.js +407 -0
  310. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-adversarial.test.js +352 -0
  311. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-field-derived-hash.test.js +32 -0
  312. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-field.test.js +575 -0
  313. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-hash-files-parallel.test.js +10 -0
  314. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-hash-stream.test.js +24 -0
  315. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-oprf.test.js +17 -0
  316. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-spki-pin.test.js +183 -0
  317. package/lib/vendor/blamejs/test/layer-0-primitives/crypto-xwing.test.js +48 -0
  318. package/lib/vendor/blamejs/test/layer-0-primitives/crypto.test.js +345 -0
  319. package/lib/vendor/blamejs/test/layer-0-primitives/csp-report.test.js +58 -0
  320. package/lib/vendor/blamejs/test/layer-0-primitives/csv.test.js +48 -0
  321. package/lib/vendor/blamejs/test/layer-0-primitives/daemon.test.js +459 -1
  322. package/lib/vendor/blamejs/test/layer-0-primitives/dark-patterns.test.js +19 -0
  323. package/lib/vendor/blamejs/test/layer-0-primitives/db-query.test.js +1019 -0
  324. package/lib/vendor/blamejs/test/layer-0-primitives/db-raw-residency-gate.test.js +77 -0
  325. package/lib/vendor/blamejs/test/layer-0-primitives/db.test.js +1621 -0
  326. package/lib/vendor/blamejs/test/layer-0-primitives/ddl-change-control.test.js +462 -3
  327. package/lib/vendor/blamejs/test/layer-0-primitives/dnssec.test.js +323 -0
  328. package/lib/vendor/blamejs/test/layer-0-primitives/dpop-middleware-verify.test.js +562 -0
  329. package/lib/vendor/blamejs/test/layer-0-primitives/dsr.test.js +901 -1
  330. package/lib/vendor/blamejs/test/layer-0-primitives/dual-control.test.js +249 -0
  331. package/lib/vendor/blamejs/test/layer-0-primitives/external-db-migrate.test.js +561 -0
  332. package/lib/vendor/blamejs/test/layer-0-primitives/external-db.test.js +1214 -0
  333. package/lib/vendor/blamejs/test/layer-0-primitives/fal.test.js +21 -0
  334. package/lib/vendor/blamejs/test/layer-0-primitives/fedcm-dbsc.test.js +46 -20
  335. package/lib/vendor/blamejs/test/layer-0-primitives/federation-vc-suite.test.js +147 -3
  336. package/lib/vendor/blamejs/test/layer-0-primitives/fido-mds3.test.js +907 -38
  337. package/lib/vendor/blamejs/test/layer-0-primitives/file-upload-content-safety-skip-audit.test.js +29 -0
  338. package/lib/vendor/blamejs/test/layer-0-primitives/file-upload.test.js +1135 -0
  339. package/lib/vendor/blamejs/test/layer-0-primitives/flag.test.js +30 -0
  340. package/lib/vendor/blamejs/test/layer-0-primitives/forms.test.js +747 -0
  341. package/lib/vendor/blamejs/test/layer-0-primitives/gate-contract.test.js +1855 -0
  342. package/lib/vendor/blamejs/test/layer-0-primitives/gdpr-ropa.test.js +30 -0
  343. package/lib/vendor/blamejs/test/layer-0-primitives/guard-archive.test.js +86 -0
  344. package/lib/vendor/blamejs/test/layer-0-primitives/guard-auth.test.js +117 -0
  345. package/lib/vendor/blamejs/test/layer-0-primitives/guard-cidr.test.js +151 -0
  346. package/lib/vendor/blamejs/test/layer-0-primitives/guard-domain.test.js +422 -0
  347. package/lib/vendor/blamejs/test/layer-0-primitives/guard-filename.test.js +424 -0
  348. package/lib/vendor/blamejs/test/layer-0-primitives/{guard-gate-disposition-coverage.test.js → guard-gate-disposition.test.js} +1 -1
  349. package/lib/vendor/blamejs/test/layer-0-primitives/guard-graphql.test.js +340 -0
  350. package/lib/vendor/blamejs/test/layer-0-primitives/guard-html.test.js +29 -0
  351. package/lib/vendor/blamejs/test/layer-0-primitives/guard-idempotency-key.test.js +28 -0
  352. package/lib/vendor/blamejs/test/layer-0-primitives/guard-image.test.js +519 -45
  353. package/lib/vendor/blamejs/test/layer-0-primitives/guard-imap-command.test.js +0 -0
  354. package/lib/vendor/blamejs/test/layer-0-primitives/guard-jmap.test.js +51 -0
  355. package/lib/vendor/blamejs/test/layer-0-primitives/guard-jsonpath.test.js +66 -0
  356. package/lib/vendor/blamejs/test/layer-0-primitives/guard-jwt.test.js +436 -0
  357. package/lib/vendor/blamejs/test/layer-0-primitives/guard-managesieve-command.test.js +25 -0
  358. package/lib/vendor/blamejs/test/layer-0-primitives/guard-markdown.test.js +16 -0
  359. package/lib/vendor/blamejs/test/layer-0-primitives/guard-mime.test.js +86 -0
  360. package/lib/vendor/blamejs/test/layer-0-primitives/guard-oauth.test.js +140 -0
  361. package/lib/vendor/blamejs/test/layer-0-primitives/guard-pdf.test.js +80 -0
  362. package/lib/vendor/blamejs/test/layer-0-primitives/guard-pop3-command.test.js +27 -0
  363. package/lib/vendor/blamejs/test/layer-0-primitives/guard-regex.test.js +99 -0
  364. package/lib/vendor/blamejs/test/layer-0-primitives/guard-shell.test.js +76 -0
  365. package/lib/vendor/blamejs/test/layer-0-primitives/{guard-sql-coverage.test.js → guard-sql.test.js} +3 -3
  366. package/lib/vendor/blamejs/test/layer-0-primitives/guard-svg.test.js +524 -0
  367. package/lib/vendor/blamejs/test/layer-0-primitives/guard-template.test.js +71 -0
  368. package/lib/vendor/blamejs/test/layer-0-primitives/guard-time.test.js +92 -0
  369. package/lib/vendor/blamejs/test/layer-0-primitives/guard-uuid.test.js +86 -0
  370. package/lib/vendor/blamejs/test/layer-0-primitives/html-balance.test.js +38 -0
  371. package/lib/vendor/blamejs/test/layer-0-primitives/http-client-cache-authorization.test.js +347 -0
  372. package/lib/vendor/blamejs/test/layer-0-primitives/http-client-cache.test.js +908 -0
  373. package/lib/vendor/blamejs/test/layer-0-primitives/http-client.test.js +2874 -0
  374. package/lib/vendor/blamejs/test/layer-0-primitives/http-message-signature.test.js +643 -0
  375. package/lib/vendor/blamejs/test/layer-0-primitives/i18n-messageformat.test.js +38 -0
  376. package/lib/vendor/blamejs/test/layer-0-primitives/i18n.test.js +1153 -1
  377. package/lib/vendor/blamejs/test/layer-0-primitives/idempotency-key.test.js +494 -0
  378. package/lib/vendor/blamejs/test/layer-0-primitives/ip-utils.test.js +30 -0
  379. package/lib/vendor/blamejs/test/layer-0-primitives/jsdoc-example-execution.test.js +177 -0
  380. package/lib/vendor/blamejs/test/layer-0-primitives/json-path.test.js +103 -0
  381. package/lib/vendor/blamejs/test/layer-0-primitives/json-schema.test.js +214 -0
  382. package/lib/vendor/blamejs/test/layer-0-primitives/jwk.test.js +41 -0
  383. package/lib/vendor/blamejs/test/layer-0-primitives/jwt-external.test.js +276 -0
  384. package/lib/vendor/blamejs/test/layer-0-primitives/keychain.test.js +0 -0
  385. package/lib/vendor/blamejs/test/layer-0-primitives/log-stream.test.js +241 -0
  386. package/lib/vendor/blamejs/test/layer-0-primitives/log.test.js +106 -0
  387. package/lib/vendor/blamejs/test/layer-0-primitives/mail-agent.test.js +441 -0
  388. package/lib/vendor/blamejs/test/layer-0-primitives/mail-auth.test.js +2136 -4
  389. package/lib/vendor/blamejs/test/layer-0-primitives/mail-bimi.test.js +759 -12
  390. package/lib/vendor/blamejs/test/layer-0-primitives/mail-bounce.test.js +811 -1
  391. package/lib/vendor/blamejs/test/layer-0-primitives/mail-crypto-pgp-experimental.test.js +401 -3
  392. package/lib/vendor/blamejs/test/layer-0-primitives/mail-crypto-pgp.test.js +751 -8
  393. package/lib/vendor/blamejs/test/layer-0-primitives/mail-crypto-smime.test.js +864 -0
  394. package/lib/vendor/blamejs/test/layer-0-primitives/mail-crypto.test.js +110 -0
  395. package/lib/vendor/blamejs/test/layer-0-primitives/mail-dav.test.js +830 -1
  396. package/lib/vendor/blamejs/test/layer-0-primitives/mail-deploy.test.js +635 -86
  397. package/lib/vendor/blamejs/test/layer-0-primitives/mail-dkim.test.js +818 -0
  398. package/lib/vendor/blamejs/test/layer-0-primitives/mail-helo.test.js +27 -0
  399. package/lib/vendor/blamejs/test/layer-0-primitives/mail-scan.test.js +199 -0
  400. package/lib/vendor/blamejs/test/layer-0-primitives/mail-send-deliver.test.js +686 -2
  401. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-imap.test.js +778 -0
  402. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-jmap.test.js +1438 -0
  403. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-managesieve.test.js +449 -6
  404. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-mx.test.js +773 -2
  405. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-pop3.test.js +623 -3
  406. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-rate-limit.test.js +55 -0
  407. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-registry.test.js +13 -0
  408. package/lib/vendor/blamejs/test/layer-0-primitives/mail-server-submission.test.js +877 -1
  409. package/lib/vendor/blamejs/test/layer-0-primitives/mail-sieve.test.js +326 -0
  410. package/lib/vendor/blamejs/test/layer-0-primitives/mail-store-fts.test.js +55 -0
  411. package/lib/vendor/blamejs/test/layer-0-primitives/mail-store.test.js +242 -0
  412. package/lib/vendor/blamejs/test/layer-0-primitives/mail.test.js +1596 -2
  413. package/lib/vendor/blamejs/test/layer-0-primitives/mcp.test.js +440 -4
  414. package/lib/vendor/blamejs/test/layer-0-primitives/metrics-snapshot.test.js +89 -0
  415. package/lib/vendor/blamejs/test/layer-0-primitives/metrics.test.js +1230 -0
  416. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-assetlinks.test.js +113 -0
  417. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-body-parser.test.js +1169 -0
  418. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-bot-disclose.test.js +123 -0
  419. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-cookies.test.js +108 -0
  420. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-gpc.test.js +121 -0
  421. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-headers.test.js +163 -0
  422. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-host-allowlist.test.js +154 -0
  423. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-require-content-type.test.js +127 -0
  424. package/lib/vendor/blamejs/test/layer-0-primitives/{middleware-tus-upload-coverage.test.js → middleware-tus-upload.test.js} +45 -0
  425. package/lib/vendor/blamejs/test/layer-0-primitives/middleware-web-app-manifest.test.js +132 -0
  426. package/lib/vendor/blamejs/test/layer-0-primitives/mtls-ca-crl-fingerprint-only.test.js +92 -0
  427. package/lib/vendor/blamejs/test/layer-0-primitives/network-dns-resolver.test.js +65 -0
  428. package/lib/vendor/blamejs/test/layer-0-primitives/network-dns.test.js +1727 -1
  429. package/lib/vendor/blamejs/test/layer-0-primitives/network-nts.test.js +699 -0
  430. package/lib/vendor/blamejs/test/layer-0-primitives/network-smtp-policy.test.js +1181 -0
  431. package/lib/vendor/blamejs/test/layer-0-primitives/network-tls.test.js +1876 -3
  432. package/lib/vendor/blamejs/test/layer-0-primitives/network.test.js +32 -0
  433. package/lib/vendor/blamejs/test/layer-0-primitives/nonce-store-enforce-replay-nonboolean.test.js +81 -0
  434. package/lib/vendor/blamejs/test/layer-0-primitives/ntp-check.test.js +122 -0
  435. package/lib/vendor/blamejs/test/layer-0-primitives/observability-tracing.test.js +378 -0
  436. package/lib/vendor/blamejs/test/layer-0-primitives/observability.test.js +77 -0
  437. package/lib/vendor/blamejs/test/layer-0-primitives/oid4vci.test.js +1016 -0
  438. package/lib/vendor/blamejs/test/layer-0-primitives/openid-federation.test.js +946 -0
  439. package/lib/vendor/blamejs/test/layer-0-primitives/outbox.test.js +818 -0
  440. package/lib/vendor/blamejs/test/layer-0-primitives/own-property-membership-guards.test.js +109 -0
  441. package/lib/vendor/blamejs/test/layer-0-primitives/parsers-safe-toml.test.js +543 -0
  442. package/lib/vendor/blamejs/test/layer-0-primitives/{parsers-safe-yaml-coverage.test.js → parsers-safe-yaml.test.js} +2 -2
  443. package/lib/vendor/blamejs/test/layer-0-primitives/parsers-standalone.test.js +73 -0
  444. package/lib/vendor/blamejs/test/layer-0-primitives/passkey.test.js +649 -0
  445. package/lib/vendor/blamejs/test/layer-0-primitives/permissions.test.js +524 -0
  446. package/lib/vendor/blamejs/test/layer-0-primitives/pqc-agent-curve.test.js +22 -0
  447. package/lib/vendor/blamejs/test/layer-0-primitives/pubsub.test.js +295 -0
  448. package/lib/vendor/blamejs/test/layer-0-primitives/queue-flow-repeat.test.js +36 -0
  449. package/lib/vendor/blamejs/test/layer-0-primitives/queue.test.js +83 -0
  450. package/lib/vendor/blamejs/test/layer-0-primitives/rate-limit-xff-spoofing.test.js +34 -0
  451. package/lib/vendor/blamejs/test/layer-0-primitives/redact.test.js +1031 -0
  452. package/lib/vendor/blamejs/test/layer-0-primitives/request-helpers.test.js +94 -0
  453. package/lib/vendor/blamejs/test/layer-0-primitives/require-bound-key.test.js +401 -0
  454. package/lib/vendor/blamejs/test/layer-0-primitives/restore-empty-manifest-wipe.test.js +154 -0
  455. package/lib/vendor/blamejs/test/layer-0-primitives/retention.test.js +600 -0
  456. package/lib/vendor/blamejs/test/layer-0-primitives/router-host-path-injection.test.js +231 -0
  457. package/lib/vendor/blamejs/test/layer-0-primitives/router-tls0rtt.test.js +21 -0
  458. package/lib/vendor/blamejs/test/layer-0-primitives/router.test.js +1277 -0
  459. package/lib/vendor/blamejs/test/layer-0-primitives/safe-async.test.js +133 -0
  460. package/lib/vendor/blamejs/test/layer-0-primitives/safe-buffer-linear-scans.test.js +14 -0
  461. package/lib/vendor/blamejs/test/layer-0-primitives/safe-buffer.test.js +80 -0
  462. package/lib/vendor/blamejs/test/layer-0-primitives/safe-decompress.test.js +28 -0
  463. package/lib/vendor/blamejs/test/layer-0-primitives/safe-dns.test.js +245 -0
  464. package/lib/vendor/blamejs/test/layer-0-primitives/safe-ical.test.js +32 -0
  465. package/lib/vendor/blamejs/test/layer-0-primitives/safe-ini.test.js +376 -0
  466. package/lib/vendor/blamejs/test/layer-0-primitives/safe-json.test.js +175 -0
  467. package/lib/vendor/blamejs/test/layer-0-primitives/safe-mime.test.js +518 -0
  468. package/lib/vendor/blamejs/test/layer-0-primitives/safe-object.test.js +62 -0
  469. package/lib/vendor/blamejs/test/layer-0-primitives/safe-path.test.js +30 -0
  470. package/lib/vendor/blamejs/test/layer-0-primitives/safe-schema.test.js +104 -0
  471. package/lib/vendor/blamejs/test/layer-0-primitives/safe-sql.test.js +142 -0
  472. package/lib/vendor/blamejs/test/layer-0-primitives/safe-url.test.js +112 -0
  473. package/lib/vendor/blamejs/test/layer-0-primitives/safe-vcard.test.js +26 -0
  474. package/lib/vendor/blamejs/test/layer-0-primitives/scheduler.test.js +157 -0
  475. package/lib/vendor/blamejs/test/layer-0-primitives/scim-server.test.js +396 -0
  476. package/lib/vendor/blamejs/test/layer-0-primitives/sd-jwt-vc.test.js +930 -0
  477. package/lib/vendor/blamejs/test/layer-0-primitives/security-assert.test.js +755 -82
  478. package/lib/vendor/blamejs/test/layer-0-primitives/self-update.test.js +1053 -0
  479. package/lib/vendor/blamejs/test/layer-0-primitives/session-device-binding.test.js +200 -0
  480. package/lib/vendor/blamejs/test/layer-0-primitives/session-strict-binding-missing-failclosed.test.js +110 -0
  481. package/lib/vendor/blamejs/test/layer-0-primitives/sigv4-bucket-ops.test.js +636 -0
  482. package/lib/vendor/blamejs/test/layer-0-primitives/sql-offset-without-limit.test.js +94 -0
  483. package/lib/vendor/blamejs/test/layer-0-primitives/sql.test.js +1190 -0
  484. package/lib/vendor/blamejs/test/layer-0-primitives/ssrf-guard.test.js +21 -0
  485. package/lib/vendor/blamejs/test/layer-0-primitives/static.test.js +850 -0
  486. package/lib/vendor/blamejs/test/layer-0-primitives/storage-presigned-url.test.js +146 -0
  487. package/lib/vendor/blamejs/test/layer-0-primitives/storage.test.js +621 -0
  488. package/lib/vendor/blamejs/test/layer-0-primitives/subject.test.js +47 -0
  489. package/lib/vendor/blamejs/test/layer-0-primitives/template.test.js +582 -0
  490. package/lib/vendor/blamejs/test/layer-0-primitives/tenant-quota.test.js +587 -25
  491. package/lib/vendor/blamejs/test/layer-0-primitives/time.test.js +11 -0
  492. package/lib/vendor/blamejs/test/layer-0-primitives/tsa.test.js +524 -63
  493. package/lib/vendor/blamejs/test/layer-0-primitives/uri-template.test.js +27 -0
  494. package/lib/vendor/blamejs/test/layer-0-primitives/vault-rotate.test.js +866 -0
  495. package/lib/vendor/blamejs/test/layer-0-primitives/vault.test.js +74 -0
  496. package/lib/vendor/blamejs/test/layer-0-primitives/vc.test.js +215 -0
  497. package/lib/vendor/blamejs/test/layer-0-primitives/watcher.test.js +550 -0
  498. package/lib/vendor/blamejs/test/layer-0-primitives/webhook-dispatcher.test.js +388 -0
  499. package/lib/vendor/blamejs/test/layer-0-primitives/webhook.test.js +262 -0
  500. package/lib/vendor/blamejs/test/layer-0-primitives/websocket.test.js +1294 -0
  501. package/lib/vendor/blamejs/test/layer-0-primitives/ws-client.test.js +629 -0
  502. package/lib/vendor/blamejs/test/layer-0-primitives/xml-c14n-attr-normalization.test.js +164 -0
  503. package/lib/vendor/blamejs/test/smoke.js +2 -0
  504. package/package.json +1 -1
  505. package/lib/vendor/blamejs/release-notes/v0.16.0.json +0 -44
  506. package/lib/vendor/blamejs/release-notes/v0.16.1.json +0 -36
  507. package/lib/vendor/blamejs/release-notes/v0.16.2.json +0 -71
  508. package/lib/vendor/blamejs/release-notes/v0.16.3.json +0 -71
  509. package/lib/vendor/blamejs/test/layer-0-primitives/acme-coverage.test.js +0 -441
  510. package/lib/vendor/blamejs/test/layer-0-primitives/auth-oauth-coverage.test.js +0 -482
  511. package/lib/vendor/blamejs/test/layer-0-primitives/auth-saml-coverage.test.js +0 -671
  512. package/lib/vendor/blamejs/test/layer-0-primitives/backup-index-coverage.test.js +0 -690
  513. package/lib/vendor/blamejs/test/layer-0-primitives/cli-coverage.test.js +0 -238
  514. package/lib/vendor/blamejs/test/layer-0-primitives/content-credentials-coverage.test.js +0 -319
  515. package/lib/vendor/blamejs/test/layer-0-primitives/keychain-coverage.test.js +0 -0
  516. package/lib/vendor/blamejs/test/layer-0-primitives/mail-auth-coverage.test.js +0 -437
  517. package/lib/vendor/blamejs/test/layer-0-primitives/mcp-coverage.test.js +0 -443
  518. package/lib/vendor/blamejs/test/layer-0-primitives/metrics-coverage.test.js +0 -395
  519. package/lib/vendor/blamejs/test/layer-0-primitives/network-smtp-policy-coverage.test.js +0 -565
  520. package/lib/vendor/blamejs/test/layer-0-primitives/router-coverage.test.js +0 -592
  521. package/lib/vendor/blamejs/test/layer-0-primitives/sql-coverage.test.js +0 -422
  522. package/lib/vendor/blamejs/test/layer-0-primitives/test-coverage.test.js +0 -573
@@ -316,6 +316,7 @@ function _report(label, matches) {
316
316
  // unflagged. When you add a detector with a new allow-class, register it here.
317
317
  var VALID_ALLOW_CLASSES = {
318
318
  "ai-disclosure-on-request-without-requested-gate": 1,
319
+ "applydefaults-dropped-opt": 1,
319
320
  "archive-gz-without-safedecompress": 1,
320
321
  "archive-wrap-partial-recipient": 1,
321
322
  "backup-adapter-storage-without-posture-check": 1,
@@ -360,6 +361,7 @@ var VALID_ALLOW_CLASSES = {
360
361
  "silent-catch-stream-teardown": 1,
361
362
  "slsa-framework-action-not-sha-pinned": 1,
362
363
  "timer-no-unref-unrefed-below": 1,
364
+ "timer-no-unref-process-pinning": 1,
363
365
  "wildcard-suffix-match-without-single-label-check": 1,
364
366
  };
365
367
 
@@ -727,6 +729,76 @@ function testNoStrayConsoleCalls() {
727
729
  matches);
728
730
  }
729
731
 
732
+ // class: applydefaults-dropped-opt
733
+ //
734
+ // validateOpts.applyDefaults(opts, DEFAULTS) whitelists the result to the
735
+ // KEYS OF `DEFAULTS` — any opt absent from DEFAULTS is stripped. So reading
736
+ // `cfg.someOpt` off that result, when `someOpt` is not a DEFAULTS key,
737
+ // always yields undefined: the opt is silently dropped even though the
738
+ // three-tier validator's ALLOWED_KEYS accepted it. That shipped a DEAD
739
+ // documented security opt in static.js (safeAttachmentForRiskyMimes — the
740
+ // drive-by-execution Content-Disposition defense). This gate cross-checks
741
+ // every `VAR = applyDefaults(opts, DEFAULTS)` site: it flags a `VAR.<prop>`
742
+ // read whose <prop> is not a key of the DEFAULTS object literal in the same
743
+ // file. The fix is to read the opt straight from `opts` (or add it to
744
+ // DEFAULTS); the allow marker is for a genuinely-dynamic prop access.
745
+ function testNoApplyDefaultsDroppedOpt() {
746
+ function _defaultsKeys(src, ident) {
747
+ var re = new RegExp("(?:var|const|let)\\s+" +
748
+ ident.replace(/[.*+?^${}()|[\]\\]/g, "\\$&") +
749
+ "\\s*=\\s*(?:Object\\.freeze\\()?\\{", "m");
750
+ var m = re.exec(src);
751
+ if (!m) return null;
752
+ var start = src.indexOf("{", m.index);
753
+ var depth = 0, i = start;
754
+ for (; i < src.length; i++) {
755
+ var c = src[i];
756
+ if (c === "{") depth++;
757
+ else if (c === "}") { depth--; if (depth === 0) break; }
758
+ }
759
+ var body = src.slice(start + 1, i);
760
+ var keys = {}, d = 0;
761
+ for (var j = 0; j < body.length; j++) {
762
+ var ch = body[j];
763
+ if (ch === "{" || ch === "[" || ch === "(") d++;
764
+ else if (ch === "}" || ch === "]" || ch === ")") d--;
765
+ else if (d === 0 && /[A-Za-z_$"']/.test(ch)) {
766
+ var mk = /^(?:"([^"]+)"|'([^']+)'|([A-Za-z_$][\w$]*))\s*:/.exec(body.slice(j));
767
+ if (mk) { keys[mk[1] || mk[2] || mk[3]] = true; j += mk[0].length - 1; }
768
+ }
769
+ }
770
+ return keys;
771
+ }
772
+ var callRe = /(?:var|const|let)\s+([A-Za-z_$][\w$]*)\s*=\s*(?:validateOpts\.|_?)applyDefaults\(\s*([A-Za-z_$][\w$]*)\s*,\s*([A-Za-z_$][\w$.]*)\s*\)/g;
773
+ var matches = [];
774
+ var files = _libFiles();
775
+ for (var fi = 0; fi < files.length; fi++) {
776
+ var src;
777
+ try { src = fs.readFileSync(files[fi], "utf8"); } catch (_e) { continue; }
778
+ var rel = _relPath(files[fi]);
779
+ var m;
780
+ callRe.lastIndex = 0;
781
+ while ((m = callRe.exec(src)) !== null) {
782
+ var resVar = m[1], defIdent = m[3];
783
+ var keys = _defaultsKeys(src, defIdent.split(".").pop());
784
+ if (!keys) continue; // defaults not a local object literal — can't verify
785
+ var propRe = new RegExp("\\b" + resVar + "\\.([A-Za-z_$][\\w$]*)", "g");
786
+ var pm, seen = {};
787
+ while ((pm = propRe.exec(src)) !== null) {
788
+ var prop = pm[1];
789
+ if (seen[prop]) continue;
790
+ seen[prop] = true;
791
+ if (keys[prop] || /^(hasOwnProperty|toString|constructor|prototype)$/.test(prop)) continue;
792
+ var line = src.slice(0, pm.index).split(/\r?\n/).length;
793
+ matches.push({ file: rel, line: line, content: resVar + "." + prop + " (not a key of " + defIdent + ")" });
794
+ }
795
+ }
796
+ }
797
+ matches = _filterMarkers(matches, "applydefaults-dropped-opt");
798
+ _report("no opt read off applyDefaults() result that is absent from its DEFAULTS " +
799
+ "(silently dropped — read it from opts directly or add it to DEFAULTS)", matches);
800
+ }
801
+
730
802
 
731
803
 
732
804
  function testNoUnresolvedMarkers() {
@@ -853,6 +925,7 @@ function testParserPrimitivesHaveFuzzHarness() {
853
925
  var FUZZ_NOT_REQUIRED = {
854
926
  "lib/safe-async.js": "runtime-control wrapper (not input-parsing)",
855
927
  "lib/safe-buffer.js": "byte-level helper consumed only by other primitives, no operator-facing parse path",
928
+ "lib/safe-object.js": "own-property get/set over an in-memory JS object; no bytes/string parser, no adversarial-input parse path",
856
929
  "lib/safe-redirect.js": "post-validation redirect builder; the validation lives in safe-url which is fuzzed",
857
930
  "lib/safe-schema.js": "schema-builder fluent API; takes operator-authored schema, not adversarial input",
858
931
  "lib/safe-sql.js": "tagged-template helper; takes operator-authored fragments, not adversarial input",
@@ -882,6 +955,18 @@ function testParserPrimitivesHaveFuzzHarness() {
882
955
  "lib/parsers/safe-env.js": ".env file loader takes a filepath (not adversarial in-process bytes); operator controls the file boundary, schema-validation gates the values",
883
956
  "lib/safe-path.js": "operator-supplied path-segment validator over the existing guardFilename codepoint tables (reserved-name + bidi + overlong-UTF-8 inherited transitively); the per-segment regex set is deterministic + anchored + length-bounded by the caller-supplied rel, no adversarial-bytes parser surface",
884
957
  };
958
+ // Untrusted-BYTE parsers that are NOT named safe-*/guard-* (so the name walk
959
+ // below skips them) but consume adversarial bytes off the network / disk and
960
+ // need the same fuzz discipline -- the INPUT SURFACE is what matters, not the
961
+ // filename. asn1-der parses DER from peer TLS certificates, S/MIME, BIMI VMCs,
962
+ // CMS, ACME and TSA responses; cms-codec (b.cms) parses CMS on top of it;
963
+ // link-header (b.linkHeader.parse) parses an untrusted HTTP Link response
964
+ // header (RFC 8288) a server / SSRF-reachable origin controls.
965
+ var FUZZ_REQUIRED_EXTRA = [
966
+ "lib/asn1-der.js",
967
+ "lib/cms-codec.js",
968
+ "lib/link-header.js",
969
+ ];
885
970
  var fs = require("node:fs");
886
971
  var path = require("node:path");
887
972
  var repoRoot = path.resolve(__dirname, "..", "..");
@@ -902,6 +987,9 @@ function testParserPrimitivesHaveFuzzHarness() {
902
987
  });
903
988
  }
904
989
  _walk(libDir);
990
+ FUZZ_REQUIRED_EXTRA.forEach(function (rel) {
991
+ if (libFiles.indexOf(rel) === -1) libFiles.push(rel);
992
+ });
905
993
  var hits = [];
906
994
  libFiles.forEach(function (rel) {
907
995
  if (FUZZ_NOT_REQUIRED[rel]) return;
@@ -944,7 +1032,28 @@ function testParserPrimitivesHaveFuzzHarness() {
944
1032
  // mutator-only exploration. We DON'T report on it here; the
945
1033
  // build script just skips the zip step when the dir is missing.
946
1034
  });
947
- _report("every lib/safe-*.js / lib/guard-*.js parser-or-validator has a fuzz/<name>.fuzz.js (or is allowlisted in FUZZ_NOT_REQUIRED)",
1035
+ // The FUZZ_REQUIRED_EXTRA parsers are not name-matched by the cflite CI
1036
+ // matrices (which are curated safe-*/guard-* subsets), so a harness for one
1037
+ // would be BUILT but never RUN in-repo -- coverage claimed, not delivered.
1038
+ // Require each to be listed in BOTH cflite matrices so the continuous-coverage
1039
+ // claim is real. (OSS-Fuzz auto-discovers every harness via build.sh; this
1040
+ // guards the in-repo PR + nightly signal for the parsers we explicitly promote.)
1041
+ var cflitePr = "";
1042
+ var cfliteBatch = "";
1043
+ try { cflitePr = fs.readFileSync(path.join(repoRoot, ".github/workflows/cflite_pr.yml"), "utf8"); } catch (_e1) { cflitePr = ""; }
1044
+ try { cfliteBatch = fs.readFileSync(path.join(repoRoot, ".github/workflows/cflite_batch.yml"), "utf8"); } catch (_e2) { cfliteBatch = ""; }
1045
+ FUZZ_REQUIRED_EXTRA.forEach(function (rel) {
1046
+ var target = path.basename(rel).replace(/\.js$/, "");
1047
+ var reEntry = new RegExp("^\\s*-\\s*" + target + "\\s*$", "m");
1048
+ if (!reEntry.test(cflitePr) || !reEntry.test(cfliteBatch)) {
1049
+ hits.push({
1050
+ file: rel, line: 1,
1051
+ content: "untrusted-byte parser has a fuzz harness + FUZZ_REQUIRED_EXTRA entry but its target `" + target +
1052
+ "` is missing from a cflite matrix (.github/workflows/cflite_pr.yml AND cflite_batch.yml) -- the harness would be built but never run in-repo (add the target to both matrices)",
1053
+ });
1054
+ }
1055
+ });
1056
+ _report("every lib/safe-*.js / lib/guard-*.js parser-or-validator (plus the untrusted-byte parsers in FUZZ_REQUIRED_EXTRA) has a fuzz/<name>.fuzz.js (or is allowlisted in FUZZ_NOT_REQUIRED), and each FUZZ_REQUIRED_EXTRA parser is wired into both cflite CI matrices",
948
1057
  hits);
949
1058
  }
950
1059
 
@@ -2705,6 +2814,13 @@ function testTimersUnref() {
2705
2814
  }
2706
2815
  }
2707
2816
  bad = _filterMarkers(bad, "timer-no-unref-unrefed-below");
2817
+ // A timer whose deliberate JOB is to pin the process — a long-running
2818
+ // supervisor / daemon that must outlive its children until an operator
2819
+ // signal — is the message's advertised "process-pinning intent" exception:
2820
+ // unref'ing it would defeat the primitive (e.g. `blamejs dev` must stay up
2821
+ // across a watched-child crash). Such a timer carries this marker + the
2822
+ // reason it must NOT unref.
2823
+ bad = _filterMarkers(bad, "timer-no-unref-process-pinning");
2708
2824
  _report("setInterval timers call .unref() (or have allow marker for " +
2709
2825
  "process-pinning intent)",
2710
2826
  bad);
@@ -3107,6 +3223,85 @@ function testNoBareErrorThrows() {
3107
3223
  bad);
3108
3224
  }
3109
3225
 
3226
+ // ---- Pattern 38b: defineClass error constructed message-first ----
3227
+ //
3228
+ // defineClass() generates `constructor(code, message)` (it calls
3229
+ // `super(message, code)` against the base FrameworkError, whose own order
3230
+ // is the mirror). So EVERY `new <DefineClassError>(...)` must pass the
3231
+ // short code FIRST and the human message SECOND. A message-first call
3232
+ // (arg1 has whitespace — no code ever does — while arg2 is a bare short
3233
+ // token) buries the diagnostic in `.code` and hands the operator a bare
3234
+ // token as `.message`. Sound by construction: a whitespace first arg is
3235
+ // never a valid code, so a hit is always a swap, never a style choice.
3236
+ // Seen twice — safe-buffer `_throw` and security.assertProduction — hence
3237
+ // a structural guard, not just the behavioral test that ships with each.
3238
+ function testDefineClassErrorArgOrder() {
3239
+ // class: define-class-error-arg-order
3240
+ var files = _libFiles();
3241
+ // 1. Collect every defineClass-generated error name across lib/.
3242
+ var names = {};
3243
+ for (var i = 0; i < files.length; i++) {
3244
+ var c;
3245
+ try { c = fs.readFileSync(files[i], "utf8"); } catch (_e) { continue; }
3246
+ var dre = /defineClass\(\s*["']([A-Za-z0-9_]+)["']/g, dm;
3247
+ while ((dm = dre.exec(c))) names[dm[1]] = true;
3248
+ }
3249
+ var nameList = Object.keys(names);
3250
+ if (!nameList.length) { check("no defineClass error classes to check", true); return; }
3251
+ var nameAlt = nameList.join("|");
3252
+
3253
+ // Split the first top-level args of a call starting just after '('.
3254
+ function firstTwoArgs(src, start) {
3255
+ var depth = 0, inStr = null, cur = "", out = [];
3256
+ for (var k = start; k < src.length && out.length < 2; k++) {
3257
+ var ch = src[k];
3258
+ if (inStr) { cur += ch; if (ch === "\\") { cur += src[++k]; } else if (ch === inStr) inStr = null; continue; }
3259
+ if (ch === '"' || ch === "'" || ch === "`") { inStr = ch; cur += ch; continue; }
3260
+ if (ch === "(" || ch === "[" || ch === "{") { depth++; cur += ch; continue; }
3261
+ if (ch === ")" || ch === "]" || ch === "}") { if (depth === 0) { out.push(cur); break; } depth--; cur += ch; continue; }
3262
+ if (ch === "," && depth === 0) { out.push(cur); cur = ""; continue; }
3263
+ cur += ch;
3264
+ }
3265
+ return out;
3266
+ }
3267
+ function leadingLiteral(arg) {
3268
+ var m = arg.trim().match(/^"((?:[^"\\]|\\.)*)"|^'((?:[^'\\]|\\.)*)'/);
3269
+ return m ? (m[1] != null ? m[1] : m[2]) : null;
3270
+ }
3271
+ function wholeCodeLiteral(arg) {
3272
+ var m = arg.trim().match(/^"((?:[^"\\]|\\.)*)"$|^'((?:[^'\\]|\\.)*)'$/);
3273
+ if (!m) return null;
3274
+ var v = m[1] != null ? m[1] : m[2];
3275
+ return (v.length > 0 && v.length <= 40 && !/\s/.test(v)) ? v : null;
3276
+ }
3277
+
3278
+ var bad = [];
3279
+ var callRe = new RegExp("new\\s+(" + nameAlt + ")\\s*\\(", "g");
3280
+ for (var fi = 0; fi < files.length; fi++) {
3281
+ var rel = _relPath(files[fi]);
3282
+ var content;
3283
+ try { content = fs.readFileSync(files[fi], "utf8"); } catch (_e2) { continue; }
3284
+ callRe.lastIndex = 0;
3285
+ var cm;
3286
+ while ((cm = callRe.exec(content))) {
3287
+ var lineNo = content.slice(0, cm.index).split(/\r?\n/).length;
3288
+ var startLine = content.split(/\r?\n/)[lineNo - 1] || "";
3289
+ if (/^\s*(\/\/|\*|\/\*)/.test(startLine)) continue; // skip commented examples
3290
+ var args = firstTwoArgs(content, cm.index + cm[0].length);
3291
+ if (args.length < 2) continue;
3292
+ var lead1 = leadingLiteral(args[0]);
3293
+ var code2 = wholeCodeLiteral(args[1]);
3294
+ if (lead1 && /\s/.test(lead1) && code2) {
3295
+ bad.push({ file: rel, line: lineNo, content: ("new " + cm[1] + "(\"" + lead1.slice(0, 40) + "…\", \"" + code2 + "\")") });
3296
+ }
3297
+ }
3298
+ }
3299
+ bad = _filterMarkers(bad, "define-class-error-arg-order");
3300
+ _report("defineClass error constructed (code, message) — not message-first " +
3301
+ "(a whitespace first arg is never a valid code)",
3302
+ bad);
3303
+ }
3304
+
3110
3305
  // ---- Pattern 39: hand-rolled URL building ----
3111
3306
 
3112
3307
  function testNoHandrolledUrlBuild() {
@@ -3494,6 +3689,27 @@ async function testNoDuplicateCodeBlocks() {
3494
3689
  // so the audit trail records exactly which body of code shares the
3495
3690
  // shape.
3496
3691
  var KNOWN_CLUSTERS = [
3692
+ {
3693
+ // Own-property lookup guard — a JS language idiom, not shared behaviour.
3694
+ // `if (!Object.prototype.hasOwnProperty.call(TABLE, key)) throw XError(
3695
+ // code, msg + key); var v = TABLE[key];` is the framework's canonical way
3696
+ // to reject an untrusted key before indexing a plain-object lookup table
3697
+ // (the prototype-pollution / algorithm-confusion guard). mail-helo.evaluate
3698
+ // and mail-rbl.create resolve a guard-family gate PROFILE
3699
+ // (gateContract.resolveProfileName over the PROFILES table); sd-jwt-vc.present
3700
+ // guards a HASH-ALG table (SUPPORTED_HASH_ALGS) against an attacker-controlled
3701
+ // `_sd_alg`. The 50-token overlap is the guard idiom's skeleton, not shared
3702
+ // logic — the three functions are in unrelated domains (SMTP HELO policy /
3703
+ // DNSBL config / SD-JWT presentation) with no extractable 3-way primitive.
3704
+ // (A dedicated own-property-lookup helper across the crypto alg-table sites
3705
+ // is tracked as a deliberate follow-up, not forced by this coincidence.)
3706
+ mode: "family-subset",
3707
+ files: [
3708
+ "lib/auth/sd-jwt-vc.js:present",
3709
+ "lib/mail-helo.js:evaluate",
3710
+ "lib/mail-rbl.js:create",
3711
+ ],
3712
+ },
3497
3713
  {
3498
3714
  // Opts-passthrough / allow-list token run — shape-only. A run of
3499
3715
  // `<ident>: <ident>.<ident>,` assignments (jar.parse forwarding its
@@ -5827,6 +6043,270 @@ function testNoDeniedVendors() {
5827
6043
  bad);
5828
6044
  }
5829
6045
 
6046
+ // ---- Pattern 45: vendored bundles ship reviewable — unminified + eval-free ----
6047
+
6048
+ // Dynamic-code-execution constructs a vendored artifact must never carry:
6049
+ // direct eval, indirect `(x, eval)` aliasing, the Function constructor,
6050
+ // module.createRequire, and process.binding. The only such tokens upstream
6051
+ // libraries ever shipped here were legacy global-object probes
6052
+ // (`Function("return this")` / indirect eval) that cannot execute on
6053
+ // supported Node versions; scripts/vendor-update.sh resolves
6054
+ // reflect-metadata to its `lite` entry so none remain in the bundles.
6055
+ var VENDOR_DYNAMIC_EXEC_RE =
6056
+ /\beval\s*\(|,\s*eval\s*\)|\bnew\s+Function\b|\bFunction\s*\(|\bcreateRequire\b|process\.binding/;
6057
+
6058
+ function testVendorBundlesReviewable() {
6059
+ // lib/vendor/*.cjs are esbuild bundles of MANIFEST-pinned upstream
6060
+ // libraries (scripts/vendor-update.sh). They ship UNMINIFIED so an
6061
+ // operator can read them and diff them against upstream at the pinned
6062
+ // version, and every vendored JS artifact must stay free of
6063
+ // dynamic-code-execution constructs. This gate refuses a regression
6064
+ // arriving through a future vendor refresh (e.g. --minify creeping
6065
+ // back into a build command, or an upstream bump reintroducing a
6066
+ // global-object eval probe).
6067
+ //
6068
+ // Minification check: average line length, .cjs bundles only.
6069
+ // Unminified esbuild output of the current inputs measures 31-39
6070
+ // chars/line; minified output of the same inputs measures 1223-3796.
6071
+ // The 200 threshold has ~5x headroom above the unminified population
6072
+ // and ~6x below the minified one, and is a whole-file statistic —
6073
+ // not a layout-coupled bound on any single construct. The .data.js
6074
+ // payload carriers are exempt from this leg (their signatureB64
6075
+ // field is legitimately one multi-KB base64 line) but covered by the
6076
+ // dynamic-exec leg on top of their four-layer load-time verification.
6077
+ var vendorDir = path.join(__dirname, "..", "..", "lib", "vendor");
6078
+ var bad = [];
6079
+ var names = fs.readdirSync(vendorDir).sort();
6080
+ for (var i = 0; i < names.length; i++) {
6081
+ var name = names[i];
6082
+ if (!/\.(cjs|js|mjs)$/.test(name)) continue;
6083
+ var full = path.join(vendorDir, name);
6084
+ if (!fs.statSync(full).isFile()) continue;
6085
+ var content = fs.readFileSync(full, "utf8");
6086
+ var lines = content.split(/\r?\n/);
6087
+ var total = 0;
6088
+ for (var li = 0; li < lines.length; li++) {
6089
+ total += lines[li].length;
6090
+ if (VENDOR_DYNAMIC_EXEC_RE.test(lines[li])) {
6091
+ bad.push({
6092
+ file: "lib/vendor/" + name,
6093
+ line: li + 1,
6094
+ content: "dynamic-code-execution construct in vendored artifact: " +
6095
+ lines[li].trim().slice(0, 80),
6096
+ });
6097
+ }
6098
+ }
6099
+ if (/\.cjs$/.test(name)) {
6100
+ var avg = lines.length ? total / lines.length : 0;
6101
+ if (avg > 200) {
6102
+ bad.push({
6103
+ file: "lib/vendor/" + name,
6104
+ line: 1,
6105
+ content: "bundle looks minified (avg " + Math.round(avg) +
6106
+ " chars/line; unminified output measures 31-39) — rebuild " +
6107
+ "via scripts/vendor-update.sh, which bundles without --minify",
6108
+ });
6109
+ }
6110
+ }
6111
+ }
6112
+ _report("vendored bundles ship reviewable — unminified .cjs + no " +
6113
+ "dynamic-code-execution constructs in lib/vendor JS",
6114
+ bad);
6115
+ }
6116
+
6117
+ // ---- Pattern 46: scanner policy covers the shipped data-carrier shape ----
6118
+
6119
+ function testScannerPolicyCoversVendorDataCarriers() {
6120
+ // Package scanners' minified-code detectors fire on high-density files
6121
+ // and compressed/embedded assets, not only on minified CODE. The signed
6122
+ // vendored data carriers (lib/vendor/*.data.js) are exactly that shape
6123
+ // by design: a 76-char-wrapped base64 payload plus one multi-KB
6124
+ // signatureB64 line. While such carriers ship, socket.yml must keep the
6125
+ // minifiedFile class dispositioned (`minifiedFile: false`) — omitted
6126
+ // issueRules fall back to dashboard defaults, so dropping the entry
6127
+ // re-reports the known-benign artifacts on every routine scan. The
6128
+ // unminified property of CODE bundles is enforced by
6129
+ // testVendorBundlesReviewable above; the scanner class is not the guard
6130
+ // for that property.
6131
+ var vendorDir = path.join(__dirname, "..", "..", "lib", "vendor");
6132
+ var names = fs.readdirSync(vendorDir).sort();
6133
+ var carriers = [];
6134
+ for (var i = 0; i < names.length; i++) {
6135
+ if (!/\.data\.js$/.test(names[i])) continue;
6136
+ var content = fs.readFileSync(path.join(vendorDir, names[i]), "utf8");
6137
+ var lines = content.split(/\r?\n/);
6138
+ for (var li = 0; li < lines.length; li++) {
6139
+ if (lines[li].length > 4096) { carriers.push(names[i]); break; }
6140
+ }
6141
+ }
6142
+ var bad = [];
6143
+ if (carriers.length > 0) {
6144
+ var socketYml = "";
6145
+ try {
6146
+ socketYml = fs.readFileSync(path.join(__dirname, "..", "..", "socket.yml"), "utf8");
6147
+ } catch (_e) { /* missing socket.yml handled below as a violation */ }
6148
+ if (!/^\s*minifiedFile:\s*false\b/m.test(socketYml)) {
6149
+ bad.push({
6150
+ file: "socket.yml",
6151
+ line: 1,
6152
+ content: "minifiedFile disposition missing while high-density data " +
6153
+ "carriers ship: " + carriers.join(", "),
6154
+ });
6155
+ }
6156
+ }
6157
+ _report("socket.yml keeps minifiedFile dispositioned while lib/vendor " +
6158
+ "*.data.js payload carriers ship",
6159
+ bad);
6160
+ }
6161
+
6162
+ // ---- Pattern 48: every vendored MANIFEST component is attributed in NOTICE ----
6163
+
6164
+ function testVendorComponentsAttributedInNotice() {
6165
+ // A third-party component vendored under lib/vendor/ ships with license and
6166
+ // attribution obligations. lib/vendor/MANIFEST.json is the authoritative list
6167
+ // of what ships; NOTICE is the attribution surface. A component added to the
6168
+ // manifest without a NOTICE entry (the exact drift that shipped @noble/curves
6169
+ // and the Public Suffix List un-attributed until a downstream scanner flagged
6170
+ // it) must fail here, before publish. Each manifest package key (and each
6171
+ // components[] sub-key) must appear in NOTICE, unless it is a documented
6172
+ // no-third-party-content exception.
6173
+ var root = path.resolve(__dirname, "..", "..");
6174
+ var manifest, notice;
6175
+ try { manifest = JSON.parse(fs.readFileSync(path.join(root, "lib", "vendor", "MANIFEST.json"), "utf8")); }
6176
+ catch (_e) { _report("NOTICE attributes every vendored MANIFEST component",
6177
+ [{ file: "lib/vendor/MANIFEST.json", line: 1, content: "unreadable / not JSON" }]); return; }
6178
+ try { notice = fs.readFileSync(path.join(root, "NOTICE"), "utf8"); }
6179
+ catch (_e) { _report("NOTICE attributes every vendored MANIFEST component",
6180
+ [{ file: "NOTICE", line: 1, content: "NOTICE file missing" }]); return; }
6181
+
6182
+ // Documented exceptions: a vendored entry that ships NO third-party content.
6183
+ var NO_ATTRIBUTION_NEEDED = {
6184
+ "bimi-trust-anchors": "operator-managed VMC/CMC trust anchors — the shipped default is empty-of-PEM, so there is no third-party content to attribute (operators populate per the file-header procedure)",
6185
+ };
6186
+ // NOTICE names a component differently from its manifest key.
6187
+ var NOTICE_ALIAS = {
6188
+ "SecLists-common-passwords-top-10000": "SecLists",
6189
+ };
6190
+
6191
+ var pkgs = manifest.packages || {};
6192
+ var bad = [];
6193
+ Object.keys(pkgs).forEach(function (key) {
6194
+ if (NO_ATTRIBUTION_NEEDED[key]) return;
6195
+ var needles = [NOTICE_ALIAS[key] || key];
6196
+ // Meta-bundle sub-components each carry their own attribution obligation.
6197
+ var comps = pkgs[key].components;
6198
+ if (comps && typeof comps === "object") {
6199
+ Object.keys(comps).forEach(function (c) { needles.push(NOTICE_ALIAS[c] || c); });
6200
+ }
6201
+ needles.forEach(function (needle) {
6202
+ if (notice.indexOf(needle) === -1) {
6203
+ bad.push({
6204
+ file: "NOTICE",
6205
+ line: 1,
6206
+ content: "vendored component '" + needle + "' (from lib/vendor/MANIFEST.json" +
6207
+ (needle === key ? "" : " package '" + key + "'") +
6208
+ ") has no attribution entry in NOTICE",
6209
+ });
6210
+ }
6211
+ });
6212
+ });
6213
+ _report("NOTICE attributes every vendored MANIFEST component", bad);
6214
+ }
6215
+
6216
+ // ---- Pattern 47: documented script flags must exist in the script ----
6217
+
6218
+ function testDocumentedScriptFlagsExist() {
6219
+ // Error messages, file headers, and operator docs point people at
6220
+ // maintenance commands like `vendor-update.sh --refresh-data`. A
6221
+ // referenced flag the target script never implements strands the
6222
+ // operator at the exact moment the reference fires (a verification
6223
+ // failure, a stale-data gate). Every `<script>.sh --flag` /
6224
+ // `<script>.js --flag` reference whose basename resolves into
6225
+ // scripts/ must appear, whole-token, on a NON-COMMENT line of that
6226
+ // script — a usage-header comment alone does not count as an
6227
+ // implementation, and `--refresh` must not pass because
6228
+ // `--refresh-data` exists. References to basenames not present in
6229
+ // scripts/ are external tools and skipped, as is a script-shaped
6230
+ // token that is itself the VALUE of a preceding flag (`--arg
6231
+ // ./server.js --watch` is not a `server.js --watch` reference).
6232
+ // Known coverage bounds: only the flag directly adjacent to the
6233
+ // script name is checked (a `script.js subcommand --flag` or
6234
+ // second-flag reference is out of matcher reach), and a flag quoted
6235
+ // in a non-comment string of the target (an echo, an error message)
6236
+ // satisfies the check.
6237
+ var root = path.resolve(__dirname, "..", "..");
6238
+ var scriptsDir = path.join(root, "scripts");
6239
+ var vendorDir = path.join(root, "lib", "vendor");
6240
+ var sources = _libFiles();
6241
+ var i;
6242
+ var vendorNames = fs.readdirSync(vendorDir).sort();
6243
+ for (i = 0; i < vendorNames.length; i++) {
6244
+ if (/\.data\.js$/.test(vendorNames[i])) sources.push(path.join(vendorDir, vendorNames[i]));
6245
+ }
6246
+ var scriptNames = fs.readdirSync(scriptsDir).sort();
6247
+ for (i = 0; i < scriptNames.length; i++) {
6248
+ if (/\.(js|sh)$/.test(scriptNames[i])) sources.push(path.join(scriptsDir, scriptNames[i]));
6249
+ }
6250
+ var docNames = ["README.md", "SECURITY.md", "CONTRIBUTING.md", "MIGRATING.md"];
6251
+ for (i = 0; i < docNames.length; i++) {
6252
+ var docPath = path.join(root, docNames[i]);
6253
+ if (fs.existsSync(docPath)) sources.push(docPath);
6254
+ }
6255
+
6256
+ var refRe = /\b([a-z0-9][a-z0-9-]*\.(?:sh|js))\s+(--[a-z][a-z0-9-]*)/g;
6257
+ // The implementation surface of a target script: every line that is
6258
+ // not a whole-line comment (# for .sh, // or a block-comment
6259
+ // continuation * for .js).
6260
+ var targetCache = {};
6261
+ function targetImplLines(basename) {
6262
+ if (!(basename in targetCache)) {
6263
+ var full = path.join(scriptsDir, basename);
6264
+ var raw;
6265
+ try { raw = fs.readFileSync(full, "utf8"); }
6266
+ catch (_e) { targetCache[basename] = null; return null; }
6267
+ var commentRe = /\.sh$/.test(basename) ? /^\s*#/ : /^\s*(\/\/|\*|\/\*)/;
6268
+ targetCache[basename] = raw.split(/\r?\n/).filter(function (l) {
6269
+ return !commentRe.test(l);
6270
+ }).join("\n");
6271
+ }
6272
+ return targetCache[basename];
6273
+ }
6274
+ function implementsFlag(implText, flag) {
6275
+ var esc = flag.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
6276
+ return new RegExp("(^|[^A-Za-z0-9-])" + esc + "(?![A-Za-z0-9-])").test(implText);
6277
+ }
6278
+
6279
+ var bad = [];
6280
+ for (i = 0; i < sources.length; i++) {
6281
+ var content;
6282
+ try { content = fs.readFileSync(sources[i], "utf8"); }
6283
+ catch (_e) { continue; }
6284
+ var rel = path.relative(root, sources[i]).replace(/\\/g, "/");
6285
+ var m;
6286
+ refRe.lastIndex = 0;
6287
+ while ((m = refRe.exec(content)) !== null) {
6288
+ // Skip script-shaped tokens sitting in a flag's VALUE position
6289
+ // (`--command node --arg ./server.js --watch`): the token is an
6290
+ // argument to the preceding flag, not a command being invoked.
6291
+ var before = content.slice(Math.max(0, m.index - 40), m.index);
6292
+ if (/--[a-z][a-z0-9-]*(=|\s+)(\.\/)?$/.test(before)) continue;
6293
+ var impl = targetImplLines(m[1]);
6294
+ if (impl === null) continue;
6295
+ if (implementsFlag(impl, m[2])) continue;
6296
+ var line = content.slice(0, m.index).split("\n").length;
6297
+ bad.push({
6298
+ file: rel,
6299
+ line: line,
6300
+ content: "references `" + m[1] + " " + m[2] + "` but scripts/" +
6301
+ m[1] + " has no non-comment occurrence of " + m[2],
6302
+ });
6303
+ }
6304
+ }
6305
+ _report("script flags referenced from lib/, scripts/, and operator docs " +
6306
+ "exist outside comments in the target script",
6307
+ bad);
6308
+ }
6309
+
5830
6310
  // ---- Pattern 42: state-stamps in user-facing docs (smoke test the wiki) ----
5831
6311
 
5832
6312
  function testStateStampScanningDeferred() {
@@ -5881,6 +6361,15 @@ var KNOWN_ANTIPATTERNS = [
5881
6361
  allowlist: ["lib/guard-auth.js"],
5882
6362
  reason: "v0.15.0 #103 — the guard sanitize/parse refuse-on-critical|high throw (err(issue.ruleId || '<x>.refused', 'guard<Name>.<op>: ' + issue.snippet)) is owned by gateContract.throwOnRefusalSeverity; 18 guards reuse it (this was the failing STRONG-DUP fp:f349a8d1f51b before extraction). A hand-rolled `issues[i].ruleId || '<x>.refused'` throw re-implements it. lib/guard-auth.js is the one genuine holdout (its message embeds issues[i].source: 'guardAuth.sanitize [<source>]:') pending task #104; the primitive itself uses a `fallback` variable (no .refused literal) so it does not match. Any other lib file with this shape must call gateContract.throwOnRefusalSeverity (the severities / op options cover the critical-only + parse variants).",
5883
6363
  },
6364
+ {
6365
+ id: "byte-cap-must-vet-type-before-measuring",
6366
+ primitive: "b.safeBuffer.byteLengthOfIfMeasurable",
6367
+ scanScope: "lib",
6368
+ skipCommentLines: true,
6369
+ regex: /typeof\s+\w+\.length\s*===\s*["']number["']\s*&&[^\n]*byteLengthOf\s*\(/,
6370
+ allowlist: [],
6371
+ reason: "A byte-size cap over untrusted metadata (the guard-family `{ bytes }` bag) must not gate safeBuffer.byteLengthOf on a hand-rolled `typeof X.length === 'number'` check: byteLengthOf accepts only string / Buffer / Uint8Array and THROWS on anything else, so that check admits a plain Array / array-like object and crashes the guard's documented never-throw-on-hostile-metadata inspection contract (the gate path fails closed, but a direct validate/sanitize caller throws). This shipped in BOTH guard-image and guard-pdf. The primitive is `safeBuffer.byteLengthOfIfMeasurable(x)` — it returns the byte length for a measurable value or `null` for a non-byte-carrier — so a guard writes `var n = safeBuffer.byteLengthOfIfMeasurable(bytes); if (n !== null && n > cap) refuse`; guard-image + guard-pdf compose it. Any new guard measuring a metadata bag must compose it instead of the raw typeof-length shape (magic detection reads only the leading bytes, so skipping the cap for an unmeasurable array-like cannot DoS). Empty allowlist — no legitimate instance of this coupling exists.",
6372
+ },
5884
6373
  {
5885
6374
  id: "html-comment-scan-must-use-htmlCommentEnd",
5886
6375
  primitive: "b.markupTokenizer.htmlCommentEnd",
@@ -6249,6 +6738,53 @@ var KNOWN_ANTIPATTERNS = [
6249
6738
  allowlist: [],
6250
6739
  reason: "#114 — _blamejs_subject_restrictions declares sealedFields:[\"reason\"] but subject.js wrote the reason in clear via the raw sql.insert path. Seal on write (cryptoField.sealRow(RESTRICTIONS_TABLE, ...)); the reason is write-only (isRestricted reads only the PK) so there is no unseal site. Fires if the restriction insert lands without the seal.",
6251
6740
  },
6741
+ {
6742
+ id: "guard-scheme-extractor-must-strip-url-whitespace",
6743
+ primitive: "a content guard that extracts a URL scheme for a denylist must fold the decoded value through codepointClass.stripUrlSchemeWhitespace, so a browser-stripped tab/newline or an entity-encoded leading space cannot push the scheme past the anchor and read as scheme-less",
6744
+ scanScope: "lib",
6745
+ regex: /function _extractScheme\b|DANGEROUS_SCHEME_RE\.test\b/,
6746
+ requires: /stripUrlSchemeWhitespace\(/,
6747
+ skipCommentLines: true,
6748
+ allowlist: [],
6749
+ reason: "guard-html / guard-svg (_extractScheme) and guard-markdown (DANGEROUS_SCHEME_RE.test) resolve a URL scheme against a denylist. The WHATWG URL parser removes tab/lf/cr from anywhere and trims a leading/trailing C0-control-or-space run before parsing; neither the C0-control strip (which excludes tab/lf/cr) nor a raw trim (which misses an entity-encoded space) covers that, so the decoded value MUST route through codepointClass.stripUrlSchemeWhitespace. Fires if a scheme extractor drops the shared normalizer, re-opening the java<TAB>script: / &#32;javascript: fail-open XSS.",
6750
+ },
6751
+ {
6752
+ id: "guard-css-danger-check-must-decode-entities",
6753
+ primitive: "a content guard's CSS-danger check must match the entity-decoded style value via codepointClass.decodeMarkupEntities, not the raw bytes -- a style attribute is character-reference-decoded before the CSS parser sees it",
6754
+ scanScope: "lib",
6755
+ regex: /CSS_DANGEROUS_PATTERNS\s*\[\s*\w+\s*\]\.test/,
6756
+ requires: /decodeMarkupEntities\(/,
6757
+ skipCommentLines: true,
6758
+ allowlist: [],
6759
+ reason: "guard-html / guard-svg test CSS_DANGEROUS_PATTERNS against a style value. The browser character-reference-decodes a style attribute before the CSS parser runs, so a raw-byte match lets ex&#x70;ression( / url(&#x6A;avascript:) / behavior&colon; bypass the denylist (fail-open CSS-injection XSS). The check MUST decode via codepointClass.decodeMarkupEntities first. Fires if a CSS-danger check drops the decode.",
6760
+ },
6761
+ {
6762
+ id: "crypto-field-sealrow-must-not-skip-empty-string",
6763
+ primitive: "cryptoField.sealRow must seal an empty string into an authenticated envelope, never skip it -- skipping stores a bare plaintext empty string that a DB-write attacker can forge or downgrade a ciphertext to undetected",
6764
+ scanScope: "lib",
6765
+ regex: /===\s*null\s*\|\|\s*out\[field\]\s*===\s*""/,
6766
+ skipCommentLines: true,
6767
+ allowlist: [],
6768
+ reason: "cryptoField.sealRow must skip only null/undefined; an empty string is sealed (via _encodeTyped of the empty string -> a non-empty typed E: marker) so it becomes a real authenticated envelope. Re-adding an empty-string arm to the seal-skip (=== null || out[field] === empty) stores a bare plaintext empty string that unsealRow's falsy skip would accept, letting a DB-write attacker replace any sealed ciphertext with empty undetected (the sealed-column tamper-evidence hole). Fires if the empty-string skip returns to the seal path.",
6769
+ },
6770
+ {
6771
+ id: "guard-css-danger-check-must-fold-url-whitespace",
6772
+ primitive: "a guard's CSS-danger check must fold the URL-scheme whitespace a browser strips inside url(...) -- tab/lf/cr -- after entity-decoding (codepointClass.stripUrlSchemeWhitespace); a decode-only check misses an entity-hidden tab in a CSS URL scheme like url(java&Tab;script:)",
6773
+ scanScope: "lib",
6774
+ regex: /decodeMarkupEntities\(value\)\s*;/,
6775
+ skipCommentLines: true,
6776
+ allowlist: [],
6777
+ reason: "guard-html / guard-svg _isCssDangerous entity-decode a style value, but a browser also strips tab/lf/cr from a URL inside url(...) before resolving its scheme, so url(java&Tab;script:) -> url(java<TAB>script:) must be folded with stripUrlSchemeWhitespace before matching the contiguous javascript: danger pattern. A decode-only codepointClass.decodeMarkupEntities(value); with no whitespace fold re-opens the CSS whitespace-scheme bypass. Fires if the fold is dropped.",
6778
+ },
6779
+ {
6780
+ id: "i18n-messageformat-case-lookup-must-be-own-property",
6781
+ primitive: "the MessageFormat renderer must look up a select/plural case via _ownCase (own-property only), never a bare node.cases[key] -- a select value is end-user supplied, so String(sv) can be __proto__ / constructor / toString and a bare index returns a truthy INHERITED Object.prototype member, bypassing the other fallback (output corruption or a _renderSequence-of-non-array request DoS)",
6782
+ scanScope: "lib",
6783
+ regex: /node\.cases\[/,
6784
+ skipCommentLines: true,
6785
+ allowlist: [],
6786
+ reason: "lib/i18n-messageformat.js resolves a MessageFormat case by an end-user-controlled select key; a bare node.cases[key] reaches the prototype chain for __proto__ / constructor / toString and returns an inherited member, corrupting output or throwing a request DoS on render. Every case lookup must route through _ownCase (Object.prototype.hasOwnProperty guarded). Fires if a bare node.cases[...] index returns to the code.",
6787
+ },
6252
6788
  {
6253
6789
  // Vault keypair rotation stages every output file (the re-encrypted
6254
6790
  // db, resealed vault/db keys, additional sealed files, derived-hash
@@ -8472,6 +9008,14 @@ var KNOWN_ANTIPATTERNS = [
8472
9008
 
8473
9009
  { id: "breach-clock-composes-incident-clock", primitive: "b.breach.deadline.createClock must compose b.incident.report.createDeadlineClock (one underlying timer) — it must NOT re-roll its own setInterval tick loop; the breach clock delegates the timer lifecycle to incident-report so there is a single tick source to drive + stop", scanScope: "lib", skipCommentLines: true, regex: /setInterval[\s\S]{0,8000}?breach\.deadline\.createClock|breach\.deadline\.createClock[\s\S]{0,8000}?setInterval/, allowlist: [], reason: "breach-deadline.createDeadlineClock wraps incidentReport().createDeadlineClock and forwards trackReport / acknowledgeSubmission / cancel / stop onto that inner clock; it owns no timer of its own. A setInterval inside breach-deadline.js means the tick loop was re-rolled instead of delegated — two independent timers drifting, and a stop() that no longer tears the real one down. File-scoped via co-occurrence of setInterval with the breach.deadline.createClock token unique to breach-deadline.js (incident-report.js owns the legitimate setInterval but never names breach.deadline.createClock, so it is not flagged). Empty allowlist — a timer here is the miswire." },
8474
9010
 
9011
+ { id: "daemon-stop-sentinel-must-poll-not-watch", primitive: "lib/daemon.js's Windows cooperative-stop sentinel (_installStopSentinelWatcher) must detect the <pidFile>.stop sentinel with a synchronous existsSync poll on an unref'd interval — never a filesystem watch: fs.watch aborts libuv on an 8.3 short-name temp path (uncatchable), and fs.watchFile's StatWatcher stats via the libuv threadpool, starving under concurrent-fs load and missing the graceful-stop budget", scanScope: "lib", skipCommentLines: true, regex: /function _installStopSentinelWatcher[\s\S]{0,3000}?nodeFs\.watch(?:File)?\(/, allowlist: [], reason: "The daemon's win32 stop channel died in windows-CI as a libuv abort (src/win/fs-event.c '!_wcsnicmp(filename, dir, dirlen)') because it fs.watch'd the sentinel's DIRECTORY, whose CI-runner temp path (C:\\Users\\RUNNER~1\\...\\Temp) is an 8.3 short name — GetFinalPathNameByHandle returns the long form and the prefix assertion aborts the whole process, uncatchable, so the smoke worker vanished with no result line. Switching to fs.watchFile then regressed under parallel test load (StatWatcher's threadpool stat delayed detection past the stop budget). The channel now polls a synchronous nodeFs.existsSync on an unref'd setInterval (STOP_SENTINEL_POLL_MS) — main-thread, no fs-event.c handle, no threadpool. This is a STRUCTURAL guard precisely because the failure is environment-specific (an 8.3 short-name path a local host with 8.3 generation disabled cannot reproduce), so no behavioral test can assert it. Anchored on the _installStopSentinelWatcher function unique to daemon.js; any nodeFs.watch/watchFile reintroduced in its body co-occurs and trips. Empty allowlist — a filesystem watch on this sentinel is the regression." },
9012
+
9013
+ { id: "pid-liveness-probe-must-compose-pidProbe", primitive: "a signal-0 liveness probe (process.kill(pid, 0)) in lib/ must compose b.pidProbe.isLivePid (lib/pid-probe.js) — the shared EPERM-means-alive / ESRCH-means-dead classifier — not re-roll process.kill(pid, 0) inline", scanScope: "lib", skipCommentLines: true, regex: /process\.kill\([^,)]+,\s*0\s*\)/, allowlist: ["lib/pid-probe.js"], reason: "b.daemon and b.appShutdown.pidLock carried byte-identical signal-0 liveness probes (process.kill(pid, 0) → alive; EPERM → alive-but-unowned; ESRCH → dead) that were extracted to lib/pid-probe.js (isLivePid) so there is ONE classifier. A re-rolled inline process.kill(pid, 0) risks drifting the EPERM/ESRCH interpretation — e.g. treating EPERM (a running daemon owned by another uid) as dead, so it is misread as reap-able and its pidfile stolen. pid-probe.js owns the primitive and is allowlisted; any other lib file sending signal 0 must route through pidProbe.isLivePid. Extract-then-register per feedback_extract_then_register_catalog. Empty-but-for-the-owner allowlist — an inline signal-0 probe elsewhere is the re-duplication." },
9014
+
9015
+ { id: "static-confinement-must-compose-safepath-confineToBase", primitive: "lib/static.js's path-traversal barrier (_assertInsideRoot) must compose b.safePath.confineToBase for its lexical base-containment — not re-roll nodePath.join + a startsWith(root + sep) check, which drifts from the shared cross-platform-aware containment (the runtime nodePath misses a backslash traversal on a POSIX host)", scanScope: "lib", skipCommentLines: true, regex: /function _assertInsideRoot\b/, requires: /safePath\.confineToBase\(/, allowlist: [], reason: "static serving confines an operator-configured root against CWE-22 traversal. Its containment step (resolve the request path against root, confirm it stays strictly inside) is the SAME lexical check b.safePath.resolve layers its user-input strictness on top of — so static.js composes the extracted b.safePath.confineToBase rather than hand-rolling nodePath.join + startsWith(root + sep). It composes the containment CORE, NOT b.safePath.resolve, because static keeps containment and per-file basename validation as SEPARATE steps (its own b.guardFilename basename gate, calibrated for served content) — fusing resolve's all-segment user-input strictness into the barrier would double the basename checks and reject a legitimate colon-named intermediate directory the basename-only gate permits. A re-rolled join+startsWith containment in static.js also loses the shared cross-platform-aware resolve (the runtime path module treats the other platform's separator as an ordinary char and misses a backslash traversal on POSIX). Anchored on _assertInsideRoot, unique to static.js; the requires-companion trips if the confineToBase composition is removed. Empty allowlist." },
9016
+
9017
+ { id: "lib-fs-watch-must-normalize-shortname-path", primitive: "any lib/ fs.watch call (via nodeFs.watch) must first expand an 8.3 short-name component via realpathSync.native in the same file — otherwise fs.watch aborts libuv (uncatchable) on a Windows short-name path; a single-file watch should instead prefer the nodeFs.watchFile StatWatcher, which is immune", scanScope: "lib", skipCommentLines: true, regex: /nodeFs\.watch\(/, requires: /realpathSync\.native/, allowlist: [], reason: "fs.watch, via libuv ReadDirectoryChangesW, aborts the whole process — src/win/fs-event.c '!_wcsnicmp(filename, dir, dirlen)' — when the watched path is reached through a Windows 8.3 short-name component (GetFinalPathNameByHandle returns the long form; the prefix check fails). The daemon hit this in windows-CI on the runner's C:\\Users\\RUNNER~1\\...\\Temp path. b.watcher already guards it (root = nodeFs.realpathSync.native(root) before the recursive watch); bundler + dev now normalize inside their watchFn; flag-providers switched to the nodeFs.watchFile StatWatcher, which opens no directory-change handle and so does not match this detector's nodeFs.watch regex. The requires-companion clears a file once it realpath-normalizes; a new lib fs.watch with no realpathSync.native in the same file trips the gate. STRUCTURAL guard — the abort needs an 8.3 short-name path and cannot be reproduced where 8.3 generation is disabled, so no behavioral test can assert it. Empty allowlist." },
9018
+
8475
9019
  { id: "bounded-chunk-collector-not-a-stream-consumer", primitive: "b.safeBuffer.boundedChunkCollector(opts) takes a SINGLE options object and returns a { push, result, bytesCollected } collector — it is not a stream consumer. To read a Readable (request body, upstream response) use b.safeBuffer.collectStream(stream, opts), which pumps the stream into a bounded collector and resolves a Buffer. A boundedChunkCollector(req, ...) call passes the stream as opts (maxBytes undefined → buffer/bad-arg throw) and then awaits / .then()s a non-Promise collector.", scanScope: "lib", skipCommentLines: true, regex: /boundedChunkCollector\s*\(\s*\w+\s*,/, allowlist: [], reason: "csp-report (413 on EVERY POST) and scim-server (every streamed body broke) both called safeBuffer.boundedChunkCollector(req, { maxBytes }) / (req, MAX, ErrClass, code): the request stream was passed as the opts argument (maxBytes undefined → synchronous buffer/bad-arg, surfaced as 413/500) and the returned push-collector was treated as a thenable. boundedChunkCollector has no (stream, opts) overload; b.safeBuffer.collectStream is the stream-reading sibling. The regex flags a call whose first argument is a bare identifier immediately followed by a comma (the multi-arg / stream-first misuse); single-object boundedChunkCollector({ ... }) and single-var boundedChunkCollector(opts) / boundedChunkCollector(opts || {}) calls do not match. Empty allowlist — there is no valid multi-arg form. This is the detector that would have caught both endpoints before smoke." },
8476
9020
 
8477
9021
  { id: "regex-polynomial-whitespace-in-repeated-group", primitive: "a regex literal must not place an optional-whitespace `\\s*` / `\\s+` at the END of a repeated group (the `(?:…\\s*)*` / `…\\s*)+` shape) — the same whitespace can be consumed either inside the group or by surrounding whitespace, so a crafted input backtracks polynomially (CWE-1333 ReDoS). Consume whitespace as a single disjoint alternative `(?:\\s|…)*` instead, and match block comments with the star-not-slash form, never a lazy `[\\s\\S]*?`.", scanScope: "lib", skipCommentLines: true, regex: /\\s[*+]\)[*+]/, allowlist: [], reason: "CodeQL js/polynomial-redos (alert 330) flagged lib/external-db.js's leading-keyword classifier `/^\\s*(?:\\/\\*…\\s*|--…\\s*)*([A-Za-z]+)/` — the `\\s*` both before AND at the tail of the repeated group gives two ways to consume the same whitespace run, so a SQL string of nested `/**/` or `*/--` comment runs backtracks polynomially; reused by the new OTel db.operation path it became a taint sink. Rewritten to `/^(?:\\s|\\/\\*(?:[^*]|\\*(?!\\/))*\\*\\/|--[^\\n]*\\n)*([A-Za-z]+)/` (disjoint single-char alternatives). codebase-patterns is a curated detector set, not a taint/ReDoS analyzer like CodeQL — this closes the specific shape locally so the next agent-authored comment-skip regex trips the gate before CI. Empty allowlist — a `\\s*)*` / `\\s+)+` tail in a lib regex is the ReDoS tell; allowlist a genuinely-anchored case with its structural reason." },
@@ -10260,6 +10804,25 @@ var KNOWN_ANTIPATTERNS = [
10260
10804
  allowlist: [],
10261
10805
  reason: "0.15.54 — self-update-standalone-verifier-ecdsa-encoding.test.js:189 asserted that a raw IEEE-P1363 P-384 signature's first byte was not the DER SEQUENCE tag 0x30, to prove it was not DER-encoded; that byte is r's high octet, which equals 0x30 ~1/256 of the time, so the setup assertion flaked and blocked the release's ubuntu smoke (the saml-mdq-wrapping release CI). The deterministic distinguisher is the fixed 96-byte (P-384) / 64-byte (P-256) raw length; the fix guards the byte check with a `|| sig.length === N` disjunction, matching sd-jwt-vc-ecdsa-p1363.test.js:51. Fires on a bare first-byte-not-0x30 check with no length disjunction on the same line; silent once guarded.",
10262
10806
  },
10807
+ {
10808
+ // A test helper that guards a value truthy with `!!x &&` on the LEFT of an
10809
+ // && and then re-guards the SAME variable inside a sub-expression on the
10810
+ // right (`!!x && f((x && x.prop) || …)`) has a redundant inner `x &&`:
10811
+ // once `!!x` short-circuits true, x is truthy, so `x && x.prop` is just
10812
+ // `x.prop`. Sound because the outer `!!x &&` gates the whole sub-expression
10813
+ // — the temper on `||` excludes the shape where an intervening `||` breaks
10814
+ // that guarantee (`!!x && a || b(x && x.y)` — there b's inner guard is real
10815
+ // because x can be null on the right of `||`). A pure-redundancy code-smell
10816
+ // the linters flag as an always-true conditional; a behavioral test can't
10817
+ // assert it (both forms behave identically), so the detector is the guard.
10818
+ id: "test-redundant-inner-truthy-guard",
10819
+ primitive: "a redundant always-true inner guard — a value already proven truthy by a leading double-bang test is re-tested with a second and-guard inside the same guarded call, so the inner guard is dead; read the property directly instead",
10820
+ scanScope: "test",
10821
+ regex: /!!(\w+)\s*&&(?:(?!\|\|)[^\n])*\(\s*\1\s*&&\s*\1\./,
10822
+ skipCommentLines: true,
10823
+ allowlist: [],
10824
+ reason: "0.16.15 — openid-federation.test.js `_rejects`/`_throws` re-tested `threw` inside the guarded `re.test(...)` even though the leading double-bang test on `threw` already proved it truthy, so the inner test was dead; the code-quality bot flagged it as a useless always-true conditional and blocked merge on thread-resolution (same class as the 0.16.10 agent-helper double-check). Fixed by reading `threw.code` directly. The `||` temper keeps only the sound shape — it does NOT fire on external-db-routing.test.js:297, where the same-variable inner guard is real because the value can be null on the right of an `||`. Fires when a double-bang guard is followed on one line, with no intervening `||`, by a parenthesized re-test of the same variable; silent once the inner guard is dropped.",
10825
+ },
10263
10826
  {
10264
10827
  // A test file must invoke its run()/IIFE ONLY under
10265
10828
  // `if (require.main === module)`. The smoke worker REQUIRES each test
@@ -10340,6 +10903,11 @@ var KNOWN_ANTIPATTERNS = [
10340
10903
  // shadow-timeout posture. Not a condition-wait use; the
10341
10904
  // setTimeout IS the simulated latency itself.
10342
10905
  "test/layer-0-primitives/audit-use-store.test.js",
10906
+ // gate-contract.test.js simulates a slow gate check (a Promise
10907
+ // that resolves after 5s) to verify defineGate's maxRuntimeMs
10908
+ // timeout fires first. Same shape as audit-use-store: the
10909
+ // setTimeout IS the simulated latency, not a condition-wait.
10910
+ "test/layer-0-primitives/gate-contract.test.js",
10343
10911
  // services.js implements the TCP/TLS/UDP probe primitives the
10344
10912
  // integration-test harness uses to detect whether a Docker
10345
10913
  // service is reachable. The setTimeout calls are the timeout
@@ -10918,6 +11486,67 @@ var KNOWN_ANTIPATTERNS = [
10918
11486
  allowlist: [],
10919
11487
  reason: "v0.14.7 — external-db credential-rejection audits (SQLSTATE 28000 / 28P01 / 42501) now carry attemptedTable, the relation the rejected identity tried to touch, extracted defensively from the SQL. The detector requires any file emitting an action:'db.auth.failed' audit to also name attemptedTable so a future emitter can't drop the forensic field.",
10920
11488
  },
11489
+ {
11490
+ id: "prometheus-exposition-escape-owned-by-metrics",
11491
+ primitive: "b.metrics — _escapeLabelValue / _renderFamilyLines (one exposition encoder)",
11492
+ scanScope: "lib",
11493
+ skipCommentLines: true,
11494
+ // Prometheus / OpenMetrics wire-format escaping (backslash, quote,
11495
+ // newline in label values / help text) and labeled-sample line
11496
+ // rendering are owned by lib/metrics.js — one encoder behind the
11497
+ // live exposition(), the shadow registry, and snapshot.render. A
11498
+ // hand-rolled backslash-doubling chain that ALSO escapes newline
11499
+ // (`.replace(/\\/g,"\\\\")...replace(/\n/g,"\\n")`) is the Prometheus
11500
+ // escape signature — a second exposition encoder growing in another
11501
+ // lib file, whose escaping/ordering drifts from the canonical one.
11502
+ // The two-step backslash+quote chains used by RFC 8941 sf-string /
11503
+ // IMAP / Sieve / Link-header quoted-strings do not escape newline
11504
+ // and are deliberately out of scope. The `{1,60}` bound on the
11505
+ // optional intermediate replace is a ReDoS backstop, not precision.
11506
+ regex: /\.replace\(\/\\\\\/g,\s*"\\{4}"\)(?:\.replace\([^)]{1,60}\))?\.replace\(\/\\n\/g,\s*"\\{2}n"\)/,
11507
+ allowlist: ["lib/metrics.js"],
11508
+ reason: "Prometheus exposition escaping is owned by lib/metrics.js (_escapeLabelValue for label values, the help-text escape in the snapshot family normalizer); every exposition surface routes through its shared family encoder. A second escape chain in another lib file means a duplicate encoder whose output can drift from the canonical exposition — compose the metrics encoder instead.",
11509
+ },
11510
+ {
11511
+ id: "rfc-quoted-string-escape-owned-by-safeBuffer",
11512
+ primitive: "b.safeBuffer.quoteString",
11513
+ scanScope: "lib",
11514
+ skipCommentLines: true,
11515
+ // RFC quoted-string serialization (escape backslash + DQUOTE, wrap
11516
+ // in DQUOTEs — sf-string / Link-header params / Authentication-
11517
+ // Results reason / IMAP / ManageSieve strings) is owned by
11518
+ // safeBuffer.quoteString. A hand-rolled backslash-doubling chain
11519
+ // followed immediately by a DQUOTE escape is that serializer
11520
+ // re-implemented inline; its escaping can drift (the pre-extraction
11521
+ // copies disagreed on String() coercion) and a missed site is a
11522
+ // parameter-smuggling seam. The Prometheus exposition chain escapes
11523
+ // newline between the two steps, so it does not match here (it has
11524
+ // its own detector + owner).
11525
+ regex: /\.replace\(\/\\\\\/g,\s*"\\{4}"\)\.replace\(\/"\/g/,
11526
+ allowlist: ["lib/safe-buffer.js"],
11527
+ reason: "Backslash+DQUOTE quoted-string escaping is owned by safeBuffer.quoteString (RFC 8941 sf-string, RFC 8288 Link params, RFC 8601 reason, RFC 3501 IMAP, RFC 5804 ManageSieve all route through it). An inline `.replace(/\\\\/g,...).replace(/\"/g,...)` chain in another lib file is the serializer re-implemented — compose safeBuffer.quoteString instead. lib/safe-buffer.js is the primitive's home.",
11528
+ },
11529
+
11530
+ {
11531
+ id: "db-handle-hand-rolled-dml",
11532
+ primitive: "b.sql",
11533
+ scanScope: "lib",
11534
+ skipCommentLines: true,
11535
+ // A primitive holding a db handle (opts.db) that runs DML by passing an
11536
+ // inline SQL string LITERAL to db.prepare/runSql —
11537
+ // `db.prepare("SELECT ... FROM " + table + " WHERE ...")` — re-implements
11538
+ // the identifier quoting, sealed-field rewrite and dialect handling that
11539
+ // b.sql (the builder db.from() itself uses) already does, and drifts from
11540
+ // it: the tenant-quota storage query did exactly this and accrued a run of
11541
+ // parity defects (reserved-word names, schema-qualified "schema.table"
11542
+ // names, sealed-column filtering). Build the query with b.sql and prepare
11543
+ // the resulting string instead; a `db.prepare(built.sql)` with a VARIABLE
11544
+ // argument does not match. DDL (CREATE / ALTER / PRAGMA) is not a b.sql
11545
+ // DML verb and uses non-DML keywords, so it is out of scope here.
11546
+ regex: /\bdb\.(?:prepare|runSql|exec|run)\(\s*(?:[A-Za-z_$][\w.$]*\(\s*)?["'\x60][^"'\x60]*\b(?:SELECT|INSERT|UPDATE|DELETE)\b/,
11547
+ allowlist: [],
11548
+ reason: "A db-handle primitive that hand-rolls DML by concatenating a SQL string literal into db.prepare/runSql re-implements b.sql's identifier quoting + sealed-field rewrite and drifts from db.from() — the tenant-quota storage query accrued reserved-word, schema-qualified and sealed-column parity defects across six review rounds doing exactly this. Compose `sql.select/insert/update/delete(table, { dialect: 'sqlite', quoteName: true }).….toSql()` and `db.prepare(built.sql)` instead (skip the unseal loop when you need raw on-disk bytes). Matches an inline SELECT/INSERT/UPDATE/DELETE literal passed to db.prepare/runSql (optionally wrapped in one helper call such as safeSql.assertSingleStatement); a db.prepare(<variable>) built by b.sql does not match, and DDL/PRAGMA is out of scope. See lib/tenant-quota.js and lib/dsr.js for the composed shape.",
11549
+ },
10921
11550
 
10922
11551
  ];
10923
11552
 
@@ -13146,6 +13775,101 @@ function testEsbuildPinAgreesAcrossArtifacts() {
13146
13775
  bad);
13147
13776
  }
13148
13777
 
13778
+ // Fuzz-build invariant: the ClusterFuzzLite / OSS-Fuzz build script
13779
+ // (.clusterfuzzlite/build.sh) must (1) install @jazzer.js/core BEFORE
13780
+ // compile_javascript_fuzzer and (2) name each seed-corpus zip after the
13781
+ // COMPILED TARGET. compile_javascript_fuzzer emits a wrapper that execs
13782
+ // <project>/node_modules/@jazzer.js/core/dist/cli.js from a wholesale copy of
13783
+ // $SRC/blamejs, so the runtime must exist at the project-root node_modules at
13784
+ // compile time — with no `npm ci` first, every target references a runtime that
13785
+ // isn't present and cannot start. The helper names targets `basename -s .js`
13786
+ // (keeping `.fuzz`: guard-csv.fuzz), so a zip paired on the `.fuzz.js`-stripped
13787
+ // base (guard-csv_seed_corpus.zip) never associates with the target and the
13788
+ // engine bootstraps from an empty corpus. Both regressed silently: the build
13789
+ // exits 0 and CI (cflite_*.yml) invokes jazzer directly, never this script — so
13790
+ // the latent OSS-Fuzz-upstream spec built targets that couldn't run and fuzzed
13791
+ // from nothing.
13792
+ function testFuzzBuildWiresJazzerAndPairsCorpus() {
13793
+ var buildPath = ".clusterfuzzlite/build.sh";
13794
+ var src;
13795
+ try { src = fs.readFileSync(buildPath, "utf8"); }
13796
+ catch (_e) { return; } // absent in this checkout — skip
13797
+ if (src.indexOf("compile_javascript_fuzzer") < 0) return; // not the fuzz build
13798
+
13799
+ var bad = [];
13800
+ var lines = src.split(/\r?\n/);
13801
+ function isBuildComment(s) { return /^\s*#/.test(s); }
13802
+
13803
+ // (1) an install must precede the first compile_javascript_fuzzer.
13804
+ var firstCompile = -1;
13805
+ for (var i = 0; i < lines.length; i += 1) {
13806
+ if (!isBuildComment(lines[i]) && /\bcompile_javascript_fuzzer\b/.test(lines[i])) { firstCompile = i; break; }
13807
+ }
13808
+ if (firstCompile >= 0) {
13809
+ var hasInstallBefore = false;
13810
+ for (var j = 0; j < firstCompile; j += 1) {
13811
+ if (!isBuildComment(lines[j]) && /\bnpm\s+(ci|install|i)\b/.test(lines[j])) { hasInstallBefore = true; break; }
13812
+ }
13813
+ if (!hasInstallBefore) {
13814
+ bad.push({ file: buildPath, line: firstCompile + 1,
13815
+ content: "compile_javascript_fuzzer runs with no `npm ci`/`npm install` before it — " +
13816
+ "@jazzer.js/core is never installed, so every compiled target references a runtime " +
13817
+ "that isn't present and fails to start (the build still exits 0, so the gap is silent)" });
13818
+ }
13819
+ }
13820
+
13821
+ // (2) the seed-corpus zip must be named after the compiled target
13822
+ // (basename -s .js, keeping `.fuzz`), never a var stripped with `.fuzz.js`.
13823
+ for (var z = 0; z < lines.length; z += 1) {
13824
+ if (isBuildComment(lines[z])) continue;
13825
+ var zm = /zip\b[^\n]*\$\{?(\w+)\}?_seed_corpus\.zip/.exec(lines[z]);
13826
+ if (!zm) continue;
13827
+ var zipVar = zm[1];
13828
+ var wrongStem = new RegExp("\\b" + zipVar + "\\s*=\\s*\\$\\(\\s*basename\\b[^)]*\\.fuzz\\.js\\s*\\)");
13829
+ for (var a = 0; a < lines.length; a += 1) {
13830
+ if (!isBuildComment(lines[a]) && wrongStem.test(lines[a])) {
13831
+ bad.push({ file: buildPath, line: z + 1,
13832
+ content: "seed-corpus zip named from $" + zipVar + " (=`basename ... .fuzz.js`, drops `.fuzz`); " +
13833
+ "the compiled target keeps `.fuzz` (basename -s .js), so the corpus never pairs — " +
13834
+ "derive the zip name from the target (basename -s .js)" });
13835
+ break;
13836
+ }
13837
+ }
13838
+ }
13839
+
13840
+ bad = _filterMarkers(bad, "fuzz-build-jazzer-runtime");
13841
+ _report(".clusterfuzzlite/build.sh installs @jazzer.js/core before compile_javascript_fuzzer + " +
13842
+ "names each seed-corpus zip after the compiled target so the engine pairs it",
13843
+ bad);
13844
+ }
13845
+
13846
+ // The wiki example depends on the framework via a file: link installed with
13847
+ // --install-links. If examples/wiki/package-lock.json's @blamejs/core node is
13848
+ // empty ({}) — as `pin-all --lockfiles` emits when it can't reach the linked
13849
+ // package — `npm ci --install-links` creates node_modules/@blamejs/ with NO
13850
+ // @blamejs/core, so every wiki CI job (e2e, comment-block) dies at
13851
+ // require.resolve("@blamejs/core") before a single test runs. Regenerate via
13852
+ // `cd examples/wiki && rm -rf node_modules package-lock.json && npm install
13853
+ // --install-links` (which restores the version + resolved:"file:../.." metadata).
13854
+ function testWikiLockfileHasFileLinkMetadata() {
13855
+ var lockPath = "examples/wiki/package-lock.json";
13856
+ var lock;
13857
+ try { lock = JSON.parse(fs.readFileSync(lockPath, "utf8")); }
13858
+ catch (_e) { return; }
13859
+ var node = lock.packages && lock.packages["node_modules/@blamejs/core"];
13860
+ var bad = [];
13861
+ if (!node || typeof node.resolved !== "string" || node.resolved.indexOf("file:") !== 0) {
13862
+ bad.push({ file: lockPath, line: 1,
13863
+ content: "node_modules/@blamejs/core lockfile node lacks its file-link metadata " +
13864
+ "(resolved: \"file:../..\"); npm ci --install-links then can't resolve @blamejs/core and " +
13865
+ "every wiki job fails at require.resolve before tests start — regenerate with a full " +
13866
+ "`rm -rf node_modules package-lock.json && npm install --install-links`" });
13867
+ }
13868
+ bad = _filterMarkers(bad, "wiki-lockfile-file-link");
13869
+ _report("examples/wiki/package-lock.json carries the @blamejs/core file-link metadata (resolved: file:../..)",
13870
+ bad);
13871
+ }
13872
+
13149
13873
  // The test-detached-async-iife antipattern (scanScope: "test") covers *.test.js,
13150
13874
  // but the legacy single-layer entry files (test/00-primitives.js …
13151
13875
  // 50-integration.js) are required + run directly by smoke.js via _runLayer and
@@ -14013,6 +14737,7 @@ async function run() {
14013
14737
  testNumericOptsValidate();
14014
14738
  testHttp2TeardownPaired();
14015
14739
  testNoStrayConsoleCalls();
14740
+ testNoApplyDefaultsDroppedOpt();
14016
14741
  testNoUnresolvedMarkers();
14017
14742
  testNoStaleDefers();
14018
14743
  testNoLiteralNulBytesInSource();
@@ -14077,6 +14802,7 @@ async function run() {
14077
14802
  testNoManualByteCompare();
14078
14803
  testNoOpenCodedLazyRequire();
14079
14804
  testNoBareErrorThrows();
14805
+ testDefineClassErrorArgOrder();
14080
14806
  testNoHandrolledUrlBuild();
14081
14807
  testNoHandrolledRetryLoop();
14082
14808
  await testNoDuplicateCodeBlocks();
@@ -14086,6 +14812,10 @@ async function run() {
14086
14812
  testNoDenseWildcardRunsInLib();
14087
14813
  testNoUncappedSearchParamsObject();
14088
14814
  testNoDeniedVendors();
14815
+ testVendorBundlesReviewable();
14816
+ testScannerPolicyCoversVendorDataCarriers();
14817
+ testVendorComponentsAttributedInNotice();
14818
+ testDocumentedScriptFlagsExist();
14089
14819
  // v0.8.91 bug-class detectors — derived from the
14090
14820
  // mail-require-tls / fal.meets / cdn-cache-control / SRS fix-ups.
14091
14821
  testTrimBeforeControlByteScan();
@@ -14160,6 +14890,14 @@ async function run() {
14160
14890
  // step's port mapping + curl host.
14161
14891
  testWikiPortAgreesAcrossArtifacts();
14162
14892
  testEsbuildPinAgreesAcrossArtifacts();
14893
+ // fuzz-build cross-artifact detector: .clusterfuzzlite/build.sh must install
14894
+ // @jazzer.js/core before compile_javascript_fuzzer + pair each seed corpus by
14895
+ // the compiled target name (both silently regressed the OSS-Fuzz spec).
14896
+ testFuzzBuildWiresJazzerAndPairsCorpus();
14897
+ // wiki file-link lockfile detector: examples/wiki/package-lock.json's
14898
+ // @blamejs/core node must carry resolved:"file:../.." or npm ci --install-links
14899
+ // can't resolve the framework and every wiki job dies before tests run.
14900
+ testWikiLockfileHasFileLinkMetadata();
14163
14901
  testNoDetachedAsyncIifeInLegacyLayerFiles();
14164
14902
  testNoTrackedInternalNotes();
14165
14903
  testResidencyGatesWired();