@blamejs/core 0.14.1 → 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 (275) hide show
  1. package/CHANGELOG.md +2 -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 +34 -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/jwt-external.js +5 -5
  37. package/lib/auth/oauth.js +2 -2
  38. package/lib/auth/oid4vci.js +9 -9
  39. package/lib/auth/oid4vp.js +2 -2
  40. package/lib/auth/openid-federation.js +2 -2
  41. package/lib/auth/passkey.js +3 -3
  42. package/lib/auth/saml.js +23 -23
  43. package/lib/auth/sd-jwt-vc-disclosure.js +1 -1
  44. package/lib/auth/sd-jwt-vc.js +4 -4
  45. package/lib/auth/status-list.js +10 -10
  46. package/lib/auth/step-up.js +1 -1
  47. package/lib/auth-bot-challenge.js +1 -1
  48. package/lib/backup/index.js +7 -7
  49. package/lib/base32.js +8 -8
  50. package/lib/budr.js +2 -2
  51. package/lib/cache-status.js +2 -2
  52. package/lib/calendar.js +23 -23
  53. package/lib/cbor.js +12 -12
  54. package/lib/cdn-cache-control.js +1 -1
  55. package/lib/cert.js +5 -5
  56. package/lib/cloud-events.js +5 -5
  57. package/lib/cms-codec.js +21 -21
  58. package/lib/codepoint-class.js +12 -12
  59. package/lib/compliance-sanctions-fuzzy.js +4 -4
  60. package/lib/compliance-sanctions.js +4 -4
  61. package/lib/compliance.js +29 -29
  62. package/lib/content-credentials.js +36 -36
  63. package/lib/cookies.js +1 -1
  64. package/lib/cose.js +13 -13
  65. package/lib/cra-report.js +1 -1
  66. package/lib/crdt.js +1 -1
  67. package/lib/crypto-field.js +2 -2
  68. package/lib/crypto-xwing.js +7 -7
  69. package/lib/crypto.js +6 -6
  70. package/lib/csp.js +2 -2
  71. package/lib/cwt.js +4 -4
  72. package/lib/dark-patterns.js +2 -2
  73. package/lib/data-act.js +2 -2
  74. package/lib/db-file-lifecycle.js +4 -4
  75. package/lib/db-query.js +1 -1
  76. package/lib/db.js +6 -6
  77. package/lib/dbsc.js +13 -13
  78. package/lib/did.js +17 -17
  79. package/lib/dora.js +4 -4
  80. package/lib/dsr.js +1 -1
  81. package/lib/early-hints.js +2 -2
  82. package/lib/eat.js +4 -4
  83. package/lib/external-db-migrate.js +1 -1
  84. package/lib/external-db.js +1 -1
  85. package/lib/flag-cache.js +1 -1
  86. package/lib/flag-evaluation-context.js +2 -2
  87. package/lib/graphql-federation.js +4 -4
  88. package/lib/guard-agent-registry.js +5 -5
  89. package/lib/guard-archive.js +24 -24
  90. package/lib/guard-cidr.js +33 -33
  91. package/lib/guard-csv.js +1 -1
  92. package/lib/guard-domain.js +10 -10
  93. package/lib/guard-dsn.js +4 -4
  94. package/lib/guard-email.js +19 -19
  95. package/lib/guard-event-bus-payload.js +4 -4
  96. package/lib/guard-event-bus-topic.js +6 -6
  97. package/lib/guard-filename.js +7 -7
  98. package/lib/guard-graphql.js +9 -9
  99. package/lib/guard-html-wcag-tagwalk.js +1 -1
  100. package/lib/guard-html-wcag.js +4 -4
  101. package/lib/guard-html.js +7 -7
  102. package/lib/guard-idempotency-key.js +6 -6
  103. package/lib/guard-image.js +4 -4
  104. package/lib/guard-imap-command.js +17 -17
  105. package/lib/guard-jmap.js +20 -20
  106. package/lib/guard-json.js +12 -12
  107. package/lib/guard-jsonpath.js +3 -3
  108. package/lib/guard-jwt.js +4 -4
  109. package/lib/guard-list-id.js +7 -7
  110. package/lib/guard-list-unsubscribe.js +8 -8
  111. package/lib/guard-mail-compose.js +4 -4
  112. package/lib/guard-mail-move.js +5 -5
  113. package/lib/guard-mail-query.js +3 -3
  114. package/lib/guard-mail-reply.js +3 -3
  115. package/lib/guard-mail-sieve.js +6 -6
  116. package/lib/guard-managesieve-command.js +25 -25
  117. package/lib/guard-markdown.js +31 -31
  118. package/lib/guard-message-id.js +5 -5
  119. package/lib/guard-mime.js +1 -1
  120. package/lib/guard-oauth.js +3 -3
  121. package/lib/guard-pdf.js +6 -6
  122. package/lib/guard-pop3-command.js +11 -11
  123. package/lib/guard-posture-chain.js +5 -5
  124. package/lib/guard-regex.js +10 -10
  125. package/lib/guard-saga-config.js +5 -5
  126. package/lib/guard-smtp-command.js +6 -6
  127. package/lib/guard-snapshot-envelope.js +3 -3
  128. package/lib/guard-stream-args.js +4 -4
  129. package/lib/guard-svg.js +11 -11
  130. package/lib/guard-tenant-id.js +5 -5
  131. package/lib/guard-time.js +15 -15
  132. package/lib/guard-trace-context.js +4 -4
  133. package/lib/guard-uuid.js +11 -11
  134. package/lib/guard-xml.js +12 -12
  135. package/lib/guard-yaml.js +16 -16
  136. package/lib/honeytoken.js +5 -5
  137. package/lib/http-client.js +1 -1
  138. package/lib/http-message-signature.js +2 -2
  139. package/lib/iab-mspa.js +3 -3
  140. package/lib/iab-tcf.js +70 -70
  141. package/lib/inbox.js +4 -4
  142. package/lib/ip-utils.js +15 -15
  143. package/lib/jose-jwe-experimental.js +2 -2
  144. package/lib/json-path.js +3 -3
  145. package/lib/json-schema.js +1 -1
  146. package/lib/jsonapi.js +3 -3
  147. package/lib/jtd.js +2 -2
  148. package/lib/link-header.js +1 -1
  149. package/lib/local-db-thin.js +1 -1
  150. package/lib/log.js +1 -1
  151. package/lib/lro.js +4 -4
  152. package/lib/mail-agent.js +1 -1
  153. package/lib/mail-arc-sign.js +6 -6
  154. package/lib/mail-auth.js +43 -43
  155. package/lib/mail-bimi.js +3 -3
  156. package/lib/mail-crypto-pgp.js +31 -31
  157. package/lib/mail-crypto-smime.js +5 -5
  158. package/lib/mail-dav.js +1 -1
  159. package/lib/mail-deploy.js +39 -39
  160. package/lib/mail-dkim.js +11 -11
  161. package/lib/mail-greylist.js +12 -12
  162. package/lib/mail-helo.js +1 -1
  163. package/lib/mail-journal.js +8 -8
  164. package/lib/mail-rbl.js +7 -7
  165. package/lib/mail-scan.js +7 -7
  166. package/lib/mail-send-deliver.js +2 -2
  167. package/lib/mail-server-imap.js +12 -12
  168. package/lib/mail-server-jmap.js +16 -16
  169. package/lib/mail-server-managesieve.js +4 -4
  170. package/lib/mail-server-mx.js +17 -17
  171. package/lib/mail-server-pop3.js +4 -4
  172. package/lib/mail-server-rate-limit.js +2 -2
  173. package/lib/mail-server-submission.js +21 -21
  174. package/lib/mail-sieve.js +2 -2
  175. package/lib/mail-spam-score.js +5 -5
  176. package/lib/mail-srs.js +12 -12
  177. package/lib/mail-store-fts.js +2 -2
  178. package/lib/mail-store.js +8 -8
  179. package/lib/mail-unsubscribe.js +4 -4
  180. package/lib/mail.js +4 -4
  181. package/lib/mcp-tool-registry.js +4 -4
  182. package/lib/mcp.js +8 -8
  183. package/lib/mdoc.js +2 -2
  184. package/lib/metrics.js +8 -8
  185. package/lib/middleware/age-gate.js +1 -1
  186. package/lib/middleware/api-encrypt.js +7 -7
  187. package/lib/middleware/assetlinks.js +2 -2
  188. package/lib/middleware/asyncapi-serve.js +2 -2
  189. package/lib/middleware/bearer-auth.js +5 -5
  190. package/lib/middleware/body-parser.js +5 -5
  191. package/lib/middleware/compose-pipeline.js +15 -15
  192. package/lib/middleware/csp-report.js +4 -4
  193. package/lib/middleware/daily-byte-quota.js +1 -1
  194. package/lib/middleware/dpop.js +1 -1
  195. package/lib/middleware/headers.js +2 -2
  196. package/lib/middleware/host-allowlist.js +1 -1
  197. package/lib/middleware/idempotency-key.js +12 -12
  198. package/lib/middleware/nel.js +1 -1
  199. package/lib/middleware/openapi-serve.js +2 -2
  200. package/lib/middleware/protected-resource-metadata.js +2 -2
  201. package/lib/middleware/require-aal.js +1 -1
  202. package/lib/middleware/require-bound-key.js +2 -2
  203. package/lib/middleware/require-content-type.js +1 -1
  204. package/lib/middleware/require-methods.js +1 -1
  205. package/lib/middleware/require-step-up.js +2 -2
  206. package/lib/middleware/scim-server.js +1 -1
  207. package/lib/middleware/security-txt.js +3 -3
  208. package/lib/middleware/tus-upload.js +12 -12
  209. package/lib/middleware/web-app-manifest.js +2 -2
  210. package/lib/network-byte-quota.js +1 -1
  211. package/lib/network-dns-resolver.js +23 -23
  212. package/lib/network-dns.js +29 -29
  213. package/lib/network-dnssec.js +33 -33
  214. package/lib/network-smtp-policy.js +10 -10
  215. package/lib/network-tls.js +87 -87
  216. package/lib/network-tsig.js +33 -33
  217. package/lib/nis2-report.js +1 -1
  218. package/lib/ntp-check.js +3 -3
  219. package/lib/observability-otlp-exporter.js +17 -17
  220. package/lib/observability-tracer.js +6 -6
  221. package/lib/observability.js +8 -8
  222. package/lib/openapi-yaml.js +1 -1
  223. package/lib/openapi.js +1 -1
  224. package/lib/outbox.js +6 -6
  225. package/lib/pqc-agent.js +4 -4
  226. package/lib/pqc-software.js +1 -1
  227. package/lib/privacy-pass.js +5 -5
  228. package/lib/problem-details.js +5 -5
  229. package/lib/promise-pool.js +1 -1
  230. package/lib/protobuf-encoder.js +1 -1
  231. package/lib/redact.js +2 -2
  232. package/lib/request-helpers.js +1 -1
  233. package/lib/router.js +10 -10
  234. package/lib/safe-async.js +2 -2
  235. package/lib/safe-dns.js +71 -71
  236. package/lib/safe-ical.js +19 -19
  237. package/lib/safe-icap.js +24 -24
  238. package/lib/safe-jsonpath.js +2 -2
  239. package/lib/safe-mime.js +10 -10
  240. package/lib/safe-mount-info.js +3 -3
  241. package/lib/safe-redirect.js +1 -1
  242. package/lib/safe-sieve.js +23 -23
  243. package/lib/safe-smtp.js +1 -1
  244. package/lib/safe-vcard.js +14 -14
  245. package/lib/sandbox.js +5 -5
  246. package/lib/sec-cyber.js +1 -1
  247. package/lib/self-update-standalone-verifier.js +3 -3
  248. package/lib/self-update.js +3 -3
  249. package/lib/server-timing.js +3 -3
  250. package/lib/session-device-binding.js +7 -7
  251. package/lib/session.js +8 -8
  252. package/lib/standard-webhooks.js +4 -4
  253. package/lib/storage.js +2 -2
  254. package/lib/stream-throttle.js +1 -1
  255. package/lib/structured-fields.js +15 -15
  256. package/lib/subject.js +1 -1
  257. package/lib/tcpa-10dlc.js +1 -1
  258. package/lib/tenant-quota.js +3 -3
  259. package/lib/test-harness.js +1 -1
  260. package/lib/tracing.js +1 -1
  261. package/lib/tsa.js +5 -5
  262. package/lib/uri-template.js +5 -5
  263. package/lib/vault/index.js +2 -2
  264. package/lib/vault/seal-pem-file.js +4 -4
  265. package/lib/vc.js +2 -2
  266. package/lib/vendor-data.js +1 -1
  267. package/lib/watcher.js +4 -4
  268. package/lib/web-push-vapid.js +21 -21
  269. package/lib/webhook.js +2 -2
  270. package/lib/websocket.js +3 -3
  271. package/lib/worker-pool.js +3 -3
  272. package/lib/ws-client.js +24 -24
  273. package/lib/xml-c14n.js +2 -2
  274. package/package.json +1 -1
  275. package/sbom.cdx.json +6 -6
