@blamejs/core 0.14.0 → 0.14.2

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 (277) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/lib/_test/crypto-fixtures.js +3 -3
  3. package/lib/a2a-tasks.js +18 -18
  4. package/lib/a2a.js +4 -4
  5. package/lib/acme.js +3 -3
  6. package/lib/agent-idempotency.js +1 -1
  7. package/lib/agent-orchestrator.js +8 -8
  8. package/lib/agent-posture-chain.js +2 -2
  9. package/lib/agent-saga.js +1 -1
  10. package/lib/agent-snapshot.js +1 -1
  11. package/lib/agent-stream.js +1 -1
  12. package/lib/agent-tenant.js +1 -1
  13. package/lib/agent-trace.js +3 -3
  14. package/lib/ai-capability.js +1 -1
  15. package/lib/ai-dp.js +4 -4
  16. package/lib/ai-input.js +3 -3
  17. package/lib/ai-model-manifest.js +7 -7
  18. package/lib/ai-pref.js +3 -3
  19. package/lib/archive-gz.js +2 -2
  20. package/lib/archive-read.js +25 -25
  21. package/lib/archive-tar-read.js +2 -2
  22. package/lib/archive-tar.js +20 -20
  23. package/lib/archive-wrap.js +10 -10
  24. package/lib/argon2-builtin.js +1 -1
  25. package/lib/asn1-der.js +45 -34
  26. package/lib/atomic-file.js +2 -2
  27. package/lib/audit-daily-review.js +3 -3
  28. package/lib/audit-sign.js +5 -5
  29. package/lib/audit-tools.js +1 -1
  30. package/lib/audit.js +2 -2
  31. package/lib/auth/acr-vocabulary.js +2 -2
  32. package/lib/auth/bot-challenge.js +3 -3
  33. package/lib/auth/ciba.js +7 -7
  34. package/lib/auth/dpop.js +3 -3
  35. package/lib/auth/fido-mds3.js +8 -8
  36. package/lib/auth/jar.js +11 -0
  37. package/lib/auth/jwt-external.js +5 -5
  38. package/lib/auth/oauth.js +7 -9
  39. package/lib/auth/oid4vci.js +10 -10
  40. package/lib/auth/oid4vp.js +2 -2
  41. package/lib/auth/openid-federation.js +2 -2
  42. package/lib/auth/passkey.js +3 -3
  43. package/lib/auth/saml.js +29 -25
  44. package/lib/auth/sd-jwt-vc-disclosure.js +1 -1
  45. package/lib/auth/sd-jwt-vc.js +4 -4
  46. package/lib/auth/status-list.js +10 -10
  47. package/lib/auth/step-up.js +1 -1
  48. package/lib/auth-bot-challenge.js +1 -1
  49. package/lib/backup/index.js +7 -7
  50. package/lib/base32.js +8 -8
  51. package/lib/budr.js +2 -2
  52. package/lib/cache-status.js +2 -2
  53. package/lib/calendar.js +23 -23
  54. package/lib/cbor.js +12 -12
  55. package/lib/cdn-cache-control.js +1 -1
  56. package/lib/cert.js +5 -5
  57. package/lib/cloud-events.js +5 -5
  58. package/lib/cms-codec.js +21 -21
  59. package/lib/codepoint-class.js +12 -12
  60. package/lib/compliance-sanctions-fuzzy.js +4 -4
  61. package/lib/compliance-sanctions.js +4 -4
  62. package/lib/compliance.js +29 -29
  63. package/lib/content-credentials.js +36 -36
  64. package/lib/cookies.js +1 -1
  65. package/lib/cose.js +13 -13
  66. package/lib/cra-report.js +1 -1
  67. package/lib/crdt.js +1 -1
  68. package/lib/crypto-field.js +2 -2
  69. package/lib/crypto-xwing.js +7 -7
  70. package/lib/crypto.js +6 -6
  71. package/lib/csp.js +2 -2
  72. package/lib/cwt.js +4 -4
  73. package/lib/dark-patterns.js +2 -2
  74. package/lib/data-act.js +2 -2
  75. package/lib/db-file-lifecycle.js +4 -4
  76. package/lib/db-query.js +1 -1
  77. package/lib/db.js +6 -6
  78. package/lib/dbsc.js +13 -13
  79. package/lib/did.js +17 -17
  80. package/lib/dora.js +4 -4
  81. package/lib/dsr.js +1 -1
  82. package/lib/early-hints.js +2 -2
  83. package/lib/eat.js +4 -4
  84. package/lib/external-db-migrate.js +1 -1
  85. package/lib/external-db.js +1 -1
  86. package/lib/flag-cache.js +1 -1
  87. package/lib/flag-evaluation-context.js +2 -2
  88. package/lib/graphql-federation.js +4 -4
  89. package/lib/guard-agent-registry.js +5 -5
  90. package/lib/guard-archive.js +24 -24
  91. package/lib/guard-cidr.js +33 -33
  92. package/lib/guard-csv.js +1 -1
  93. package/lib/guard-domain.js +10 -10
  94. package/lib/guard-dsn.js +4 -4
  95. package/lib/guard-email.js +19 -19
  96. package/lib/guard-event-bus-payload.js +4 -4
  97. package/lib/guard-event-bus-topic.js +6 -6
  98. package/lib/guard-filename.js +7 -7
  99. package/lib/guard-graphql.js +9 -9
  100. package/lib/guard-html-wcag-tagwalk.js +1 -1
  101. package/lib/guard-html-wcag.js +4 -4
  102. package/lib/guard-html.js +7 -7
  103. package/lib/guard-idempotency-key.js +6 -6
  104. package/lib/guard-image.js +4 -4
  105. package/lib/guard-imap-command.js +17 -17
  106. package/lib/guard-jmap.js +20 -20
  107. package/lib/guard-json.js +12 -12
  108. package/lib/guard-jsonpath.js +3 -3
  109. package/lib/guard-jwt.js +4 -4
  110. package/lib/guard-list-id.js +7 -7
  111. package/lib/guard-list-unsubscribe.js +8 -8
  112. package/lib/guard-mail-compose.js +4 -4
  113. package/lib/guard-mail-move.js +5 -5
  114. package/lib/guard-mail-query.js +3 -3
  115. package/lib/guard-mail-reply.js +3 -3
  116. package/lib/guard-mail-sieve.js +6 -6
  117. package/lib/guard-managesieve-command.js +25 -25
  118. package/lib/guard-markdown.js +31 -31
  119. package/lib/guard-message-id.js +5 -5
  120. package/lib/guard-mime.js +1 -1
  121. package/lib/guard-oauth.js +3 -3
  122. package/lib/guard-pdf.js +6 -6
  123. package/lib/guard-pop3-command.js +11 -11
  124. package/lib/guard-posture-chain.js +5 -5
  125. package/lib/guard-regex.js +10 -10
  126. package/lib/guard-saga-config.js +5 -5
  127. package/lib/guard-smtp-command.js +6 -6
  128. package/lib/guard-snapshot-envelope.js +3 -3
  129. package/lib/guard-stream-args.js +4 -4
  130. package/lib/guard-svg.js +11 -11
  131. package/lib/guard-tenant-id.js +5 -5
  132. package/lib/guard-time.js +15 -15
  133. package/lib/guard-trace-context.js +4 -4
  134. package/lib/guard-uuid.js +11 -11
  135. package/lib/guard-xml.js +12 -12
  136. package/lib/guard-yaml.js +16 -16
  137. package/lib/honeytoken.js +5 -5
  138. package/lib/http-client.js +1 -1
  139. package/lib/http-message-signature.js +2 -2
  140. package/lib/iab-mspa.js +3 -3
  141. package/lib/iab-tcf.js +70 -70
  142. package/lib/inbox.js +4 -4
  143. package/lib/ip-utils.js +15 -15
  144. package/lib/jose-jwe-experimental.js +2 -2
  145. package/lib/json-path.js +3 -3
  146. package/lib/json-schema.js +1 -1
  147. package/lib/jsonapi.js +3 -3
  148. package/lib/jtd.js +2 -2
  149. package/lib/link-header.js +1 -1
  150. package/lib/local-db-thin.js +1 -1
  151. package/lib/log.js +1 -1
  152. package/lib/lro.js +4 -4
  153. package/lib/mail-agent.js +1 -1
  154. package/lib/mail-arc-sign.js +6 -6
  155. package/lib/mail-auth.js +43 -43
  156. package/lib/mail-bimi.js +3 -3
  157. package/lib/mail-crypto-pgp.js +53 -45
  158. package/lib/mail-crypto-smime.js +5 -5
  159. package/lib/mail-dav.js +1 -1
  160. package/lib/mail-deploy.js +39 -39
  161. package/lib/mail-dkim.js +11 -11
  162. package/lib/mail-greylist.js +12 -12
  163. package/lib/mail-helo.js +1 -1
  164. package/lib/mail-journal.js +8 -8
  165. package/lib/mail-rbl.js +7 -7
  166. package/lib/mail-scan.js +7 -7
  167. package/lib/mail-send-deliver.js +2 -2
  168. package/lib/mail-server-imap.js +12 -12
  169. package/lib/mail-server-jmap.js +16 -16
  170. package/lib/mail-server-managesieve.js +4 -4
  171. package/lib/mail-server-mx.js +17 -17
  172. package/lib/mail-server-pop3.js +4 -4
  173. package/lib/mail-server-rate-limit.js +2 -2
  174. package/lib/mail-server-submission.js +21 -21
  175. package/lib/mail-sieve.js +2 -2
  176. package/lib/mail-spam-score.js +5 -5
  177. package/lib/mail-srs.js +12 -12
  178. package/lib/mail-store-fts.js +2 -2
  179. package/lib/mail-store.js +8 -8
  180. package/lib/mail-unsubscribe.js +4 -4
  181. package/lib/mail.js +4 -4
  182. package/lib/mcp-tool-registry.js +4 -4
  183. package/lib/mcp.js +8 -8
  184. package/lib/mdoc.js +2 -2
  185. package/lib/metrics.js +8 -8
  186. package/lib/middleware/age-gate.js +1 -1
  187. package/lib/middleware/api-encrypt.js +7 -7
  188. package/lib/middleware/assetlinks.js +2 -2
  189. package/lib/middleware/asyncapi-serve.js +2 -2
  190. package/lib/middleware/bearer-auth.js +5 -5
  191. package/lib/middleware/body-parser.js +5 -5
  192. package/lib/middleware/compose-pipeline.js +15 -15
  193. package/lib/middleware/csp-report.js +4 -4
  194. package/lib/middleware/daily-byte-quota.js +1 -1
  195. package/lib/middleware/dpop.js +1 -1
  196. package/lib/middleware/headers.js +2 -2
  197. package/lib/middleware/host-allowlist.js +1 -1
  198. package/lib/middleware/idempotency-key.js +12 -12
  199. package/lib/middleware/nel.js +1 -1
  200. package/lib/middleware/openapi-serve.js +2 -2
  201. package/lib/middleware/protected-resource-metadata.js +2 -2
  202. package/lib/middleware/require-aal.js +1 -1
  203. package/lib/middleware/require-bound-key.js +2 -2
  204. package/lib/middleware/require-content-type.js +1 -1
  205. package/lib/middleware/require-methods.js +1 -1
  206. package/lib/middleware/require-step-up.js +2 -2
  207. package/lib/middleware/scim-server.js +1 -1
  208. package/lib/middleware/security-txt.js +3 -3
  209. package/lib/middleware/tus-upload.js +12 -12
  210. package/lib/middleware/web-app-manifest.js +2 -2
  211. package/lib/network-byte-quota.js +1 -1
  212. package/lib/network-dns-resolver.js +23 -23
  213. package/lib/network-dns.js +29 -29
  214. package/lib/network-dnssec.js +33 -33
  215. package/lib/network-smtp-policy.js +10 -10
  216. package/lib/network-tls.js +99 -94
  217. package/lib/network-tsig.js +33 -33
  218. package/lib/nis2-report.js +1 -1
  219. package/lib/ntp-check.js +3 -3
  220. package/lib/observability-otlp-exporter.js +17 -17
  221. package/lib/observability-tracer.js +6 -6
  222. package/lib/observability.js +8 -8
  223. package/lib/openapi-yaml.js +1 -1
  224. package/lib/openapi.js +1 -1
  225. package/lib/outbox.js +6 -6
  226. package/lib/pqc-agent.js +4 -4
  227. package/lib/pqc-software.js +1 -1
  228. package/lib/privacy-pass.js +5 -5
  229. package/lib/problem-details.js +5 -5
  230. package/lib/promise-pool.js +1 -1
  231. package/lib/protobuf-encoder.js +9 -1
  232. package/lib/queue.js +4 -2
  233. package/lib/redact.js +2 -2
  234. package/lib/request-helpers.js +1 -1
  235. package/lib/router.js +10 -10
  236. package/lib/safe-async.js +2 -2
  237. package/lib/safe-dns.js +71 -71
  238. package/lib/safe-ical.js +19 -19
  239. package/lib/safe-icap.js +24 -24
  240. package/lib/safe-jsonpath.js +2 -2
  241. package/lib/safe-mime.js +10 -10
  242. package/lib/safe-mount-info.js +3 -3
  243. package/lib/safe-redirect.js +1 -1
  244. package/lib/safe-sieve.js +23 -23
  245. package/lib/safe-smtp.js +1 -1
  246. package/lib/safe-vcard.js +14 -14
  247. package/lib/sandbox.js +5 -5
  248. package/lib/sec-cyber.js +1 -1
  249. package/lib/self-update-standalone-verifier.js +3 -3
  250. package/lib/self-update.js +3 -3
  251. package/lib/server-timing.js +3 -3
  252. package/lib/session-device-binding.js +7 -7
  253. package/lib/session.js +8 -8
  254. package/lib/standard-webhooks.js +4 -4
  255. package/lib/storage.js +2 -2
  256. package/lib/stream-throttle.js +1 -1
  257. package/lib/structured-fields.js +15 -15
  258. package/lib/subject.js +1 -1
  259. package/lib/tcpa-10dlc.js +1 -1
  260. package/lib/tenant-quota.js +3 -3
  261. package/lib/test-harness.js +1 -1
  262. package/lib/tracing.js +1 -1
  263. package/lib/tsa.js +5 -5
  264. package/lib/uri-template.js +5 -5
  265. package/lib/vault/index.js +2 -2
  266. package/lib/vault/seal-pem-file.js +4 -4
  267. package/lib/vc.js +2 -2
  268. package/lib/vendor-data.js +1 -1
  269. package/lib/watcher.js +4 -4
  270. package/lib/web-push-vapid.js +21 -21
  271. package/lib/webhook.js +2 -2
  272. package/lib/websocket.js +3 -3
  273. package/lib/worker-pool.js +3 -3
  274. package/lib/ws-client.js +24 -24
  275. package/lib/xml-c14n.js +2 -2
  276. package/package.json +1 -1
  277. package/sbom.cdx.json +6 -6