package/lib/guard-cidr.js CHANGED
@@ -56,30 +56,30 @@ void observability;
56
56
 
57
57
  var _err = GuardCidrError.factory;
58
58
 
59
- var IPV4_OCTET_MAX = 255; // allow:raw-byte-literal — RFC 791 octet ceiling
60
- var IPV4_MASK_MAX = 32; // allow:raw-byte-literal — IPv4 prefix ceiling
61
- var IPV6_MASK_MAX = 128; // allow:raw-byte-literal — IPv6 prefix ceiling
62
- var IPV4_OCTETS = 4; // allow:raw-byte-literal — IPv4 dotted-quad count
63
- var IPV6_GROUPS = 8; // allow:raw-byte-literal — IPv6 16-bit group count
59
+ var IPV4_OCTET_MAX = 255; // RFC 791 octet ceiling
60
+ var IPV4_MASK_MAX = 32; // IPv4 prefix ceiling
61
+ var IPV6_MASK_MAX = 128; // IPv6 prefix ceiling
62
+ var IPV4_OCTETS = 4; // IPv4 dotted-quad count
63
+ var IPV6_GROUPS = 8; // IPv6 16-bit group count
64
64
 
65
65
  // ---- IPv4 reserved ranges (CIDR network, /mask) ----
66
66
  //
67
67
  // Each entry: [networkAsUint32, maskBits, label].
68
- function _ipv4ToUint32(o) { return ((o[0] << 24) >>> 0) + (o[1] << 16) + (o[2] << 8) + o[3]; } // allow:raw-byte-literal — IPv4 octet shifts
68
+ function _ipv4ToUint32(o) { return ((o[0] << 24) >>> 0) + (o[1] << 16) + (o[2] << 8) + o[3]; } // IPv4 octet shifts
69
69
  var IPV4_RESERVED = Object.freeze([
70
- { net: _ipv4ToUint32([10, 0, 0, 0]), prefix: 8, label: "rfc1918-private-10" }, // allow:raw-byte-literal — IPv4 octets
71
- { net: _ipv4ToUint32([172, 16, 0, 0]), prefix: 12, label: "rfc1918-private-172.16" }, // allow:raw-byte-literal — IPv4 octets
72
- { net: _ipv4ToUint32([192, 168, 0, 0]), prefix: 16, label: "rfc1918-private-192.168" }, // allow:raw-byte-literal — IPv4 octets
73
- { net: _ipv4ToUint32([127, 0, 0, 0]), prefix: 8, label: "loopback" }, // allow:raw-byte-literal — IPv4 octets
74
- { net: _ipv4ToUint32([169, 254, 0, 0]), prefix: 16, label: "link-local" }, // allow:raw-byte-literal — IPv4 octets
75
- { net: _ipv4ToUint32([224, 0, 0, 0]), prefix: 4, label: "multicast" }, // allow:raw-byte-literal — IPv4 octets
70
+ { net: _ipv4ToUint32([10, 0, 0, 0]), prefix: 8, label: "rfc1918-private-10" }, // IPv4 octets
71
+ { net: _ipv4ToUint32([172, 16, 0, 0]), prefix: 12, label: "rfc1918-private-172.16" }, // IPv4 octets
72
+ { net: _ipv4ToUint32([192, 168, 0, 0]), prefix: 16, label: "rfc1918-private-192.168" }, // IPv4 octets
73
+ { net: _ipv4ToUint32([127, 0, 0, 0]), prefix: 8, label: "loopback" }, // IPv4 octets
74
+ { net: _ipv4ToUint32([169, 254, 0, 0]), prefix: 16, label: "link-local" }, // IPv4 octets
75
+ { net: _ipv4ToUint32([224, 0, 0, 0]), prefix: 4, label: "multicast" }, // IPv4 octets
76
76
  { net: _ipv4ToUint32([240, 0, 0, 0]), prefix: 4, label: "reserved-class-e" }, // allow:raw-byte-literal — IPv4 octets allow:raw-time-literal — 240 is an IPv4 octet not seconds
77
- { net: _ipv4ToUint32([192, 0, 2, 0]), prefix: 24, label: "documentation-test-net-1" }, // allow:raw-byte-literal — IPv4 octets
78
- { net: _ipv4ToUint32([198, 51, 100, 0]), prefix: 24, label: "documentation-test-net-2" }, // allow:raw-byte-literal — IPv4 octets
79
- { net: _ipv4ToUint32([203, 0, 113, 0]), prefix: 24, label: "documentation-test-net-3" }, // allow:raw-byte-literal — IPv4 octets
80
- { net: _ipv4ToUint32([198, 18, 0, 0]), prefix: 15, label: "benchmarking" }, // allow:raw-byte-literal — IPv4 octets
81
- { net: _ipv4ToUint32([100, 64, 0, 0]), prefix: 10, label: "cgnat" }, // allow:raw-byte-literal — IPv4 octets
82
- { net: _ipv4ToUint32([0, 0, 0, 0]), prefix: 8, label: "this-network" }, // allow:raw-byte-literal — IPv4 octets
77
+ { net: _ipv4ToUint32([192, 0, 2, 0]), prefix: 24, label: "documentation-test-net-1" }, // IPv4 octets
78
+ { net: _ipv4ToUint32([198, 51, 100, 0]), prefix: 24, label: "documentation-test-net-2" }, // IPv4 octets
79
+ { net: _ipv4ToUint32([203, 0, 113, 0]), prefix: 24, label: "documentation-test-net-3" }, // IPv4 octets
80
+ { net: _ipv4ToUint32([198, 18, 0, 0]), prefix: 15, label: "benchmarking" }, // IPv4 octets
81
+ { net: _ipv4ToUint32([100, 64, 0, 0]), prefix: 10, label: "cgnat" }, // IPv4 octets
82
+ { net: _ipv4ToUint32([0, 0, 0, 0]), prefix: 8, label: "this-network" }, // IPv4 octets
83
83
  ]);
84
84
 
85
85
  // ---- IPv6 reserved prefixes ----