@@ -58,12 +58,12 @@ var archiveAdapters = lazyRequire(function () { return require("./archive-adapte
58
58
  // Aligned with the write-side `lib/archive.js`. APPNOTE.TXT § references
59
59
  // follow each signature so a future spec bump is mechanical.
60
60
 
61
- var SIG_LFH = 0x04034b50; // allow:raw-byte-literal — APPNOTE §4.3.7 LFH magic dword (wire-format-fixed)
62
- var SIG_CFH = 0x02014b50; // allow:raw-byte-literal — APPNOTE §4.3.12 CFH magic dword (wire-format-fixed)
63
- var SIG_EOCD = 0x06054b50; // allow:raw-byte-literal — APPNOTE §4.3.16 EOCD magic dword (wire-format-fixed)
64
- var SIG_EOCD64 = 0x06064b50; // allow:raw-byte-literal — APPNOTE §4.3.14 ZIP64 EOCD magic dword (wire-format-fixed)
65
- var SIG_EOCD64_LOCATOR = 0x07064b50; // allow:raw-byte-literal — APPNOTE §4.3.15 ZIP64 EOCD locator magic dword (wire-format-fixed)
66
- var SIG_DATA_DESCRIPTOR = 0x08074b50; // allow:raw-byte-literal — APPNOTE §4.3.9 data-descriptor magic dword (wire-format-fixed)
61
+ var SIG_LFH = 0x04034b50; // APPNOTE §4.3.7 LFH magic dword (wire-format-fixed)
62
+ var SIG_CFH = 0x02014b50; // APPNOTE §4.3.12 CFH magic dword (wire-format-fixed)
63
+ var SIG_EOCD = 0x06054b50; // APPNOTE §4.3.16 EOCD magic dword (wire-format-fixed)
64
+ var SIG_EOCD64 = 0x06064b50; // APPNOTE §4.3.14 ZIP64 EOCD magic dword (wire-format-fixed)
65
+ var SIG_EOCD64_LOCATOR = 0x07064b50; // APPNOTE §4.3.15 ZIP64 EOCD locator magic dword (wire-format-fixed)
66
+ var SIG_DATA_DESCRIPTOR = 0x08074b50; // APPNOTE §4.3.9 data-descriptor magic dword (wire-format-fixed)
67
67
  void SIG_EOCD64; void SIG_EOCD64_LOCATOR;
68
68
 
69
69
  var METHOD_STORE_ID = 0;
@@ -94,7 +94,7 @@ var MSDOS_EPOCH_YEAR = 1980;
94
94
  // ---- Default zip-bomb / entry caps ---------------------------------------
95
95
 
96
96
  var DEFAULT_BOMB_POLICY = Object.freeze({
97
- maxEntries: 65535, // allow:raw-byte-literal — APPNOTE §4.4.21 16-bit entry-count field's max (ZIP64 deferred)
97
+ maxEntries: 65535, // APPNOTE §4.4.21 16-bit entry-count field's max (ZIP64 deferred)
98
98
  maxEntryDecompressedBytes: C.BYTES.mib(128), // per-entry cap
99
99
  maxTotalDecompressedBytes: C.BYTES.gib(4), // archive-wide cap
100
100
  maxExpansionRatio: 100, // compressed → decompressed ratio cap
@@ -193,10 +193,10 @@ async function _locateEocd(adapter) {
193
193
  eocdOffset: scanOffset + i,
194
194
  diskNumber: tail.readUInt16LE(i + 4),
195
195
  cdDiskNumber: tail.readUInt16LE(i + 6),
196
- entriesOnThisDisk: tail.readUInt16LE(i + 8), // allow:raw-byte-literal — APPNOTE §4.3.16 EOCD field offset
197
- totalEntries: tail.readUInt16LE(i + 10), // allow:raw-byte-literal — APPNOTE §4.3.16 EOCD field offset
198
- cdSize: tail.readUInt32LE(i + 12), // allow:raw-byte-literal — APPNOTE §4.3.16 EOCD field offset
199
- cdOffset: tail.readUInt32LE(i + 16), // allow:raw-byte-literal — APPNOTE §4.3.16 EOCD field offset
196
+ entriesOnThisDisk: tail.readUInt16LE(i + 8), // APPNOTE §4.3.16 EOCD field offset
197
+ totalEntries: tail.readUInt16LE(i + 10), // APPNOTE §4.3.16 EOCD field offset
198
+ cdSize: tail.readUInt32LE(i + 12), // APPNOTE §4.3.16 EOCD field offset
199
+ cdOffset: tail.readUInt32LE(i + 16), // APPNOTE §4.3.16 EOCD field offset
200
200
  commentLength: commentLen,
201
201
  };
202
202
  }
@@ -234,20 +234,20 @@ async function _readCentralDirectory(adapter, eocd) {
234
234
  if (cdBytes.readUInt32LE(pos) !== SIG_CFH) {
235
235
  throw new ArchiveReadError("archive-read/bad-cd-signature",
236
236
  "central directory entry " + n + " has bad signature " +
237
- "0x" + cdBytes.readUInt32LE(pos).toString(16)); // allow:raw-byte-literal — radix=16 for hex parse, not byte count
237
+ "0x" + cdBytes.readUInt32LE(pos).toString(16)); // radix=16 for hex parse, not byte count
238
238
  }
239
- var generalFlags = cdBytes.readUInt16LE(pos + 8); // allow:raw-byte-literal — APPNOTE §4.3.12 CFH field offset
240
- var method = cdBytes.readUInt16LE(pos + 10); // allow:raw-byte-literal — APPNOTE §4.3.12 CFH field offset
241
- var dosTime = cdBytes.readUInt16LE(pos + 12); // allow:raw-byte-literal — APPNOTE §4.3.12 CFH field offset
242
- var dosDate = cdBytes.readUInt16LE(pos + 14); // allow:raw-byte-literal — APPNOTE §4.3.12 CFH field offset
243
- var crc32 = cdBytes.readUInt32LE(pos + 16); // allow:raw-byte-literal — APPNOTE §4.3.12 CFH field offset
244
- var compressedSize = cdBytes.readUInt32LE(pos + 20); // allow:raw-byte-literal — APPNOTE §4.3.12 CFH field offset
245
- var uncompressedSize = cdBytes.readUInt32LE(pos + 24); // allow:raw-byte-literal — APPNOTE §4.3.12 CFH field offset
246
- var nameLen = cdBytes.readUInt16LE(pos + 28); // allow:raw-byte-literal — APPNOTE §4.3.12 CFH field offset
247
- var extraLen = cdBytes.readUInt16LE(pos + 30); // allow:raw-byte-literal — APPNOTE §4.3.12 CFH field offset
248
- var commentLen = cdBytes.readUInt16LE(pos + 32); // allow:raw-byte-literal — APPNOTE §4.3.12 CFH field offset
249
- var externalAttrs = cdBytes.readUInt32LE(pos + 38); // allow:raw-byte-literal — APPNOTE §4.3.12 CFH field offset
250
- var lfhOffset = cdBytes.readUInt32LE(pos + 42); // allow:raw-byte-literal — APPNOTE §4.3.12 CFH field offset
239
+ var generalFlags = cdBytes.readUInt16LE(pos + 8); // APPNOTE §4.3.12 CFH field offset
240
+ var method = cdBytes.readUInt16LE(pos + 10); // APPNOTE §4.3.12 CFH field offset
241
+ var dosTime = cdBytes.readUInt16LE(pos + 12); // APPNOTE §4.3.12 CFH field offset
242
+ var dosDate = cdBytes.readUInt16LE(pos + 14); // APPNOTE §4.3.12 CFH field offset
243
+ var crc32 = cdBytes.readUInt32LE(pos + 16); // APPNOTE §4.3.12 CFH field offset
244
+ var compressedSize = cdBytes.readUInt32LE(pos + 20); // APPNOTE §4.3.12 CFH field offset
245
+ var uncompressedSize = cdBytes.readUInt32LE(pos + 24); // APPNOTE §4.3.12 CFH field offset
246
+ var nameLen = cdBytes.readUInt16LE(pos + 28); // APPNOTE §4.3.12 CFH field offset
247
+ var extraLen = cdBytes.readUInt16LE(pos + 30); // APPNOTE §4.3.12 CFH field offset
248
+ var commentLen = cdBytes.readUInt16LE(pos + 32); // APPNOTE §4.3.12 CFH field offset
249
+ var externalAttrs = cdBytes.readUInt32LE(pos + 38); // APPNOTE §4.3.12 CFH field offset
250
+ var lfhOffset = cdBytes.readUInt32LE(pos + 42); // APPNOTE §4.3.12 CFH field offset
251
251
  var nameStart = pos + CFH_FIXED_BYTES;
252
252
  var extraStart = nameStart + nameLen;
253
253
  var totalLen = CFH_FIXED_BYTES + nameLen + extraLen + commentLen;
@@ -292,7 +292,7 @@ async function _verifyLfhMatchesCd(adapter, entry) {
292
292
  if (lfhPrefix.readUInt32LE(0) !== SIG_LFH) {
293
293
  throw new ArchiveReadError("archive-read/bad-lfh-signature",
294
294
  "local file header for " + JSON.stringify(entry.name) +
295
- " has bad signature 0x" + lfhPrefix.readUInt32LE(0).toString(16)); // allow:raw-byte-literal — radix=16 for hex parse, not byte count
295
+ " has bad signature 0x" + lfhPrefix.readUInt32LE(0).toString(16)); // radix=16 for hex parse, not byte count
296
296
  }
297
297
  var lfhMethod = lfhPrefix.readUInt16LE(8);
298
298
  var lfhCrc = lfhPrefix.readUInt32LE(14);
@@ -38,10 +38,10 @@ var TF_PAX_GLOBAL = "g";
38
38
  void TF_CHARDEV; void TF_BLOCKDEV; void TF_FIFO; void TF_CONTIGUOUS;
39
39
 
40
40
  var DEFAULT_BOMB_POLICY = Object.freeze({
41
- maxEntries: 65535, // allow:raw-byte-literal — operator-friendly default ceiling
41
+ maxEntries: 65535, // operator-friendly default ceiling
42
42
  maxEntryDecompressedBytes: C.BYTES.mib(128),
43
43
  maxTotalDecompressedBytes: C.BYTES.gib(4),
44
- maxExpansionRatio: 100, // allow:raw-byte-literal — tar has no compression-ratio concept, but keep field for orchestrator policy parity
44
+ maxExpansionRatio: 100, // tar has no compression-ratio concept, but keep field for orchestrator policy parity
45
45
  });
46
46
 
47
47
  var DEFAULT_ENTRY_TYPE_POLICY = Object.freeze({
@@ -89,7 +89,7 @@ var USTAR_VERSION = "00"; // 2 bytes
89
89
  var NAME_MAX = C.BYTES.bytes(100); // ustar name field cap
90
90
  var PREFIX_MAX = C.BYTES.bytes(155); // ustar prefix field cap
91
91
  var LINKNAME_MAX = C.BYTES.bytes(100); // ustar linkname field cap
92
- var USTAR_SIZE_MAX = 0o77777777777; // allow:raw-byte-literal — 11 octal digits = 8 GiB - 1 per ustar size-field width
92
+ var USTAR_SIZE_MAX = 0o77777777777; // 11 octal digits = 8 GiB - 1 per ustar size-field width
93
93
 
94
94
  // Header field byte offsets (POSIX.1-1988 ustar; same in POSIX.1-2001 pax)
95
95
  var H_NAME = C.BYTES.bytes(0);
@@ -146,7 +146,7 @@ function _writeOctal(buf, value, offset, width) {
146
146
  // For width=8, that's 7 octal digits + terminator. For width=12, 11
147
147
  // digits + terminator.
148
148
  var digits = width - 1;
149
- var oct = value.toString(8); // allow:raw-byte-literal — radix=8 for octal stringify per ustar field format
149
+ var oct = value.toString(8); // radix=8 for octal stringify per ustar field format
150
150
  if (oct.length > digits) {
151
151
  throw new TarError("archive-tar/octal-overflow",
152
152
  "value " + value + " (octal " + oct + ") exceeds field width " + digits);
@@ -154,7 +154,7 @@ function _writeOctal(buf, value, offset, width) {
154
154
  // Left-pad with '0' to fill the digits.
155
155
  while (oct.length < digits) oct = "0" + oct;
156
156
  buf.write(oct, offset, digits, "ascii");
157
- buf.writeUInt8(0x20, offset + digits); // allow:raw-byte-literal — ASCII space (' ') terminator per ustar
157
+ buf.writeUInt8(0x20, offset + digits); // ASCII space (' ') terminator per ustar
158
158
  }
159
159
 
160
160
  function _writeString(buf, value, offset, width) {
@@ -175,15 +175,15 @@ function _readOctal(buf, offset, width) {
175
175
  var s = "";
176
176
  for (var i = 0; i < width; i += 1) {
177
177
  var c = buf[offset + i];
178
- if (c === 0x20 || c === 0) break; // allow:raw-byte-literal — ASCII space (0x20) + NUL (0x00) field terminators
179
- if (c < 0x30 || c > 0x37) { // allow:raw-byte-literal — ASCII '0' (0x30) .. '7' (0x37) octal digits
178
+ if (c === 0x20 || c === 0) break; // ASCII space (0x20) + NUL (0x00) field terminators
179
+ if (c < 0x30 || c > 0x37) { // ASCII '0' (0x30) .. '7' (0x37) octal digits
180
180
  throw new TarError("archive-tar/bad-octal",
181
- "non-octal byte 0x" + c.toString(16) + " at offset " + (offset + i)); // allow:raw-byte-literal — radix=16 for diagnostic hex format
181
+ "non-octal byte 0x" + c.toString(16) + " at offset " + (offset + i)); // radix=16 for diagnostic hex format
182
182
  }
183
183
  s += String.fromCharCode(c);
184
184
  }
185
185
  if (s.length === 0) return 0;
186
- return parseInt(s, 8); // allow:raw-byte-literal — radix=8 for octal parse per ustar field format
186
+ return parseInt(s, 8); // radix=8 for octal parse per ustar field format
187
187
  }
188
188
 
189
189
  function _readString(buf, offset, width) {
@@ -203,7 +203,7 @@ function _computeChecksum(buf) {
203
203
  var sum = 0;
204
204
  for (var i = 0; i < BLOCK_SIZE; i += 1) {
205
205
  if (i >= H_CHKSUM && i < H_CHKSUM + W_CHKSUM) {
206
- sum += 0x20; // allow:raw-byte-literal — chksum field treated as 8 spaces per POSIX.1-1988
206
+ sum += 0x20; // chksum field treated as 8 spaces per POSIX.1-1988
207
207
  } else {
208
208
  sum += buf[i];
209
209
  }
@@ -214,16 +214,16 @@ function _computeChecksum(buf) {
214
214
  function _writeChecksum(buf) {
215
215
  // Write 6 octal digits + NUL + space into the chksum field.
216
216
  var sum = _computeChecksum(buf);
217
- var oct = sum.toString(8); // allow:raw-byte-literal — radix=8 for octal stringify per ustar chksum field format
218
- while (oct.length < 6) oct = "0" + oct; // allow:raw-byte-literal — chksum field is 6 octal digits per POSIX ustar
219
- if (oct.length > 6) { // allow:raw-byte-literal — chksum field is 6 octal digits per POSIX ustar
217
+ var oct = sum.toString(8); // radix=8 for octal stringify per ustar chksum field format
218
+ while (oct.length < 6) oct = "0" + oct; // chksum field is 6 octal digits per POSIX ustar
219
+ if (oct.length > 6) { // chksum field is 6 octal digits per POSIX ustar
220
220
  // Header is corrupt / oversized somewhere; surface a typed error.
221
221
  throw new TarError("archive-tar/chksum-overflow",
222
222
  "chksum " + sum + " (" + oct + ") exceeds 6 octal digits");
223
223
  }
224
- buf.write(oct, H_CHKSUM, 6, "ascii"); // allow:raw-byte-literal — chksum field is 6 octal digits per POSIX ustar
225
- buf.writeUInt8(0, H_CHKSUM + 6); // allow:raw-byte-literal — chksum field: 6 digits + NUL + space per POSIX ustar
226
- buf.writeUInt8(0x20, H_CHKSUM + 7); // allow:raw-byte-literal — chksum field: 6 digits + NUL + space per POSIX ustar
224
+ buf.write(oct, H_CHKSUM, 6, "ascii"); // chksum field is 6 octal digits per POSIX ustar
225
+ buf.writeUInt8(0, H_CHKSUM + 6); // chksum field: 6 digits + NUL + space per POSIX ustar
226
+ buf.writeUInt8(0x20, H_CHKSUM + 7); // chksum field: 6 digits + NUL + space per POSIX ustar
227
227
  }
228
228
 
229
229
  function _verifyChecksum(buf) {
@@ -349,11 +349,11 @@ function _buildUstarHeader(entry) {
349
349
  _writeOctal(buf, entry.mtime || 0, H_MTIME, W_MTIME);
350
350
  // chksum field — written as 8 spaces during computation, then
351
351
  // replaced with the computed value below.
352
- buf.fill(0x20, H_CHKSUM, H_CHKSUM + W_CHKSUM); // allow:raw-byte-literal — pre-fill chksum field with spaces per POSIX
352
+ buf.fill(0x20, H_CHKSUM, H_CHKSUM + W_CHKSUM); // pre-fill chksum field with spaces per POSIX
353
353
  buf.write(entry.typeflag || TF_REGULAR, H_TYPEFLAG, 1, "ascii");
354
354
  if (entry.linkname) _writeString(buf, entry.linkname, H_LINKNAME, LINKNAME_MAX);
355
- buf.write(USTAR_MAGIC, H_MAGIC, 6, "ascii"); // allow:raw-byte-literal — ustar magic is 6 bytes per POSIX
356
- buf.write(USTAR_VERSION, H_VERSION, 2, "ascii"); // allow:raw-byte-literal — ustar version is 2 bytes per POSIX
355
+ buf.write(USTAR_MAGIC, H_MAGIC, 6, "ascii"); // ustar magic is 6 bytes per POSIX
356
+ buf.write(USTAR_VERSION, H_VERSION, 2, "ascii"); // ustar version is 2 bytes per POSIX
357
357
  if (entry.uname) _writeString(buf, entry.uname, H_UNAME, W_UNAME);
358
358
  if (entry.gname) _writeString(buf, entry.gname, H_GNAME, W_GNAME);
359
359
  if (prefix) _writeString(buf, prefix, H_PREFIX, PREFIX_MAX);
@@ -444,7 +444,7 @@ function tarBuilder() {
444
444
  }
445
445
  var pieces = [];
446
446
  if (paxRecords.length > 0) {
447
- pieces.push(_buildPaxExtendedHeader(paxRecords, "PaxHeader/" + entry.name.slice(0, 80))); // allow:raw-byte-literal — pax header name fits in ustar 100-char field with 20-char prefix budget
447
+ pieces.push(_buildPaxExtendedHeader(paxRecords, "PaxHeader/" + entry.name.slice(0, 80))); // pax header name fits in ustar 100-char field with 20-char prefix budget
448
448
  }
449
449
  var hdr = _buildUstarHeader({
450
450
  name: entry.name,
@@ -471,7 +471,7 @@ function tarBuilder() {
471
471
  pieces.push(_entryBytes(entries[i]));
472
472
  }
473
473
  // Two zero blocks terminate the archive (POSIX requirement).
474
- pieces.push(Buffer.alloc(BLOCK_SIZE * 2)); // allow:raw-byte-literal — POSIX requires 2 trailing zero blocks
474
+ pieces.push(Buffer.alloc(BLOCK_SIZE * 2)); // POSIX requires 2 trailing zero blocks
475
475
  return Buffer.concat(pieces);
476
476
  }
477
477
 
@@ -483,7 +483,7 @@ function tarBuilder() {
483
483
  for (var i = 0; i < entries.length; i += 1) {
484
484
  await adapter.write(_entryBytes(entries[i]));
485
485
  }
486
- await adapter.write(Buffer.alloc(BLOCK_SIZE * 2)); // allow:raw-byte-literal — 2 trailing zero blocks
486
+ await adapter.write(Buffer.alloc(BLOCK_SIZE * 2)); // 2 trailing zero blocks
487
487
  if (typeof adapter.end === "function") await adapter.end();
488
488
  }
489
489
 
@@ -36,14 +36,14 @@ var agentTenant = lazyRequire(function () { return require("./agent-tenant"); })
36
36
  // recognises. Distinct from b.crypto.encrypt's base64 envelope so
37
37
  // archive-wrap output can carry an unambiguous "this is an archive
38
38
  // wrap envelope" magic before the operator-controlled payload.
39
- var ARCH_WRAP_MAGIC = "BAWRP"; // allow:raw-byte-literal — 5-byte ASCII archive-wrap recipient envelope magic
40
- var ARCH_WRAP_VERSION = 0x01; // allow:raw-byte-literal — recipient version byte (hybrid-KEM envelope)
39
+ var ARCH_WRAP_MAGIC = "BAWRP"; // 5-byte ASCII archive-wrap recipient envelope magic
40
+ var ARCH_WRAP_VERSION = 0x01; // recipient version byte (hybrid-KEM envelope)
41
41
  // Tenant strategy uses the same BAWRP magic with a distinct version
42
42
  // byte: the body is a symmetric XChaCha20-Poly1305 packed ciphertext
43
43
  // (b.crypto.encryptPacked) keyed by the tenant's vault-derived key,
44
44
  // not a hybrid-KEM envelope. unwrap dispatches on the version byte so
45
45
  // a tenant envelope is never fed to the KEM decrypt path.
46
- var ARCH_WRAP_VERSION_TENANT = 0x02; // allow:raw-byte-literal — tenant symmetric-seal version byte
46
+ var ARCH_WRAP_VERSION_TENANT = 0x02; // tenant symmetric-seal version byte
47
47
  // Purpose label for the per-tenant key derivation (domain-separates
48
48
  // the archive-wrap key from a tenant's seal / audit / session keys).
49
49
  var TENANT_KEY_PURPOSE = "archive-wrap";
@@ -53,8 +53,8 @@ var ARCH_WRAP_HEADER_BYTES = C.BYTES.bytes(6);
53
53
  // from backup-crypto encryptWithPassphrase). The salt-prefix shape
54
54
  // lets the framework rotate KDF parameters in future minors without
55
55
  // per-envelope version bumps (each envelope carries its own salt).
56
- var ARCH_PASSPHRASE_MAGIC = "BAWPP"; // allow:raw-byte-literal — 5-byte passphrase-wrap envelope magic
57
- var ARCH_PASSPHRASE_VERSION = 0x01; // allow:raw-byte-literal — passphrase version byte
56
+ var ARCH_PASSPHRASE_MAGIC = "BAWPP"; // 5-byte passphrase-wrap envelope magic
57
+ var ARCH_PASSPHRASE_VERSION = 0x01; // passphrase version byte
58
58
  var ARCH_PASSPHRASE_HEADER_BYTES = C.BYTES.bytes(7); // magic(5) + version(1) + saltLen(1)
59
59
 
60
60
  /**
@@ -418,7 +418,7 @@ async function wrapWithPassphrase(bytes, opts) {
418
418
  // so NaN / Infinity can't slip past the entropy gate.
419
419
  var minEntropy;
420
420
  if (opts.minEntropyBits === undefined || opts.minEntropyBits === null) {
421
- minEntropy = 80; // allow:raw-byte-literal — entropy-bits default, not byte count
421
+ minEntropy = 80; // entropy-bits default, not byte count
422
422
  } else if (Number.isFinite(opts.minEntropyBits) && opts.minEntropyBits >= 0) {
423
423
  minEntropy = Math.floor(opts.minEntropyBits);
424
424
  } else {
@@ -550,10 +550,10 @@ function _estimatePassphraseEntropyBits(passphrase) {
550
550
  else hasSpecial = true;
551
551
  }
552
552
  var alphabet = 0;
553
- if (hasLower) alphabet += 26; // allow:raw-byte-literal — alphabet-size term, not byte count
554
- if (hasUpper) alphabet += 26; // allow:raw-byte-literal — alphabet-size term, not byte count
555
- if (hasDigit) alphabet += 10; // allow:raw-byte-literal — alphabet-size term, not byte count
556
- if (hasSpecial) alphabet += 32; // allow:raw-byte-literal — alphabet-size term, not byte count
553
+ if (hasLower) alphabet += 26; // alphabet-size term, not byte count
554
+ if (hasUpper) alphabet += 26; // alphabet-size term, not byte count
555
+ if (hasDigit) alphabet += 10; // alphabet-size term, not byte count
556
+ if (hasSpecial) alphabet += 32; // alphabet-size term, not byte count
557
557
  if (alphabet === 0) return 0;
558
558
  return Math.floor(s.length * Math.log2(alphabet));
559
559
  }
@@ -27,7 +27,7 @@ var C = require("./constants");
27
27
  var ARGON2ID = "argon2id";
28
28
 
29
29
  // Argon2 v1.3 — the only version current implementations emit.
30
- var ARGON2_VERSION = 0x13; // allow:raw-byte-literal — argon2 algorithm version
30
+ var ARGON2_VERSION = 0x13; // argon2 algorithm version
31
31
 
32
32
  var DEFAULT_HASH_LENGTH = C.BYTES.bytes(32);
33
33
  var DEFAULT_SALT_LENGTH = C.BYTES.bytes(16);
package/lib/asn1-der.js CHANGED
@@ -31,10 +31,10 @@ var Asn1Error = defineClass("Asn1Error", { alwaysPermanent: true });
31
31
 
32
32
  // ASN.1 tag classes per ITU-T X.690 §8.1.2.
33
33
  var TAG_CLASS = Object.freeze({
34
- UNIVERSAL: 0, // allow:raw-byte-literal — ASN.1 tag class
35
- APPLICATION: 1, // allow:raw-byte-literal — ASN.1 tag class
36
- CONTEXT_SPECIFIC: 2, // allow:raw-byte-literal — ASN.1 tag class
37
- PRIVATE: 3, // allow:raw-byte-literal — ASN.1 tag class
34
+ UNIVERSAL: 0, // ASN.1 tag class
35
+ APPLICATION: 1, // ASN.1 tag class
36
+ CONTEXT_SPECIFIC: 2, // ASN.1 tag class
37
+ PRIVATE: 3, // ASN.1 tag class
38
38
  });
39
39
 
40
40
  // Universal tag numbers used by the framework.
@@ -70,9 +70,9 @@ function readNode(buf, offset) {
70
70
  }
71
71
 
72
72
  var b0 = buf[offset];
73
- var tagClass = (b0 >> 6) & 0x03; // allow:raw-byte-literal — tag-class extraction
74
- var constructed = (b0 & 0x20) !== 0; // allow:raw-byte-literal — constructed bit
75
- var tag = b0 & 0x1f; // allow:raw-byte-literal — short-form tag
73
+ var tagClass = (b0 >> 6) & 0x03; // tag-class extraction
74
+ var constructed = (b0 & 0x20) !== 0; // constructed bit
75
+ var tag = b0 & 0x1f; // short-form tag
76
76
 
77
77
  var headerLen = 1;
78
78
  if (tag === 0x1f) {
@@ -85,8 +85,8 @@ function readNode(buf, offset) {
85
85
  }
86
86
  var byte = buf[offset + headerLen];
87
87
  headerLen += 1;
88
- tag = (tag << 7) | (byte & 0x7f); // allow:raw-byte-literal — base-128 tag bits
89
- if ((byte & 0x80) === 0) break; // allow:raw-byte-literal — continuation bit
88
+ tag = (tag << 7) | (byte & 0x7f); // base-128 tag bits
89
+ if ((byte & 0x80) === 0) break; // continuation bit
90
90
  }
91
91
  }
92
92
 
@@ -107,7 +107,7 @@ function readNode(buf, offset) {
107
107
  throw new Asn1Error("asn1/indefinite-length",
108
108
  "indefinite-length form is not allowed in DER");
109
109
  }
110
- if (lenOctets > 4) { // allow:raw-byte-literal — DER length cap (>4 GiB)
110
+ if (lenOctets > 4) { // DER length cap (>4 GiB)
111
111
  throw new Asn1Error("asn1/bad-length",
112
112
  "length octets " + lenOctets + " exceeds 4 — refusing >4 GiB structure");
113
113
  }
@@ -116,7 +116,7 @@ function readNode(buf, offset) {
116
116
  }
117
117
  length = 0;
118
118
  for (var i = 0; i < lenOctets; i += 1) {
119
- length = (length * 256) + buf[offset + headerLen + i]; // allow:raw-byte-literal — base-256 length bytes
119
+ length = (length * 256) + buf[offset + headerLen + i]; // base-256 length bytes
120
120
  }
121
121
  headerLen += lenOctets;
122
122
  }
@@ -162,10 +162,10 @@ function readOid(node) {
162
162
  throw new Asn1Error("asn1/oid-empty", "OID value is empty");
163
163
  }
164
164
  // First two arcs are encoded as `40*X + Y`.
165
- var first = Math.floor(bytes[0] / 40); // allow:raw-byte-literal — OID encoding constant
166
- var second = bytes[0] % 40; // allow:raw-byte-literal — OID encoding constant
165
+ var first = Math.floor(bytes[0] / 40); // OID encoding constant
166
+ var second = bytes[0] % 40; // OID encoding constant
167
167
  // Per X.690, when first byte >= 80 the first arc is 2 and second is byte-80.
168
- if (first > 2) { first = 2; second = bytes[0] - 80; } // allow:raw-byte-literal — OID encoding constant
168
+ if (first > 2) { first = 2; second = bytes[0] - 80; } // OID encoding constant
169
169
  var arcs = [String(first), String(second)];
170
170
 
171
171
  var i = 1;
@@ -174,9 +174,9 @@ function readOid(node) {
174
174
  var j = i;
175
175
  while (j < bytes.length) {
176
176
  var b = bytes[j];
177
- arc = (arc * 128) + (b & 0x7f); // allow:raw-byte-literal — base-128 OID arc
177
+ arc = (arc * 128) + (b & 0x7f); // base-128 OID arc
178
178
  j += 1;
179
- if ((b & 0x80) === 0) break; // allow:raw-byte-literal — continuation bit
179
+ if ((b & 0x80) === 0) break; // continuation bit
180
180
  }
181
181
  if (j === i) {
182
182
  throw new Asn1Error("asn1/oid-malformed", "OID arc never terminated");
@@ -207,15 +207,15 @@ function readUnsignedInt(node) {
207
207
  if (bytes.length === 0) {
208
208
  throw new Asn1Error("asn1/int-empty", "INTEGER value is empty");
209
209
  }
210
- if (bytes.length > 8) { // allow:raw-byte-literal — JS safe-int byte cap
210
+ if (bytes.length > 8) { // JS safe-int byte cap
211
211
  // Caller wanted an unsigned int — for big serials they want the raw
212
212
  // bytes instead. Surface as hex string so caller decides.
213
213
  return { hex: bytes.toString("hex") };
214
214
  }
215
215
  var n = 0;
216
- var start = (bytes[0] === 0 && bytes.length > 1) ? 1 : 0; // allow:raw-byte-literal — DER zero-pad
216
+ var start = (bytes[0] === 0 && bytes.length > 1) ? 1 : 0; // DER zero-pad
217
217
  for (var k = start; k < bytes.length; k += 1) {
218
- n = (n * 256) + bytes[k]; // allow:raw-byte-literal — base-256 byte
218
+ n = (n * 256) + bytes[k]; // base-256 byte
219
219
  }
220
220
  return n;
221
221
  }
@@ -259,13 +259,13 @@ function unwrapExplicit(node, expectedTag) {
259
259
  // All length fields use the standard X.690 short / long-form encoding.
260
260
 
261
261
  function _encodeLength(n) {
262
- if (n < 128) return Buffer.from([n]); // allow:raw-byte-literal — X.690 short-form length boundary
262
+ if (n < 128) return Buffer.from([n]); // X.690 short-form length boundary
263
263
  // Long-form: first byte is 0x80 | numLengthOctets, then the length
264
264
  // big-endian.
265
265
  var bytes = [];
266
266
  while (n > 0) {
267
- bytes.unshift(n & 0xff); // allow:raw-byte-literal — base-256 length encoding mask
268
- n = n >>> 8; // allow:raw-byte-literal — base-256 length encoding shift
267
+ bytes.unshift(n & 0xff); // base-256 length encoding mask
268
+ n = n >>> 8; // base-256 length encoding shift
269
269
  }
270
270
  return Buffer.concat([Buffer.from([0x80 | bytes.length]), Buffer.from(bytes)]);
271
271
  }
@@ -276,7 +276,7 @@ function writeNode(tagByte, value) {
276
276
 
277
277
  function writeSequence(children) {
278
278
  // children: Array<Buffer> of already-encoded child nodes.
279
- return writeNode(TAG.SEQUENCE | 0x20, Buffer.concat(children)); // allow:raw-byte-literal — DER constructed bit
279
+ return writeNode(TAG.SEQUENCE | 0x20, Buffer.concat(children)); // DER constructed bit
280
280
  }
281
281
 
282
282
  function writeOctetString(value) {
@@ -292,7 +292,7 @@ function writeInteger(buf) {
292
292
  // and the value is positive (cert serials always are here), prepend
293
293
  // 0x00 to disambiguate from a negative two's complement.
294
294
  if (buf.length === 0) return writeNode(TAG.INTEGER, Buffer.from([0]));
295
- if (buf[0] & 0x80) { // allow:raw-byte-literal — sign-bit disambiguation
295
+ if (buf[0] & 0x80) { // sign-bit disambiguation
296
296
  return writeNode(TAG.INTEGER, Buffer.concat([Buffer.from([0]), buf]));
297
297
  }
298
298
  return writeNode(TAG.INTEGER, buf);
@@ -304,16 +304,16 @@ function writeOid(dotted) {
304
304
  if (parts.length < 2) {
305
305
  throw new Asn1Error("asn1/oid-too-short", "OID needs at least 2 arcs");
306
306
  }
307
- var bytes = [parts[0] * 40 + parts[1]]; // allow:raw-byte-literal — OID first-arc encoding
307
+ var bytes = [parts[0] * 40 + parts[1]]; // OID first-arc encoding
308
308
  for (var i = 2; i < parts.length; i += 1) {
309
309
  var arc = parts[i];
310
310
  if (arc === 0) { bytes.push(0); continue; }
311
311
  var stack = [];
312
312
  while (arc > 0) {
313
- stack.unshift(arc & 0x7f); // allow:raw-byte-literal — base-128 mask
314
- arc = arc >>> 7; // allow:raw-byte-literal — base-128 shift
313
+ stack.unshift(arc & 0x7f); // base-128 mask
314
+ arc = arc >>> 7; // base-128 shift
315
315
  }
316
- for (var j = 0; j < stack.length - 1; j += 1) stack[j] |= 0x80; // allow:raw-byte-literal — continuation bit
316
+ for (var j = 0; j < stack.length - 1; j += 1) stack[j] |= 0x80; // continuation bit
317
317
  for (var k = 0; k < stack.length; k += 1) bytes.push(stack[k]);
318
318
  }
319
319
  return writeNode(TAG.OID, Buffer.from(bytes));
@@ -321,7 +321,14 @@ function writeOid(dotted) {
321
321
 
322
322
  function writeContextExplicit(tagNumber, child) {
323
323
  // [N] EXPLICIT — context-specific class (0xA0 | tag) + constructed.
324
- var tagByte = 0xa0 | (tagNumber & 0x1f); // allow:raw-byte-literal context-specific constructed mask
324
+ // Tag numbers > 30 need the multi-byte high-tag-number form, which this
325
+ // single-byte encoder does not emit — refuse rather than silently
326
+ // truncate via `& 0x1f`.
327
+ if (tagNumber < 0 || tagNumber > 30) {
328
+ throw new RangeError("asn1: context tag number " + tagNumber +
329
+ " out of range (0..30); high-tag-number form is not supported");
330
+ }
331
+ var tagByte = 0xa0 | (tagNumber & 0x1f); // context-specific constructed mask
325
332
  return writeNode(tagByte, child);
326
333
  }
327
334
 
@@ -331,8 +338,12 @@ function writeContextImplicit(tagNumber, value, opts) {
331
338
  // wrapping a structured value (e.g. IMPLICIT [0] OCTET STRING vs
332
339
  // IMPLICIT [0] SEQUENCE OF). Value is the raw inner bytes (already
333
340
  // encoded for constructed cases).
334
- var tagByte = 0x80 | (tagNumber & 0x1f); // allow:raw-byte-literal — context-specific primitive mask
335
- if (opts && opts.constructed) tagByte |= 0x20; // allow:raw-byte-literal — constructed bit
341
+ if (tagNumber < 0 || tagNumber > 30) {
342
+ throw new RangeError("asn1: context tag number " + tagNumber +
343
+ " out of range (0..30); high-tag-number form is not supported");
344
+ }
345
+ var tagByte = 0x80 | (tagNumber & 0x1f); // context-specific primitive mask
346
+ if (opts && opts.constructed) tagByte |= 0x20; // constructed bit
336
347
  return writeNode(tagByte, value);
337
348
  }
338
349
 
@@ -340,7 +351,7 @@ function writeBitString(value, unusedBits) {
340
351
  // BIT STRING — first content byte is `unusedBits` (0..7), then the
341
352
  // bit string bytes. `unusedBits` is 0 for byte-aligned content
342
353
  // (RSA / ECDSA signatures, SubjectPublicKeyInfo bit strings).
343
- var unused = typeof unusedBits === "number" ? (unusedBits & 0x07) : 0; // allow:raw-byte-literal — 3-bit unused-bits count
354
+ var unused = typeof unusedBits === "number" ? (unusedBits & 0x07) : 0; // 3-bit unused-bits count
344
355
  return writeNode(TAG.BIT_STRING, Buffer.concat([Buffer.from([unused]), value]));
345
356
  }
346
357
 
@@ -348,7 +359,7 @@ function writeSet(children) {
348
359
  // children: Array<Buffer> of already-encoded child nodes.
349
360
  // DER requires SET-OF children to be sorted by their encoded bytes.
350
361
  var sorted = children.slice().sort(Buffer.compare);
351
- return writeNode(TAG.SET | 0x20, Buffer.concat(sorted)); // allow:raw-byte-literal — DER constructed bit
362
+ return writeNode(TAG.SET | 0x20, Buffer.concat(sorted)); // DER constructed bit
352
363
  }
353
364
 
354
365
  function writeUtf8String(s) {
@@ -383,7 +394,7 @@ function writeIa5String(s) {
383
394
  }
384
395
 
385
396
  function writeBoolean(b) {
386
- return writeNode(TAG.BOOLEAN, Buffer.from([b ? 0xff : 0x00])); // allow:raw-byte-literal — DER true=0xff, false=0x00
397
+ return writeNode(TAG.BOOLEAN, Buffer.from([b ? 0xff : 0x00])); // DER true=0xff, false=0x00
387
398
  }
388
399
 
389
400
  // Find a child node of a SEQUENCE / SET by predicate. Returns null if
@@ -328,7 +328,7 @@ function conflictPath(originalPath, opts) {
328
328
  }
329
329
  opts = opts || {};
330
330
  var tag = typeof opts.tag === "string" && opts.tag.length > 0 ? opts.tag : "conflict";
331
- if (typeof tag !== "string" || tag.length === 0 || tag.length > 64) { // allow:raw-byte-literal — tag length cap, not bytes
331
+ if (typeof tag !== "string" || tag.length === 0 || tag.length > 64) { // tag length cap, not bytes
332
332
  throw new TypeError("b.atomicFile.conflictPath: tag must be a 1-64 char string");
333
333
  }
334
334
  if (!IDENT_RE.test(tag)) { // allow:regex-no-length-cap — length-bounded immediately above
@@ -338,7 +338,7 @@ function conflictPath(originalPath, opts) {
338
338
  var suffix = "";
339
339
  if (opts.suffix !== undefined) {
340
340
  if (typeof opts.suffix !== "string" || opts.suffix.length === 0 ||
341
- opts.suffix.length > 64) { // allow:raw-byte-literal — suffix length cap, not bytes
341
+ opts.suffix.length > 64) { // suffix length cap, not bytes
342
342
  throw new TypeError("b.atomicFile.conflictPath: suffix must be a 1-64 char string");
343
343
  }
344
344
  if (!IDENT_RE.test(opts.suffix)) { // allow:regex-no-length-cap — length-bounded immediately above
@@ -181,7 +181,7 @@ function create(opts) {
181
181
 
182
182
  // lookbackHours — default 24 per PCI DSS 4.0 daily cadence. Caller can
183
183
  // pass weekly / monthly via larger numbers.
184
- var lookbackHours = 24; // allow:raw-byte-literal — lookback in HOURS, not bytes
184
+ var lookbackHours = 24; // lookback in HOURS, not bytes
185
185
  if (opts.lookbackHours !== undefined) {
186
186
  if (typeof opts.lookbackHours !== "number" || !isFinite(opts.lookbackHours) ||
187
187
  opts.lookbackHours <= 0) {
@@ -206,8 +206,8 @@ function create(opts) {
206
206
  }
207
207
 
208
208
  var cron = opts.cron || "0 6 * * *"; // 06:00 UTC daily
209
- var queryLimit = opts.queryLimit || 10000; // allow:raw-byte-literal — operator-tunable result cap, count not bytes
210
- var historyLimit = opts.historyLimit || 30; // allow:raw-byte-literal — bounded history buffer (count, not bytes)
209
+ var queryLimit = opts.queryLimit || 10000; // operator-tunable result cap, count not bytes
210
+ var historyLimit = opts.historyLimit || 30; // bounded history buffer (count, not bytes)
211
211
  var classify = typeof opts.classify === "function" ? opts.classify : _defaultClassify;
212
212
  var now = typeof opts.now === "function" ? opts.now : Date.now;
213
213
  var auditMod = opts.audit;
package/lib/audit-sign.js CHANGED
@@ -668,11 +668,11 @@ async function rotateSigningKey(rotOpts) {
668
668
  // small (a few KB) and signed audit checkpoints can be decades old.
669
669
  var iso = new Date().toISOString().replace(/[:.]/g, "-");
670
670
  if (currentMode === "wrapped" && paths && paths.sealed) {
671
- var historyPath = paths.sealed + ".history-" + iso + "-" + prevFingerprint.slice(0, 16) /* allow:raw-byte-literal — fingerprint hex truncation count */;
671
+ var historyPath = paths.sealed + ".history-" + iso + "-" + prevFingerprint.slice(0, 16) /* fingerprint hex truncation count */;
672
672
  try { await atomicFile.copy(paths.sealed, historyPath); }
673
673
  catch (_e) { /* history copy is best-effort; the in-memory rotation still proceeds */ }
674
674
  } else if (currentMode === "plaintext" && paths && paths.plaintext) {
675
- var historyPathP = paths.plaintext + ".history-" + iso + "-" + prevFingerprint.slice(0, 16) /* allow:raw-byte-literal — fingerprint hex truncation count */;
675
+ var historyPathP = paths.plaintext + ".history-" + iso + "-" + prevFingerprint.slice(0, 16) /* fingerprint hex truncation count */;
676
676
  try { await atomicFile.copy(paths.plaintext, historyPathP); }
677
677
  catch (_e) { /* history copy is best-effort */ }
678
678
  }
@@ -707,7 +707,7 @@ async function rotateSigningKey(rotOpts) {
707
707
  algorithm: newAlg,
708
708
  fingerprint: newFingerprint,
709
709
  };
710
- log("audit-signing keypair rotated (alg=" + newAlg + ", fp=" + newFingerprint.slice(0, 16) + "...)"); /* allow:raw-byte-literal — fingerprint hex truncation count */
710
+ log("audit-signing keypair rotated (alg=" + newAlg + ", fp=" + newFingerprint.slice(0, 16) + "...)"); /* fingerprint hex truncation count */
711
711
 
712
712
  return {
713
713
  previousFingerprint: prevFingerprint,
@@ -717,9 +717,9 @@ async function rotateSigningKey(rotOpts) {
717
717
  algorithm: newAlg,
718
718
  rotatedAt: new Date().toISOString(),
719
719
  historyPath: (currentMode === "wrapped" && paths && paths.sealed)
720
- ? paths.sealed + ".history-" + iso + "-" + prevFingerprint.slice(0, 16) /* allow:raw-byte-literal — fingerprint hex truncation count */
720
+ ? paths.sealed + ".history-" + iso + "-" + prevFingerprint.slice(0, 16) /* fingerprint hex truncation count */
721
721
  : (currentMode === "plaintext" && paths && paths.plaintext)
722
- ? paths.plaintext + ".history-" + iso + "-" + prevFingerprint.slice(0, 16) /* allow:raw-byte-literal — fingerprint hex truncation count */
722
+ ? paths.plaintext + ".history-" + iso + "-" + prevFingerprint.slice(0, 16) /* fingerprint hex truncation count */
723
723
  : null,
724
724
  };
725
725
  }
@@ -1083,7 +1083,7 @@ function _toCadfEvent(row) {
1083
1083
  name: "blamejs.audit",
1084
1084
  },
1085
1085
  reason: row.reason ? {
1086
- reasonCode: String(row.reason).slice(0, 256), // allow:raw-byte-literal — reason cap
1086
+ reasonCode: String(row.reason).slice(0, 256), // reason cap
1087
1087
  policyType: "blamejs.audit-chain",
1088
1088
  } : undefined,
1089
1089
  attachments: meta ? [{
package/lib/audit.js CHANGED
@@ -304,11 +304,11 @@ var FRAMEWORK_NAMESPACES = [
304
304
  "session", // b.sessionDeviceBinding (session.device.bound / drift / refused)
305
305
  "sandbox", // b.sandbox (sandbox.run / sandbox.run.refused — operator-supplied transform isolation)
306
306
  "safeurl", // b.safeUrl.parse (safeurl.idn_homograph.refused — UTS #39 mixed-script host-label refusal)
307
- "http", // b.middleware.bodyParser (http.chunked.malformed.refused — RFC 9112 §7.1 chunked-decode failure with Connection: close) // allow:raw-byte-literal — RFC number in prose
307
+ "http", // b.middleware.bodyParser (http.chunked.malformed.refused — RFC 9112 §7.1 chunked-decode failure with Connection: close) // RFC number in prose
308
308
  "cryptofield", // b.cryptoField.eraseRow (cryptofield.vacuum.skipped — F-RTBF-2 vacuum-after-erase signal when DB not initialized at erase time)
309
309
  "acme", // b.acme (acme.account.registered / order.* / cert.issued / cert.renewed / cert.renew.skipped — RFC 8555 + RFC 9773 ARI workflow)
310
310
  "cert", // b.cert (cert.account.generated / cert.issued / cert.renewed / cert.renew-failed / cert.challenge-cleanup — turnkey cert-manager lifecycle)
311
- "tls", // b.router 0-RTT posture (tls.0rtt.refused / tls.0rtt.replayed) — RFC 8446 §8 anti-replay surface // allow:raw-byte-literal — RFC number in prose
311
+ "tls", // b.router 0-RTT posture (tls.0rtt.refused / tls.0rtt.replayed) — RFC 8446 §8 anti-replay surface // RFC number in prose
312
312
  "workerpool", // b.workerPool (workerpool.created / terminated / task.completed / task.failed / task.timeout / spawn.failed — generic worker_threads pool)
313
313
  "jwt", // b.auth.jwt-external (jwt.jwe.refused — RFC 7516 5-segment JWE refusal)
314
314
  "dr", // b.drRunbook (dr.runbook.emitted)