@@ -87,15 +87,15 @@ var IPV4_RESERVED = Object.freeze([
87
87
  // Stored as a normalized "first 32 hex chars (no colons)" prefix-byte
88
88
  // string. Match by string-prefix on the first ceil(prefix/4) hex chars.
89
89
  var IPV6_RESERVED = Object.freeze([
90
- { prefix: 128, hexPrefix: "00000000000000000000000000000001", label: "loopback" }, // allow:raw-byte-literal — IPv6 hex form
91
- { prefix: 128, hexPrefix: "00000000000000000000000000000000", label: "unspecified" }, // allow:raw-byte-literal — IPv6 hex form
92
- { prefix: 7, hexPrefix: "fc", label: "ula" }, // allow:raw-byte-literal — IPv6 hex form
93
- { prefix: 10, hexPrefix: "fe8", label: "link-local" }, // allow:raw-byte-literal — IPv6 hex form
94
- { prefix: 8, hexPrefix: "ff", label: "multicast" }, // allow:raw-byte-literal — IPv6 hex form
95
- { prefix: 96, hexPrefix: "00000000000000000000ffff", label: "ipv4-mapped" }, // allow:raw-byte-literal — IPv6 hex form
96
- { prefix: 32, hexPrefix: "20010db8", label: "documentation" }, // allow:raw-byte-literal — IPv6 hex form
97
- { prefix: 32, hexPrefix: "20010000", label: "teredo" }, // allow:raw-byte-literal — IPv6 hex form
98
- { prefix: 16, hexPrefix: "2002", label: "deprecated-6to4" }, // allow:raw-byte-literal — IPv6 hex form
90
+ { prefix: 128, hexPrefix: "00000000000000000000000000000001", label: "loopback" }, // IPv6 hex form
91
+ { prefix: 128, hexPrefix: "00000000000000000000000000000000", label: "unspecified" }, // IPv6 hex form
92
+ { prefix: 7, hexPrefix: "fc", label: "ula" }, // IPv6 hex form
93
+ { prefix: 10, hexPrefix: "fe8", label: "link-local" }, // IPv6 hex form
94
+ { prefix: 8, hexPrefix: "ff", label: "multicast" }, // IPv6 hex form
95
+ { prefix: 96, hexPrefix: "00000000000000000000ffff", label: "ipv4-mapped" }, // IPv6 hex form
96
+ { prefix: 32, hexPrefix: "20010db8", label: "documentation" }, // IPv6 hex form
97
+ { prefix: 32, hexPrefix: "20010000", label: "teredo" }, // IPv6 hex form
98
+ { prefix: 16, hexPrefix: "2002", label: "deprecated-6to4" }, // IPv6 hex form
99
99
  ]);
100
100
 
101
101
  // ---- Profile presets ----
@@ -183,7 +183,7 @@ function _parseIpv4(s) {
183
183
  var p = parts[i];
184
184
  if (!/^[0-9]+$/.test(p)) return null;
185
185
  if (p.length > 1 && p.charAt(0) === "0") return null; // leading-zero octal/forms refused
186
- var n = parseInt(p, 10); // allow:raw-byte-literal — base-10 radix
186
+ var n = parseInt(p, 10); // base-10 radix
187
187
  if (n > IPV4_OCTET_MAX) return null;
188
188
  octets.push(n);
189
189
  }
@@ -221,13 +221,13 @@ function _parseIpv6(s) {
221
221
  var pad = IPV6_GROUPS - left.length - right.length;
222
222
  if (pad < 0) return null;
223
223
  var zeros = [];
224
- for (var z = 0; z < pad; z += 1) zeros.push("0000"); // allow:raw-byte-literal — IPv6 zero group
224
+ for (var z = 0; z < pad; z += 1) zeros.push("0000"); // IPv6 zero group
225
225
  groups = left.concat(zeros).concat(right);
226
226
  if (groups.length !== IPV6_GROUPS) return null;
227
227
  }
228
228
  // Pad each group to 4 chars.
229
229
  for (var g = 0; g < groups.length; g += 1) {
230
- while (groups[g].length < 4) groups[g] = "0" + groups[g]; // allow:raw-byte-literal — IPv6 group width
230
+ while (groups[g].length < 4) groups[g] = "0" + groups[g]; // IPv6 group width
231
231
  }
232
232
  return groups;
233
233
  }
@@ -245,8 +245,8 @@ function _hostBitsSetIpv6(groups, prefix) {
245
245
  // boundary, every remaining bit must be zero.
246
246
  var bitIdx = 0;
247
247
  for (var i = 0; i < groups.length; i += 1) {
248
- var grp = parseInt(groups[i], 16); // allow:raw-byte-literal — base-16 radix
249
- for (var b = 15; b >= 0; b -= 1) { // allow:raw-byte-literal — bits per group
248
+ var grp = parseInt(groups[i], 16); // base-16 radix
249
+ for (var b = 15; b >= 0; b -= 1) { // bits per group
250
250
  if (bitIdx >= prefix) {
251
251
  if ((grp >> b) & 1) return true;
252
252
  }
@@ -372,7 +372,7 @@ function _detectIssues(input, opts) {
372
372
  });
373
373
  return issues;
374
374
  }
375
- prefix = parseInt(maskPart, 10); // allow:raw-byte-literal — base-10 radix
375
+ prefix = parseInt(maskPart, 10); // base-10 radix
376
376
  if (prefix > maskMax) {
377
377
  issues.push({
378
378
  kind: "mask-cap", severity: "high",
package/lib/guard-csv.js CHANGED
@@ -96,7 +96,7 @@ var DANGEROUS_FUNCTIONS = Object.freeze([
96
96
 
97
97
  // ---- Codepoint helpers (proxied to lib/codepoint-class) ----
98
98
 
99
- var HEX_RADIX = 16; // allow:raw-byte-literal — base-16 radix, not byte size
99
+ var HEX_RADIX = 16; // base-16 radix, not byte size
100
100
  var _hex4 = codepointClass.hex4;
101
101
  var _charClass = codepointClass.charClass;
102
102
  var _fromCp = codepointClass.fromCp;
@@ -67,8 +67,8 @@ var _err = GuardDomainError.factory;
67
67
 
68
68
  // ---- RFC 1035 §2.3.4 length caps ----
69
69
 
70
- var LIMIT_LABEL_OCTETS = 63; // allow:raw-byte-literal — RFC 1035 §2.3.4
71
- var LIMIT_DOMAIN_OCTETS = 253; // allow:raw-byte-literal — RFC 1035 §2.3.4 (255 wire minus length prefixes)
70
+ var LIMIT_LABEL_OCTETS = 63; // RFC 1035 §2.3.4
71
+ var LIMIT_DOMAIN_OCTETS = 253; // RFC 1035 §2.3.4 (255 wire minus length prefixes)
72
72
 
73
73
  // ---- Static patterns (built from explicit codepoint tables) ----
74
74
 
@@ -108,7 +108,7 @@ function _looksLikeIpv4Permissive(s) {
108
108
  return s.length > 0 && !/^[0-9]+$/.test(s) ? true :
109
109
  // Pure long-decimal — at least 8 digits to count as IPv4
110
110
  // representation, otherwise it's a port-shaped number.
111
- s.length >= 8; // allow:raw-byte-literal — minimum digits to recognize long-decimal IPv4
111
+ s.length >= 8; // minimum digits to recognize long-decimal IPv4
112
112
  }
113
113
  if (s.indexOf(".") === -1) return false;
114
114
  var parts = s.split(".");
@@ -193,8 +193,8 @@ var PROFILES = Object.freeze({
193
193
  trailingDotPolicy: "normalize",
194
194
  dgaPolicy: "reject",
195
195
  allowedScripts: ["latin"],
196
- dgaEntropyThreshold: 3.8, // allow:raw-byte-literal — Shannon entropy bits/char threshold (DGA heuristic)
197
- dgaMinLabelLen: 12, // allow:raw-byte-literal — DGA heuristic floor
196
+ dgaEntropyThreshold: 3.8, // Shannon entropy bits/char threshold (DGA heuristic)
197
+ dgaMinLabelLen: 12, // DGA heuristic floor
198
198
  maxLabelOctets: LIMIT_LABEL_OCTETS,
199
199
  maxDomainOctets: LIMIT_DOMAIN_OCTETS,
200
200
  maxBytes: C.BYTES.bytes(2048),
@@ -217,8 +217,8 @@ var PROFILES = Object.freeze({
217
217
  dgaPolicy: "audit",
218
218
  allowedScripts: ["latin", "cyrillic", "greek", "han", "hiragana",
219
219
  "katakana", "hangul"],
220
- dgaEntropyThreshold: 3.8, // allow:raw-byte-literal — Shannon entropy bits/char threshold (DGA heuristic)
221
- dgaMinLabelLen: 12, // allow:raw-byte-literal — DGA heuristic floor
220
+ dgaEntropyThreshold: 3.8, // Shannon entropy bits/char threshold (DGA heuristic)
221
+ dgaMinLabelLen: 12, // DGA heuristic floor
222
222
  maxLabelOctets: LIMIT_LABEL_OCTETS,
223
223
  maxDomainOctets: LIMIT_DOMAIN_OCTETS,
224
224
  maxBytes: C.BYTES.bytes(2048),
@@ -240,8 +240,8 @@ var PROFILES = Object.freeze({
240
240
  trailingDotPolicy: "normalize",
241
241
  dgaPolicy: "allow",
242
242
  allowedScripts: null,
243
- dgaEntropyThreshold: 3.8, // allow:raw-byte-literal — Shannon entropy bits/char threshold (DGA heuristic)
244
- dgaMinLabelLen: 12, // allow:raw-byte-literal — DGA heuristic floor
243
+ dgaEntropyThreshold: 3.8, // Shannon entropy bits/char threshold (DGA heuristic)
244
+ dgaMinLabelLen: 12, // DGA heuristic floor
245
245
  maxLabelOctets: LIMIT_LABEL_OCTETS,
246
246
  maxDomainOctets: LIMIT_DOMAIN_OCTETS,
247
247
  maxBytes: C.BYTES.bytes(2048),
@@ -477,7 +477,7 @@ function _detectIssues(input, opts) {
477
477
  // ASCII LDH or Unicode label.
478
478
  var allAscii = true;
479
479
  for (var ai = 0; ai < label.length; ai += 1) {
480
- if (label.charCodeAt(ai) > 0x7F) { allAscii = false; break; } // allow:raw-byte-literal — ASCII boundary codepoint
480
+ if (label.charCodeAt(ai) > 0x7F) { allAscii = false; break; } // ASCII boundary codepoint
481
481
  }
482
482
 
483
483
  if (allAscii) {
package/lib/guard-dsn.js CHANGED
@@ -107,9 +107,9 @@ var GuardDsnError = defineClass("GuardDsnError", { alwaysPermanent: true });
107
107
  var DEFAULT_PROFILE = "strict";
108
108
 
109
109
  var PROFILES = Object.freeze({
110
- strict: { maxBytes: C.BYTES.kib(256), maxRecipients: 256, maxHeaderLine: 998 }, // allow:raw-byte-literal — RFC 5322 §2.1.1 header line cap; RFC 3464 recipient count
111
- balanced: { maxBytes: C.BYTES.mib(1), maxRecipients: 1024, maxHeaderLine: 998 }, // allow:raw-byte-literal — RFC 5322 §2.1.1 line cap; mailing-list blast bounces
112
- permissive: { maxBytes: C.BYTES.mib(4), maxRecipients: 4096, maxHeaderLine: 998 }, // allow:raw-byte-literal — RFC 5322 §2.1.1 line cap; large-blast bounce class
110
+ strict: { maxBytes: C.BYTES.kib(256), maxRecipients: 256, maxHeaderLine: 998 }, // RFC 5322 §2.1.1 header line cap; RFC 3464 recipient count
111
+ balanced: { maxBytes: C.BYTES.mib(1), maxRecipients: 1024, maxHeaderLine: 998 }, // RFC 5322 §2.1.1 line cap; mailing-list blast bounces
112
+ permissive: { maxBytes: C.BYTES.mib(4), maxRecipients: 4096, maxHeaderLine: 998 }, // RFC 5322 §2.1.1 line cap; large-blast bounce class
113
113
  });
114
114
 
115
115
  var COMPLIANCE_POSTURES = Object.freeze({
@@ -334,7 +334,7 @@ function _checkControlChars(line) {
334
334
  // split (e.g. backslash + literal sequence).
335
335
  for (var i = 0; i < line.length; i += 1) {
336
336
  var c = line.charCodeAt(i);
337
- if (c === 0x00 || c === 0x7f || (c < 0x20 && c !== 0x09)) { // allow:raw-byte-literal — RFC 5322 control char + TAB allow
337
+ if (c === 0x00 || c === 0x7f || (c < 0x20 && c !== 0x09)) { // RFC 5322 control char + TAB allow
338
338
  throw new GuardDsnError("guard-dsn/control-char",
339
339
  "parse: control char 0x" + c.toString(16) + " in field line refused (header-injection defense)");
340
340
  }
@@ -49,10 +49,10 @@ var _err = GuardEmailError.factory;
49
49
 
50
50
  // ---- RFC 5321 / 5322 limits ----
51
51
 
52
- var LIMIT_LOCAL_PART = 64; // allow:raw-byte-literal — RFC 5321 §4.5.3.1.1
53
- var LIMIT_DOMAIN = 255; // allow:raw-byte-literal — RFC 5321 §4.5.3.1.2
54
- var LIMIT_ADDRESS = 320; // allow:raw-byte-literal — RFC 5321 sum (64 + 1 + 255)
55
- var LIMIT_LINE = 998; // allow:raw-byte-literal — RFC 5322 §2.1.1 maximum line length
52
+ var LIMIT_LOCAL_PART = 64; // RFC 5321 §4.5.3.1.1
53
+ var LIMIT_DOMAIN = 255; // RFC 5321 §4.5.3.1.2
54
+ var LIMIT_ADDRESS = 320; // RFC 5321 sum (64 + 1 + 255)
55
+ var LIMIT_LINE = 998; // RFC 5322 §2.1.1 maximum line length
56
56
 
57
57
  // ---- Source-level threat detectors ----
58
58
 
@@ -65,12 +65,12 @@ function _scanBareLineEndings(input) {
65
65
  var bareLf = false;
66
66
  for (var i = 0; i < input.length; i += 1) {
67
67
  var c = input.charCodeAt(i);
68
- if (c === 13) { // allow:raw-byte-literal — CR
68
+ if (c === 13) { // CR
69
69
  var next = i + 1 < input.length ? input.charCodeAt(i + 1) : -1;
70
- if (next !== 10) bareCr = true; // allow:raw-byte-literal — LF
71
- } else if (c === 10) { // allow:raw-byte-literal — LF
70
+ if (next !== 10) bareCr = true; // LF
71
+ } else if (c === 10) { // LF
72
72
  var prev = i > 0 ? input.charCodeAt(i - 1) : -1;
73
- if (prev !== 13) bareLf = true; // allow:raw-byte-literal — CR
73
+ if (prev !== 13) bareLf = true; // CR
74
74
  }
75
75
  if (bareCr && bareLf) break;
76
76
  }
@@ -85,7 +85,7 @@ var SMUGGLED_VERB_RE = /(?:\r(?!\n)|(?<!\r)\n)\.?\s*(?:MAIL FROM|RCPT TO|DATA|EH
85
85
  function _hasCrlfInHeaderValue(value) {
86
86
  for (var i = 0; i < value.length; i += 1) {
87
87
  var c = value.charCodeAt(i);
88
- if (c === 13 || c === 10) return true; // allow:raw-byte-literal — CR or LF in header value
88
+ if (c === 13 || c === 10) return true; // CR or LF in header value
89
89
  }
90
90
  return false;
91
91
  }
@@ -125,11 +125,11 @@ var PUNYCODE_LABEL_RE = /(?:^|\.)xn--/i;
125
125
  // class.js conventions — keep numeric, no literal characters).
126
126
  var SCRIPT_RANGES = {
127
127
  latin: [[0x0041, 0x005a], [0x0061, 0x007a],
128
- [0x00c0, 0x024f], [0x1e00, 0x1eff]], // allow:raw-byte-literal — Unicode script ranges
129
- cyrillic: [[0x0400, 0x04ff], [0x0500, 0x052f]], // allow:raw-byte-literal — Unicode Cyrillic + Cyrillic Supplement
130
- greek: [[0x0370, 0x03ff], [0x1f00, 0x1fff]], // allow:raw-byte-literal — Unicode Greek + Greek Extended
131
- armenian: [[0x0530, 0x058f]], // allow:raw-byte-literal — Unicode Armenian
132
- cherokee: [[0x13a0, 0x13ff], [0xab70, 0xabbf]], // allow:raw-byte-literal — Unicode Cherokee + Cherokee Supplement
128
+ [0x00c0, 0x024f], [0x1e00, 0x1eff]], // Unicode script ranges
129
+ cyrillic: [[0x0400, 0x04ff], [0x0500, 0x052f]], // Unicode Cyrillic + Cyrillic Supplement
130
+ greek: [[0x0370, 0x03ff], [0x1f00, 0x1fff]], // Unicode Greek + Greek Extended
131
+ armenian: [[0x0530, 0x058f]], // Unicode Armenian
132
+ cherokee: [[0x13a0, 0x13ff], [0xab70, 0xabbf]], // Unicode Cherokee + Cherokee Supplement
133
133
  };
134
134
 
135
135
  function _scriptFor(cp) {
@@ -200,7 +200,7 @@ var PROFILES = Object.freeze({
200
200
  maxDomainBytes: LIMIT_DOMAIN,
201
201
  maxAddressBytes: LIMIT_ADDRESS,
202
202
  maxHeaderLineBytes: LIMIT_LINE,
203
- maxHeaders: 128, // allow:raw-byte-literal — header count cap
203
+ maxHeaders: 128, // header count cap
204
204
  maxBytes: C.BYTES.mib(8),
205
205
  },
206
206
  "balanced": {
@@ -224,7 +224,7 @@ var PROFILES = Object.freeze({
224
224
  maxDomainBytes: LIMIT_DOMAIN,
225
225
  maxAddressBytes: LIMIT_ADDRESS,
226
226
  maxHeaderLineBytes: LIMIT_LINE,
227
- maxHeaders: 512, // allow:raw-byte-literal — header count cap
227
+ maxHeaders: 512, // header count cap
228
228
  maxBytes: C.BYTES.mib(32),
229
229
  },
230
230
  "permissive": {
@@ -248,7 +248,7 @@ var PROFILES = Object.freeze({
248
248
  maxDomainBytes: LIMIT_DOMAIN,
249
249
  maxAddressBytes: LIMIT_ADDRESS,
250
250
  maxHeaderLineBytes: LIMIT_LINE,
251
- maxHeaders: 2048, // allow:raw-byte-literal — header count cap
251
+ maxHeaders: 2048, // header count cap
252
252
  maxBytes: C.BYTES.mib(128),
253
253
  },
254
254
  });
@@ -503,7 +503,7 @@ function _detectMessageIssues(input, opts) {
503
503
 
504
504
  // BOM at start of message — header-injection prelude.
505
505
  if (opts.bomPolicy !== "allow") {
506
- if (input.charCodeAt(0) === 0xfeff) { // allow:raw-byte-literal — Unicode BOM
506
+ if (input.charCodeAt(0) === 0xfeff) { // Unicode BOM
507
507
  issues.push({
508
508
  kind: "bom",
509
509
  severity: opts.bomPolicy === "reject" ? "high" : "warn",
@@ -671,7 +671,7 @@ function _checkAddressHeaderValue(value, opts, headerName) {
671
671
  severity: opts.displayNameSpoofPolicy === "reject" ? "critical" : "high",
672
672
  ruleId: "email.display-name-spoof",
673
673
  snippet: headerName + ": display name `" +
674
- parsed.display.slice(0, 64) + "` includes an @-address that " + // allow:raw-byte-literal — snippet truncation
674
+ parsed.display.slice(0, 64) + "` includes an @-address that " + // snippet truncation
675
675
  "doesn't match the envelope domain `" + envDomain + "`",
676
676
  });
677
677
  }
@@ -46,9 +46,9 @@ var GuardEventBusPayloadError = defineClass("GuardEventBusPayloadError", { alway
46
46
  var DEFAULT_PROFILE = "strict";
47
47
 
48
48
  var PROFILES = Object.freeze({
49
- strict: { maxBytes: 65536 }, // allow:raw-byte-literal — 64 KiB metadata cap
50
- balanced: { maxBytes: 262144 }, // allow:raw-byte-literal — 256 KiB
51
- permissive: { maxBytes: 1048576 }, // allow:raw-byte-literal — 1 MiB
49
+ strict: { maxBytes: 65536 }, // 64 KiB metadata cap
50
+ balanced: { maxBytes: 262144 }, // 256 KiB
51
+ permissive: { maxBytes: 1048576 }, // 1 MiB
52
52
  });
53
53
 
54
54
  var COMPLIANCE_POSTURES = Object.freeze({
@@ -175,7 +175,7 @@ function _checkType(value, type, fieldName) {
175
175
  // burn regex-engine CPU. RFC 3339 ISO-8601 dateTime is bounded by
176
176
  // ~40 chars even with fractional seconds + numeric offset; cap at 64
177
177
  // for safety. The payload-level maxBytes cap also bounds the field.
178
- if (typeof value !== "string" || value.length > 64 || !ISO_DATETIME_RE.test(value)) { // allow:raw-byte-literal — ISO-8601 dateTime max length
178
+ if (typeof value !== "string" || value.length > 64 || !ISO_DATETIME_RE.test(value)) { // ISO-8601 dateTime max length
179
179
  throw new GuardEventBusPayloadError("event-bus-payload/type-mismatch",
180
180
  "field '" + fieldName + "' expected ISO-8601 dateTime string");
181
181
  }
@@ -31,9 +31,9 @@ var GuardEventBusTopicError = defineClass("GuardEventBusTopicError", { alwaysPer
31
31
  var DEFAULT_PROFILE = "strict";
32
32
 
33
33
  var PROFILES = Object.freeze({
34
- strict: { maxBytes: 128, minDots: 2 }, // allow:raw-byte-literal
35
- balanced: { maxBytes: 256, minDots: 2 }, // allow:raw-byte-literal
36
- permissive: { maxBytes: 512, minDots: 1 }, // allow:raw-byte-literal
34
+ strict: { maxBytes: 128, minDots: 2 },
35
+ balanced: { maxBytes: 256, minDots: 2 },
36
+ permissive: { maxBytes: 512, minDots: 1 },
37
37
  });
38
38
 
39
39
  var COMPLIANCE_POSTURES = Object.freeze({
@@ -75,7 +75,7 @@ function validate(name, opts) {
75
75
  }
76
76
  // Dot-count check — `<domain>.<source>.<event>` shape.
77
77
  var dots = 0;
78
- for (var d = 0; d < name.length; d += 1) if (name.charCodeAt(d) === 0x2E) dots += 1; // allow:raw-byte-literal — '.' codepoint
78
+ for (var d = 0; d < name.length; d += 1) if (name.charCodeAt(d) === 0x2E) dots += 1; // '.' codepoint
79
79
  if (dots < profile.minDots) {
80
80
  throw new GuardEventBusTopicError("event-bus-topic/insufficient-dots",
81
81
  "guardEventBusTopic.validate: name '" + name + "' has " + dots +
@@ -97,11 +97,11 @@ function validate(name, opts) {
97
97
  // C0 / DEL / slash / non-ASCII refusal.
98
98
  for (var i = 0; i < name.length; i += 1) {
99
99
  var c = name.charCodeAt(i);
100
- if (c > 0x7F) { // allow:raw-byte-literal — ASCII-only cap
100
+ if (c > 0x7F) { // ASCII-only cap
101
101
  throw new GuardEventBusTopicError("event-bus-topic/non-ascii",
102
102
  "guardEventBusTopic.validate: name contains non-ASCII codepoint at offset " + i);
103
103
  }
104
- if (c < 0x20 || c === 0x7F || c === 0x2F || c === 0x5C) { // allow:raw-byte-literal — C0/DEL/slash/backslash
104
+ if (c < 0x20 || c === 0x7F || c === 0x2F || c === 0x5C) { // C0/DEL/slash/backslash
105
105
  throw new GuardEventBusTopicError("event-bus-topic/bad-char",
106
106
  "guardEventBusTopic.validate: forbidden char 0x" + c.toString(16) + " at offset " + i);
107
107
  }
@@ -121,7 +121,7 @@ var SHELL_EXEC_EXTS = Object.freeze([
121
121
  ".reg", ".cpl", ".inf", ".hta", ".chm", ".scf",
122
122
  ]);
123
123
 
124
- var HEX_RADIX = 16; // allow:raw-byte-literal — base-16 radix, not byte size
124
+ var HEX_RADIX = 16; // base-16 radix, not byte size
125
125
 
126
126
  // Visual-confusable letter ranges that homoglyph against ASCII —
127
127
  // Cyrillic / Greek / fullwidth Latin. Only flagged when mixed with
@@ -149,8 +149,8 @@ var PROFILES = Object.freeze({
149
149
  requireAscii: true,
150
150
  extensionAllowlist: null, // null = any single extension
151
151
  requireSingleDot: true, // ".tar.gz" not allowed
152
- maxBytes: 64, // allow:raw-byte-literal — leaf-name byte cap, not byte size
153
- maxComponents: 1, // allow:raw-byte-literal — single leaf only, not bytes
152
+ maxBytes: 64, // leaf-name byte cap, not byte size
153
+ maxComponents: 1, // single leaf only, not bytes
154
154
  },
155
155
  "balanced": {
156
156
  bidiPolicy: "reject",
@@ -169,8 +169,8 @@ var PROFILES = Object.freeze({
169
169
  requireAscii: false,
170
170
  extensionAllowlist: null,
171
171
  requireSingleDot: false, // ".tar.gz" allowed
172
- maxBytes: 255, // allow:raw-byte-literal — POSIX max-component, not byte size
173
- maxComponents: 1, // allow:raw-byte-literal — single leaf only, not bytes
172
+ maxBytes: 255, // POSIX max-component, not byte size
173
+ maxComponents: 1, // single leaf only, not bytes
174
174
  },
175
175
  "permissive": {
176
176
  bidiPolicy: "reject",
@@ -189,8 +189,8 @@ var PROFILES = Object.freeze({
189
189
  requireAscii: false,
190
190
  extensionAllowlist: null,
191
191
  requireSingleDot: false,
192
- maxBytes: 255, // allow:raw-byte-literal — POSIX max-component, not byte size
193
- maxComponents: 16, // allow:raw-byte-literal — multi-component path cap, not bytes
192
+ maxBytes: 255, // POSIX max-component, not byte size
193
+ maxComponents: 16, // multi-component path cap, not bytes
194
194
  },
195
195
  });
196
196
 
@@ -113,9 +113,9 @@ var PROFILES = Object.freeze({
113
113
  aliasBombPolicy: "reject",
114
114
  depthPolicy: "reject",
115
115
  variableShapePolicy: "reject",
116
- maxDepth: 8, // allow:raw-byte-literal — selection-set depth ceiling
117
- maxAliasesPerSelection: 8, // allow:raw-byte-literal — alias breadth ceiling
118
- maxBatchSize: 1, // allow:raw-byte-literal — strict refuses batch
116
+ maxDepth: 8, // selection-set depth ceiling
117
+ maxAliasesPerSelection: 8, // alias breadth ceiling
118
+ maxBatchSize: 1, // strict refuses batch
119
119
  maxQueryBytes: C.BYTES.kib(8),
120
120
  maxVariableBytes: C.BYTES.kib(8),
121
121
  maxBytes: C.BYTES.kib(32),
@@ -133,9 +133,9 @@ var PROFILES = Object.freeze({
133
133
  aliasBombPolicy: "audit",
134
134
  depthPolicy: "audit",
135
135
  variableShapePolicy: "audit",
136
- maxDepth: 12, // allow:raw-byte-literal — selection-set depth ceiling
137
- maxAliasesPerSelection: 16, // allow:raw-byte-literal — alias breadth ceiling
138
- maxBatchSize: 10, // allow:raw-byte-literal — batch size ceiling
136
+ maxDepth: 12, // selection-set depth ceiling
137
+ maxAliasesPerSelection: 16, // alias breadth ceiling
138
+ maxBatchSize: 10, // batch size ceiling
139
139
  maxQueryBytes: C.BYTES.kib(16),
140
140
  maxVariableBytes: C.BYTES.kib(16),
141
141
  maxBytes: C.BYTES.kib(64),
@@ -153,9 +153,9 @@ var PROFILES = Object.freeze({
153
153
  aliasBombPolicy: "audit",
154
154
  depthPolicy: "audit",
155
155
  variableShapePolicy: "audit",
156
- maxDepth: 24, // allow:raw-byte-literal — selection-set depth ceiling
157
- maxAliasesPerSelection: 32, // allow:raw-byte-literal — alias breadth ceiling
158
- maxBatchSize: 50, // allow:raw-byte-literal — batch size ceiling
156
+ maxDepth: 24, // selection-set depth ceiling
157
+ maxAliasesPerSelection: 32, // alias breadth ceiling
158
+ maxBatchSize: 50, // batch size ceiling
159
159
  maxQueryBytes: C.BYTES.kib(64),
160
160
  maxVariableBytes: C.BYTES.kib(64),
161
161
  maxBytes: C.BYTES.kib(256),
@@ -31,7 +31,7 @@ function lineColAt(html, offset) {
31
31
  var line = 1;
32
32
  var lastNl = -1;
33
33
  for (var i = 0; i < offset; i++) {
34
- if (html.charCodeAt(i) === 10) { line += 1; lastNl = i; } // allow:raw-byte-literal — ASCII LF
34
+ if (html.charCodeAt(i) === 10) { line += 1; lastNl = i; } // ASCII LF
35
35
  }
36
36
  return { line: line, column: offset - lastNl };
37
37
  }
@@ -181,7 +181,7 @@ function _checkButtonText(html, tagOpenEnd, attrs, offset, report, opts) {
181
181
  function _checkHeadingOrder(html, attrs, tagName, offset, report, opts, ctx) {
182
182
  if (!/^h[1-6]$/.test(tagName)) return;
183
183
  if (opts.ignore.indexOf("1.3.1") !== -1) return;
184
- var level = parseInt(tagName.charAt(1), 10); // allow:raw-byte-literal — base-10 parse radix
184
+ var level = parseInt(tagName.charAt(1), 10); // base-10 parse radix
185
185
  if (ctx.headingLevels.length === 0) {
186
186
  if (level !== 1) {
187
187
  var pos = _lineColAt(html, offset);
@@ -447,9 +447,9 @@ function audit(html, opts) {
447
447
  }
448
448
 
449
449
  // Heuristic score: 1 - weighted-violations / heuristic-max
450
- var weighted = report.summary.error * 3 + report.summary.warning * 1.5 + // allow:raw-byte-literal — severity weights for heuristic score
451
- report.summary.info * 0.5; // allow:raw-byte-literal — severity weights for heuristic score
452
- var maxFor = Math.max(50, weighted * 2); // allow:raw-byte-literal — heuristic-score floor
450
+ var weighted = report.summary.error * 3 + report.summary.warning * 1.5 + // severity weights for heuristic score
451
+ report.summary.info * 0.5; // severity weights for heuristic score
452
+ var maxFor = Math.max(50, weighted * 2); // heuristic-score floor
453
453
  report.score = Math.max(0, 1 - weighted / maxFor);
454
454
 
455
455
  try { observability().safeEvent("guard-html.wcag.audited", 1, {
package/lib/guard-html.js CHANGED
@@ -105,7 +105,7 @@ var observability = lazyRequire(function () { return require("./observability");
105
105
  void observability;
106
106
 
107
107
  var _err = GuardHtmlError.factory;
108
- var HEX_RADIX = 16; // allow:raw-byte-literal — base-16 radix, not byte size
108
+ var HEX_RADIX = 16; // base-16 radix, not byte size
109
109
 
110
110
  // ---- Codepoint catalog (shared via lib/codepoint-class) ----
111
111
 
@@ -242,8 +242,8 @@ var PROFILES = Object.freeze({
242
242
  mxssHintPolicy: "reject",
243
243
  maxBytes: C.BYTES.mib(2),
244
244
  maxAttrValueBytes: C.BYTES.kib(8),
245
- maxTagDepth: 128, // allow:raw-byte-literal — tag-nesting depth count, not bytes
246
- maxAttrsPerTag: 64, // allow:raw-byte-literal — attribute count per tag, not bytes
245
+ maxTagDepth: 128, // tag-nesting depth count, not bytes
246
+ maxAttrsPerTag: 64, // attribute count per tag, not bytes
247
247
  },
248
248
  "balanced": {
249
249
  allowedTags: BALANCED_ALLOWED_TAGS,
@@ -264,8 +264,8 @@ var PROFILES = Object.freeze({
264
264
  mxssHintPolicy: "audit",
265
265
  maxBytes: C.BYTES.mib(8),
266
266
  maxAttrValueBytes: C.BYTES.kib(32),
267
- maxTagDepth: 256, // allow:raw-byte-literal — tag-nesting depth count, not bytes
268
- maxAttrsPerTag: 128, // allow:raw-byte-literal — attribute count per tag, not bytes
267
+ maxTagDepth: 256, // tag-nesting depth count, not bytes
268
+ maxAttrsPerTag: 128, // attribute count per tag, not bytes
269
269
  },
270
270
  "permissive": {
271
271
  allowedTags: PERMISSIVE_ALLOWED_TAGS,
@@ -286,8 +286,8 @@ var PROFILES = Object.freeze({
286
286
  mxssHintPolicy: "audit",
287
287
  maxBytes: C.BYTES.mib(32),
288
288
  maxAttrValueBytes: C.BYTES.kib(64),
289
- maxTagDepth: 512, // allow:raw-byte-literal — tag-nesting depth count, not bytes
290
- maxAttrsPerTag: 256, // allow:raw-byte-literal — attribute count per tag, not bytes
289
+ maxTagDepth: 512, // tag-nesting depth count, not bytes
290
+ maxAttrsPerTag: 256, // attribute count per tag, not bytes
291
291
  },
292
292
  });
293
293
 
@@ -36,9 +36,9 @@ var GuardIdempotencyKeyError = defineClass("GuardIdempotencyKeyError", { alwaysP
36
36
  var DEFAULT_PROFILE = "strict";
37
37
 
38
38
  var PROFILES = Object.freeze({
39
- strict: { maxBytes: 256, asciiOnly: true }, // allow:raw-byte-literal
40
- balanced: { maxBytes: 512, asciiOnly: true }, // allow:raw-byte-literal
41
- permissive: { maxBytes: 2048, asciiOnly: false }, // allow:raw-byte-literal
39
+ strict: { maxBytes: 256, asciiOnly: true },
40
+ balanced: { maxBytes: 512, asciiOnly: true },
41
+ permissive: { maxBytes: 2048, asciiOnly: false },
42
42
  });
43
43
 
44
44
  var COMPLIANCE_POSTURES = Object.freeze({
@@ -94,15 +94,15 @@ function validate(value, opts) {
94
94
  // C0 / DEL / slash refusal.
95
95
  for (var i = 0; i < value.length; i += 1) {
96
96
  var c = value.charCodeAt(i);
97
- if (c < 0x20 || c === 0x7F) { // allow:raw-byte-literal — C0 + DEL refusal
97
+ if (c < 0x20 || c === 0x7F) { // C0 + DEL refusal
98
98
  throw new GuardIdempotencyKeyError("idempotency-key/control-char",
99
99
  "guardIdempotencyKey.validate: control char 0x" + c.toString(16) + " at offset " + i);
100
100
  }
101
- if (c === 0x2F || c === 0x5C) { // allow:raw-byte-literal — / and \ refusal
101
+ if (c === 0x2F || c === 0x5C) { // / and \ refusal
102
102
  throw new GuardIdempotencyKeyError("idempotency-key/slash",
103
103
  "guardIdempotencyKey.validate: key contains '/' or '\\' at offset " + i);
104
104
  }
105
- if (profile.asciiOnly && c > 0x7F) { // allow:raw-byte-literal — ASCII-only cap
105
+ if (profile.asciiOnly && c > 0x7F) { // ASCII-only cap
106
106
  throw new GuardIdempotencyKeyError("idempotency-key/non-ascii",
107
107
  "guardIdempotencyKey.validate: non-ASCII codepoint at offset " + i +
108
108
  " (use profile='permissive' to allow)");
@@ -82,7 +82,7 @@ var MAGIC_BYTES = Object.freeze([
82
82
  { mime: "image/gif", bytes: [0x47, 0x49, 0x46, 0x38, 0x37, 0x61] },
83
83
  { mime: "image/gif", bytes: [0x47, 0x49, 0x46, 0x38, 0x39, 0x61] },
84
84
  // WebP: RIFF????WEBP — check at offsets 0..3 + 8..11.
85
- { mime: "image/webp", bytes: [0x52, 0x49, 0x46, 0x46], tail: [0x57, 0x45, 0x42, 0x50], tailOffset: 8 }, // allow:raw-byte-literal — RIFF + WEBP magic-byte tail offset
85
+ { mime: "image/webp", bytes: [0x52, 0x49, 0x46, 0x46], tail: [0x57, 0x45, 0x42, 0x50], tailOffset: 8 }, // RIFF + WEBP magic-byte tail offset
86
86
  // BMP: 42 4D
87
87
  { mime: "image/bmp", bytes: [0x42, 0x4D] },
88
88
  // ICO: 00 00 01 00
@@ -124,7 +124,7 @@ var PROFILES = Object.freeze({
124
124
  framesPolicy: "audit",
125
125
  maxWidth: C.BYTES.bytes(16384),
126
126
  maxHeight: C.BYTES.bytes(16384),
127
- maxFrames: 200, // allow:raw-byte-literal — animation frame ceiling
127
+ maxFrames: 200, // animation frame ceiling
128
128
  maxBytes: C.BYTES.mib(64),
129
129
  maxRuntimeMs: C.TIME.seconds(5),
130
130
  },
@@ -137,7 +137,7 @@ var PROFILES = Object.freeze({
137
137
  framesPolicy: "audit",
138
138
  maxWidth: C.BYTES.bytes(65536),
139
139
  maxHeight: C.BYTES.bytes(65536),
140
- maxFrames: 1000, // allow:raw-byte-literal — animation frame ceiling
140
+ maxFrames: 1000, // animation frame ceiling
141
141
  maxBytes: C.BYTES.mib(256),
142
142
  maxRuntimeMs: C.TIME.seconds(5),
143
143
  },
@@ -562,7 +562,7 @@ module.exports = {
562
562
  benignMetadata: {
563
563
  bytes: Buffer.from([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A]),
564
564
  declaredMime: "image/png",
565
- width: 100, height: 100, frames: 1, // allow:raw-byte-literal — pixel + frame count fixture
565
+ width: 100, height: 100, frames: 1, // pixel + frame count fixture
566
566
  },
567
567
  hostileMetadata: {
568
568
  bytes: Buffer.from([0xFF, 0xD8, 0xFF]),