@contrast/agent-bundle 5.39.1 → 5.41.0

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 (279) hide show
  1. package/node_modules/@contrast/agent/lib/start-agent.js +50 -40
  2. package/node_modules/@contrast/agent/package.json +11 -11
  3. package/node_modules/@contrast/agent-swc-plugin/index.js +9 -3
  4. package/node_modules/@contrast/agent-swc-plugin/methods.js +15 -1
  5. package/node_modules/@contrast/agent-swc-plugin/package.json +5 -8
  6. package/node_modules/@contrast/agent-swc-plugin/rewriter.wasm +0 -0
  7. package/node_modules/@contrast/agentify/lib/index.js +2 -2
  8. package/node_modules/@contrast/agentify/package.json +15 -14
  9. package/node_modules/@contrast/architecture-components/package.json +5 -5
  10. package/node_modules/@contrast/assess/lib/dataflow/propagation/install/string/replace.js +6 -3
  11. package/node_modules/@contrast/assess/lib/dataflow/propagation/install/util-format.js +44 -21
  12. package/node_modules/@contrast/assess/lib/dataflow/sources/index.js +1 -1
  13. package/node_modules/@contrast/assess/lib/dataflow/sources/install/{body-parser1.js → body-parser.js} +2 -2
  14. package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/koa-bodyparsers.js +3 -1
  15. package/node_modules/@contrast/assess/lib/dataflow/sources/install/qs6.js +5 -5
  16. package/node_modules/@contrast/assess/lib/dataflow/sources/install/querystring.js +2 -1
  17. package/node_modules/@contrast/assess/lib/index.d.ts +0 -1
  18. package/node_modules/@contrast/assess/lib/make-source-context.js +7 -37
  19. package/node_modules/@contrast/assess/lib/sampler/common.js +7 -11
  20. package/node_modules/@contrast/assess/package.json +12 -11
  21. package/node_modules/@contrast/common/lib/constants.d.ts +6 -0
  22. package/node_modules/@contrast/common/lib/constants.js +8 -1
  23. package/node_modules/@contrast/common/lib/types.d.ts +7 -1
  24. package/node_modules/@contrast/common/package.json +1 -1
  25. package/node_modules/@contrast/config/lib/common.js +1 -1
  26. package/node_modules/@contrast/config/lib/config.js +49 -27
  27. package/node_modules/@contrast/config/lib/index.d.ts +3 -2
  28. package/node_modules/@contrast/config/lib/options.js +4 -4
  29. package/node_modules/@contrast/config/package.json +4 -3
  30. package/node_modules/@contrast/core/lib/sensitive-data-masking/protect-listener.js +15 -15
  31. package/node_modules/@contrast/core/package.json +6 -6
  32. package/node_modules/@contrast/deadzones/package.json +5 -5
  33. package/node_modules/@contrast/dep-hooks/package.json +3 -3
  34. package/node_modules/@contrast/esm-hooks/package.json +6 -6
  35. package/node_modules/@contrast/instrumentation/lib/index.js +0 -1
  36. package/node_modules/@contrast/instrumentation/package.json +5 -5
  37. package/node_modules/@contrast/library-analysis/lib/install/library-reporting/dep.json +300 -152
  38. package/node_modules/@contrast/library-analysis/lib/install/library-reporting/index.js +9 -2
  39. package/node_modules/@contrast/library-analysis/lib/install/library-reporting/utils.js +54 -43
  40. package/node_modules/@contrast/library-analysis/package.json +4 -4
  41. package/node_modules/@contrast/logger/lib/serializers.js +2 -2
  42. package/node_modules/@contrast/logger/package.json +3 -3
  43. package/node_modules/@contrast/metrics/package.json +6 -6
  44. package/node_modules/@contrast/patcher/package.json +2 -2
  45. package/node_modules/@contrast/protect/lib/get-source-context.js +3 -1
  46. package/node_modules/@contrast/protect/lib/index.js +6 -1
  47. package/node_modules/@contrast/protect/lib/input-analysis/handlers.js +7 -9
  48. package/node_modules/@contrast/protect/lib/input-analysis/index.js +1 -1
  49. package/node_modules/@contrast/protect/lib/input-analysis/install/{body-parser1.js → body-parser.js} +1 -1
  50. package/node_modules/@contrast/protect/lib/input-analysis/install/http.js +18 -19
  51. package/node_modules/@contrast/protect/lib/input-analysis/install/qs6.js +18 -17
  52. package/node_modules/@contrast/protect/lib/input-analysis/install/universal-cookie4.js +2 -3
  53. package/node_modules/@contrast/protect/lib/make-source-context.js +22 -66
  54. package/node_modules/@contrast/protect/lib/semantic-analysis/handlers.js +73 -72
  55. package/node_modules/@contrast/protect/package.json +11 -11
  56. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/index.js +7 -7
  57. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.d.ts +3 -3
  58. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.js +24 -21
  59. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/routes-observed.js +2 -1
  60. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.js +1 -1
  61. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.d.ts +1 -2
  62. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.js +8 -2
  63. package/node_modules/@contrast/reporter/lib/reporters/security-logger/index.d.ts +2 -2
  64. package/node_modules/@contrast/reporter/lib/reporters/security-logger/index.js +22 -20
  65. package/node_modules/@contrast/reporter/package.json +7 -7
  66. package/node_modules/@contrast/rewriter/lib/index.js +2 -2
  67. package/node_modules/@contrast/rewriter/package.json +6 -6
  68. package/node_modules/@contrast/route-coverage/lib/index.d.ts +2 -0
  69. package/node_modules/@contrast/route-coverage/lib/index.js +15 -17
  70. package/node_modules/@contrast/route-coverage/lib/install/express/express5.js +489 -202
  71. package/node_modules/@contrast/route-coverage/package.json +9 -9
  72. package/node_modules/@contrast/scopes/package.json +5 -5
  73. package/node_modules/@contrast/sec-obs/lib/traces/http.js +2 -2
  74. package/node_modules/@contrast/sec-obs/lib/traces/http.test.js +17 -0
  75. package/node_modules/@contrast/sec-obs/lib/traces/outbound-service-call.js +2 -2
  76. package/node_modules/@contrast/sec-obs/lib/traces/outbound-service-call.test.js +17 -0
  77. package/node_modules/@contrast/sec-obs/package.json +9 -9
  78. package/node_modules/@contrast/sources/lib/index.js +109 -0
  79. package/node_modules/@contrast/sources/lib/index.test.js +120 -0
  80. package/node_modules/@contrast/{route-coverage/lib/normalized-url-mapper.js → sources/lib/normalized-uri-mapper.js} +10 -3
  81. package/node_modules/@contrast/sources/lib/normalized-uri-mapper.test.js +59 -0
  82. package/node_modules/@contrast/{sec-obs/node_modules/@contrast/core/lib/sensitive-data-masking/constants.js → sources/lib/req-data.js} +0 -6
  83. package/node_modules/@contrast/sources/lib/source-info.js +183 -0
  84. package/node_modules/@contrast/sources/lib/source-info.test.js +68 -0
  85. package/node_modules/@contrast/sources/package.json +16 -0
  86. package/node_modules/@contrast/telemetry/package.json +6 -6
  87. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.d.ts +2831 -77
  88. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +2831 -77
  89. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js.map +1 -1
  90. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.d.ts +415 -98
  91. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js +415 -98
  92. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js.map +1 -1
  93. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.d.ts +106 -0
  94. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js +106 -0
  95. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js.map +1 -1
  96. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.d.ts +1 -1
  97. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +1 -1
  98. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js.map +1 -1
  99. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.d.ts +2831 -77
  100. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js +2831 -77
  101. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js.map +1 -1
  102. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.d.ts +415 -98
  103. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js +415 -98
  104. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js.map +1 -1
  105. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.d.ts +106 -0
  106. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js +106 -0
  107. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js.map +1 -1
  108. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.d.ts +1 -1
  109. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +1 -1
  110. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js.map +1 -1
  111. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.d.ts +2831 -77
  112. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js +2858 -103
  113. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js.map +1 -1
  114. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.d.ts +415 -98
  115. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +420 -102
  116. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js.map +1 -1
  117. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.d.ts +106 -0
  118. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +106 -0
  119. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js.map +1 -1
  120. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.d.ts +1 -1
  121. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +1 -1
  122. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js.map +1 -1
  123. package/node_modules/@opentelemetry/semantic-conventions/package.json +3 -3
  124. package/node_modules/@types/node/README.md +2 -2
  125. package/node_modules/@types/node/buffer.d.ts +5 -0
  126. package/node_modules/@types/node/dns/promises.d.ts +11 -10
  127. package/node_modules/@types/node/dns.d.ts +18 -19
  128. package/node_modules/@types/node/fs.d.ts +13 -1
  129. package/node_modules/@types/node/http.d.ts +4 -19
  130. package/node_modules/@types/node/inspector.d.ts +53 -0
  131. package/node_modules/@types/node/package.json +2 -82
  132. package/node_modules/@types/node/stream/web.d.ts +4 -0
  133. package/node_modules/axios/CHANGELOG.md +17 -0
  134. package/node_modules/axios/README.md +1 -4
  135. package/node_modules/axios/dist/axios.js +39 -5
  136. package/node_modules/axios/dist/axios.js.map +1 -1
  137. package/node_modules/axios/dist/axios.min.js +2 -2
  138. package/node_modules/axios/dist/axios.min.js.map +1 -1
  139. package/node_modules/axios/dist/browser/axios.cjs +46 -9
  140. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  141. package/node_modules/axios/dist/esm/axios.js +46 -9
  142. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  143. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  144. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  145. package/node_modules/axios/dist/node/axios.cjs +46 -9
  146. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  147. package/node_modules/axios/index.d.cts +13 -2
  148. package/node_modules/axios/lib/core/Axios.js +2 -2
  149. package/node_modules/axios/lib/core/mergeConfig.js +1 -1
  150. package/node_modules/axios/lib/env/data.js +1 -1
  151. package/node_modules/axios/lib/helpers/throttle.js +1 -1
  152. package/node_modules/axios/lib/helpers/toURLEncodedForm.js +4 -3
  153. package/node_modules/axios/lib/utils.js +36 -0
  154. package/node_modules/axios/package.json +5 -5
  155. package/node_modules/deepmerge/.editorconfig +7 -0
  156. package/node_modules/deepmerge/.eslintcache +1 -0
  157. package/node_modules/deepmerge/changelog.md +167 -0
  158. package/node_modules/deepmerge/dist/cjs.js +133 -0
  159. package/node_modules/deepmerge/dist/umd.js +139 -0
  160. package/node_modules/deepmerge/index.d.ts +20 -0
  161. package/node_modules/deepmerge/index.js +106 -0
  162. package/node_modules/{path-to-regexp/LICENSE → deepmerge/license.txt} +1 -1
  163. package/node_modules/deepmerge/package.json +42 -0
  164. package/node_modules/deepmerge/readme.md +264 -0
  165. package/node_modules/deepmerge/rollup.config.js +22 -0
  166. package/node_modules/follow-redirects/package.json +1 -1
  167. package/node_modules/form-data/CHANGELOG.md +601 -0
  168. package/node_modules/form-data/{Readme.md → README.md} +4 -4
  169. package/node_modules/form-data/lib/form_data.js +2 -6
  170. package/node_modules/form-data/package.json +22 -6
  171. package/node_modules/nan/.github/workflows/ci.yml +8 -10
  172. package/node_modules/nan/.pre-commit-config.yaml +8 -0
  173. package/node_modules/nan/CHANGELOG.md +5 -1
  174. package/node_modules/nan/README.md +4 -4
  175. package/node_modules/nan/nan.h +16 -12
  176. package/node_modules/nan/nan_callbacks.h +13 -0
  177. package/node_modules/nan/nan_callbacks_12_inl.h +16 -2
  178. package/node_modules/nan/nan_callbacks_pre_12_inl.h +6 -2
  179. package/node_modules/nan/nan_maybe_43_inl.h +1 -1
  180. package/node_modules/nan/nan_maybe_pre_43_inl.h +1 -1
  181. package/node_modules/nan/nan_scriptorigin.h +11 -9
  182. package/node_modules/nan/nan_typedarray_contents.h +1 -1
  183. package/node_modules/nan/package.json +2 -2
  184. package/package.json +5 -3
  185. package/node_modules/@contrast/agentify/lib/sources.js +0 -94
  186. package/node_modules/@contrast/route-coverage/lib/install/http.js +0 -44
  187. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/LICENSE +0 -12
  188. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/constants.d.ts +0 -385
  189. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/constants.js +0 -270
  190. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/index.d.ts +0 -40
  191. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/index.js +0 -228
  192. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/primordials.d.ts +0 -65
  193. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/primordials.js +0 -66
  194. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/types.d.ts +0 -383
  195. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/types.js +0 -30
  196. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/package.json +0 -23
  197. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/LICENSE +0 -12
  198. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/README.md +0 -44
  199. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/common.js +0 -131
  200. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/config.js +0 -290
  201. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/index.d.ts +0 -328
  202. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/index.js +0 -29
  203. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/options.js +0 -836
  204. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/validators.js +0 -23
  205. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/package.json +0 -27
  206. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/LICENSE +0 -12
  207. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/README.md +0 -98
  208. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/agent-info.js +0 -36
  209. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/app-info.js +0 -233
  210. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/build-id.js +0 -51
  211. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/capture-stacktrace.js +0 -256
  212. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/contrast-methods.js +0 -155
  213. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/index.d.ts +0 -52
  214. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/ioc/core.js +0 -95
  215. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/is-agent-path.js +0 -37
  216. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/messages.js +0 -28
  217. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/sensitive-data-masking/index.js +0 -63
  218. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/sensitive-data-masking/protect-listener.js +0 -111
  219. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/sensitive-data-masking/server-settings-listener.js +0 -44
  220. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/system-info/cloud-provider-metadata.js +0 -146
  221. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/system-info/index.js +0 -225
  222. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/system-info/linux-os-info.js +0 -137
  223. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/system-info/utils.js +0 -35
  224. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/package.json +0 -33
  225. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/LICENSE +0 -12
  226. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/README.md +0 -94
  227. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/export-handler-registry.d.ts +0 -121
  228. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/export-handler-registry.js +0 -206
  229. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.d.ts +0 -72
  230. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.js +0 -88
  231. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/handler-invoker.d.ts +0 -46
  232. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/handler-invoker.js +0 -106
  233. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/helpers.d.ts +0 -28
  234. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/helpers.js +0 -66
  235. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/index.d.ts +0 -115
  236. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/index.js +0 -208
  237. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/package-finder.d.ts +0 -43
  238. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/package-finder.js +0 -79
  239. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/package.json +0 -29
  240. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/LICENSE +0 -12
  241. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/README.md +0 -270
  242. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/index.d.ts +0 -16
  243. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/index.js +0 -132
  244. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/serializers.d.ts +0 -33
  245. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/serializers.js +0 -75
  246. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/utils.d.ts +0 -15
  247. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/utils.js +0 -34
  248. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/package.json +0 -28
  249. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/LICENSE +0 -12
  250. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/README.md +0 -51
  251. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/lib/index.d.ts +0 -101
  252. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/lib/index.js +0 -544
  253. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/package.json +0 -25
  254. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/LICENSE +0 -12
  255. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/README.md +0 -6
  256. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/lib/cache.js +0 -318
  257. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/lib/index.js +0 -216
  258. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/lib/rewrite-is-deadzoned.js +0 -143
  259. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/package.json +0 -30
  260. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/LICENSE +0 -12
  261. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/constants.js +0 -26
  262. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/index.d.ts +0 -46
  263. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/index.js +0 -70
  264. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/bluebird.js +0 -128
  265. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/index.js +0 -34
  266. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mongodb-core.js +0 -83
  267. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mongodb3.js +0 -89
  268. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mongodb4.js +0 -80
  269. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mongodb6.js +0 -46
  270. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mysql.js +0 -151
  271. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/redis.js +0 -79
  272. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/utils.js +0 -35
  273. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/package.json +0 -28
  274. package/node_modules/form-data/README.md.bak +0 -355
  275. package/node_modules/path-to-regexp/Readme.md +0 -216
  276. package/node_modules/path-to-regexp/dist/index.d.ts +0 -136
  277. package/node_modules/path-to-regexp/dist/index.js +0 -403
  278. package/node_modules/path-to-regexp/dist/index.js.map +0 -1
  279. package/node_modules/path-to-regexp/package.json +0 -62
@@ -8,6 +8,7 @@ var https = require('https');
8
8
  var parseUrl = require('url').parse;
9
9
  var fs = require('fs');
10
10
  var Stream = require('stream').Stream;
11
+ var crypto = require('crypto');
11
12
  var mime = require('mime-types');
12
13
  var asynckit = require('asynckit');
13
14
  var setToStringTag = require('es-set-tostringtag');
@@ -345,12 +346,7 @@ FormData.prototype._generateBoundary = function () {
345
346
  // This generates a 50 character boundary similar to those used by Firefox.
346
347
 
347
348
  // They are optimized for boyer-moore parsing.
348
- var boundary = '--------------------------';
349
- for (var i = 0; i < 24; i++) {
350
- boundary += Math.floor(Math.random() * 10).toString(16);
351
- }
352
-
353
- this._boundary = boundary;
349
+ this._boundary = '--------------------------' + crypto.randomBytes(12).toString('hex');
354
350
  };
355
351
 
356
352
  // Note: getLengthSync DOESN'T calculate streams length
@@ -2,7 +2,7 @@
2
2
  "author": "Felix Geisendörfer <felix@debuggable.com> (http://debuggable.com/)",
3
3
  "name": "form-data",
4
4
  "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.",
5
- "version": "4.0.3",
5
+ "version": "4.0.4",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git://github.com/form-data/form-data.git"
@@ -28,10 +28,13 @@
28
28
  "files": "pkgfiles --sort=name",
29
29
  "get-version": "node -e \"console.log(require('./package.json').version)\"",
30
30
  "update-readme": "sed -i.bak 's/\\/master\\.svg/\\/v'$(npm --silent run get-version)'.svg/g' README.md",
31
- "restore-readme": "mv README.md.bak README.md",
31
+ "postupdate-readme": "mv README.md.bak READ.ME.md.bak",
32
+ "restore-readme": "mv READ.ME.md.bak README.md",
32
33
  "prepublish": "not-in-publish || npm run prepublishOnly",
33
- "prepublishOnly": "npm run update-readme",
34
- "postpublish": "npm run restore-readme"
34
+ "prepack": "npm run update-readme",
35
+ "postpack": "npm run restore-readme",
36
+ "version": "auto-changelog && git add CHANGELOG.md",
37
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
35
38
  },
36
39
  "engines": {
37
40
  "node": ">= 6"
@@ -44,7 +47,8 @@
44
47
  "mime-types": "^2.1.12"
45
48
  },
46
49
  "devDependencies": {
47
- "@ljharb/eslint-config": "^21.1.1",
50
+ "@ljharb/eslint-config": "^21.2.0",
51
+ "auto-changelog": "^2.5.0",
48
52
  "browserify": "^13.3.0",
49
53
  "browserify-istanbul": "^2.0.0",
50
54
  "coveralls": "^3.1.1",
@@ -58,9 +62,21 @@
58
62
  "istanbul": "^0.4.5",
59
63
  "obake": "^0.1.2",
60
64
  "pkgfiles": "^2.3.2",
65
+ "pre-commit": "^1.2.2",
66
+ "predict-v8-randomness": "^1.0.35",
67
+ "puppeteer": "^1.20.0",
61
68
  "request": "~2.87.0",
62
69
  "rimraf": "^2.7.1",
70
+ "semver": "^6.3.1",
63
71
  "tape": "^5.9.0"
64
72
  },
65
- "license": "MIT"
73
+ "license": "MIT",
74
+ "auto-changelog": {
75
+ "output": "CHANGELOG.md",
76
+ "template": "keepachangelog",
77
+ "unreleased": false,
78
+ "commitLimit": false,
79
+ "backfillLimit": false,
80
+ "hideCredit": true
81
+ }
66
82
  }
@@ -12,11 +12,17 @@ on:
12
12
  permissions:
13
13
  contents: read
14
14
  jobs:
15
+ pre-commit:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - uses: pre-commit/action@v3.0.1
20
+
15
21
  ci:
16
22
  strategy:
17
23
  fail-fast: false
18
- matrix: # TODO: Enable 23.x after nodejs/nan#979 or similar.
19
- node-version: [22.x, 21.x, 20.x, 19.x, 18.x, 17.x, 16.x]
24
+ matrix:
25
+ node-version: [24.x, 23.x, 22.x, 21.x, 20.x, 19.x, 18.x, 17.x, 16.x]
20
26
  os: [windows-latest]
21
27
  include:
22
28
  - node-version: lts/*
@@ -29,14 +35,6 @@ jobs:
29
35
  os: ubuntu-24.04-arm # Linux on arm64
30
36
  - node-version: lts/*
31
37
  os: windows-2025
32
- - node-version: 14.x
33
- os: windows-2019
34
- - node-version: 12.x
35
- os: windows-2019
36
- - node-version: 10.x
37
- os: windows-2019
38
- - node-version: 8.x
39
- os: windows-2019
40
38
  runs-on: ${{ matrix.os }}
41
39
  steps:
42
40
  - uses: actions/checkout@v4
@@ -0,0 +1,8 @@
1
+ repos:
2
+ - repo: https://github.com/cpplint/cpplint
3
+ rev: 2.0.0
4
+ hooks:
5
+ - id: cpplint
6
+ args:
7
+ - --filter=-whitespace/indent_namespace,-whitespace/parens
8
+ - --linelength=88
@@ -1,6 +1,10 @@
1
1
  # NAN ChangeLog
2
2
 
3
- **Version 2.22.2: current Node 22.14.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1**
3
+ **Version 2.23.0: current Node 24.4.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1**
4
+
5
+ ### 2.23.0 Jul 10 2025
6
+
7
+ - Feature: Support Node 23 (#979) 59ab6d03d5d68554290ee9f34003cd90aa92c185
4
8
 
5
9
  ### 2.22.2 Feb 26 2025
6
10
 
@@ -1,9 +1,9 @@
1
1
  Native Abstractions for Node.js
2
2
  ===============================
3
3
 
4
- **A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 8, 10, 12, 14, 16, 17, 18, 19, 20, 21, and 22.**
4
+ **A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 8, 10, 12, 14, 16, 17, 18, 19, 20, 21, 22, 23 and 24.**
5
5
 
6
- ***Current version: 2.22.2***
6
+ ***Current version: 2.23.0***
7
7
 
8
8
  *(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)*
9
9
 
@@ -31,10 +31,10 @@ This project also contains some helper utilities that make addon development a b
31
31
 
32
32
  ## Usage
33
33
 
34
- Simply add **NAN** as a dependency in the *package.json* of your Node addon:
34
+ Simply add **NAN** as a dependency using a package manager like npm, yarn, or bun:
35
35
 
36
36
  ``` bash
37
- $ npm install --save nan
37
+ $ npm install nan
38
38
  ```
39
39
 
40
40
  Pull in the path to **NAN** in your *binding.gyp* so that you can use `#include <nan.h>` in your *.cpp* files:
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
15
15
  *
16
- * Version 2.22.2: current Node 22.14.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1
16
+ * Version 2.23.0: current Node 24.4.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1
17
17
  *
18
18
  * See https://github.com/nodejs/nan for the latest update to this file
19
19
  **********************************************************************************/
@@ -179,7 +179,7 @@ namespace Nan {
179
179
 
180
180
  //=== CallbackInfo =============================================================
181
181
 
182
- #include "nan_callbacks.h" // NOLINT(build/include)
182
+ #include "nan_callbacks.h" // NOLINT(build/include_subdir)
183
183
 
184
184
  //==============================================================================
185
185
 
@@ -304,8 +304,8 @@ inline Maybe<T> Just(const T& t) {
304
304
  # include "nan_maybe_pre_43_inl.h" // NOLINT(build/include)
305
305
  #endif
306
306
 
307
- #include "nan_converters.h" // NOLINT(build/include)
308
- #include "nan_new.h" // NOLINT(build/include)
307
+ #include "nan_converters.h" // NOLINT(build/include_subdir)
308
+ #include "nan_new.h" // NOLINT(build/include_subdir)
309
309
 
310
310
  #if NAUV_UVVERSION < 0x000b17
311
311
  #define NAUV_WORK_CB(func) \
@@ -2615,7 +2615,9 @@ NAN_DEPRECATED inline void SetAccessor(
2615
2615
  obj->SetInternalField(imp::kDataIndex, data);
2616
2616
  }
2617
2617
 
2618
- #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || (V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 5))
2618
+ #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 \
2619
+ || (V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) \
2620
+ && V8_MINOR_VERSION >= 5))
2619
2621
  tpl->SetNativeDataProperty(
2620
2622
  #else
2621
2623
  tpl->SetAccessor(
@@ -2667,7 +2669,9 @@ inline void SetAccessor(
2667
2669
  obj->SetInternalField(imp::kDataIndex, data);
2668
2670
  }
2669
2671
 
2670
- #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || (V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 5))
2672
+ #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 \
2673
+ || (V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) \
2674
+ && V8_MINOR_VERSION >= 5))
2671
2675
  tpl->SetNativeDataProperty(
2672
2676
  #else
2673
2677
  tpl->SetAccessor(
@@ -2934,15 +2938,15 @@ inline void SetCallAsFunctionHandler(
2934
2938
 
2935
2939
  //=== Weak Persistent Handling =================================================
2936
2940
 
2937
- #include "nan_weak.h" // NOLINT(build/include)
2941
+ #include "nan_weak.h" // NOLINT(build/include_subdir)
2938
2942
 
2939
2943
  //=== ObjectWrap ===============================================================
2940
2944
 
2941
- #include "nan_object_wrap.h" // NOLINT(build/include)
2945
+ #include "nan_object_wrap.h" // NOLINT(build/include_subdir)
2942
2946
 
2943
2947
  //=== HiddenValue/Private ======================================================
2944
2948
 
2945
- #include "nan_private.h" // NOLINT(build/include)
2949
+ #include "nan_private.h" // NOLINT(build/include_subdir)
2946
2950
 
2947
2951
  //=== Export ==================================================================
2948
2952
 
@@ -3034,15 +3038,15 @@ MakeMaybe(MaybeMaybe<T> v) {
3034
3038
 
3035
3039
  //=== TypedArrayContents =======================================================
3036
3040
 
3037
- #include "nan_typedarray_contents.h" // NOLINT(build/include)
3041
+ #include "nan_typedarray_contents.h" // NOLINT(build/include_subdir)
3038
3042
 
3039
3043
  //=== JSON =====================================================================
3040
3044
 
3041
- #include "nan_json.h" // NOLINT(build/include)
3045
+ #include "nan_json.h" // NOLINT(build/include_subdir)
3042
3046
 
3043
3047
  //=== ScriptOrigin =============================================================
3044
3048
 
3045
- #include "nan_scriptorigin.h" // NOLINT(build/include)
3049
+ #include "nan_scriptorigin.h" // NOLINT(build/include_subdir)
3046
3050
 
3047
3051
  } // end of namespace Nan
3048
3052
 
@@ -13,6 +13,19 @@ template<typename T> class FunctionCallbackInfo;
13
13
  template<typename T> class PropertyCallbackInfo;
14
14
  template<typename T> class Global;
15
15
 
16
+ #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || \
17
+ (V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION > 4))
18
+ namespace Intercepted {
19
+ constexpr v8::Intercepted No() { return v8::Intercepted::kNo; }
20
+ constexpr v8::Intercepted Yes() { return v8::Intercepted::kYes; }
21
+ };
22
+ #else
23
+ namespace Intercepted {
24
+ inline void No() {}
25
+ inline void Yes() {}
26
+ };
27
+ #endif
28
+
16
29
  typedef void(*FunctionCallback)(const FunctionCallbackInfo<v8::Value>&);
17
30
  typedef void(*GetterCallback)
18
31
  (v8::Local<v8::String>, const PropertyCallbackInfo<v8::Value>&);
@@ -106,10 +106,24 @@ class FunctionCallbackInfo {
106
106
  }
107
107
 
108
108
  #if NODE_MAJOR_VERSION < 10
109
- inline v8::Local<v8::Function> Callee() const { return info_.Callee(); }
109
+ NAN_DEPRECATED inline v8::Local<v8::Function> Callee() const {
110
+ return info_.Callee();
111
+ }
110
112
  #endif
111
113
  inline v8::Local<v8::Value> Data() const { return data_; }
112
- inline v8::Local<v8::Object> Holder() const { return info_.Holder(); }
114
+ inline v8::Local<v8::Object> Holder() const {
115
+ #if defined(V8_MAJOR_VERSION) && \
116
+ (V8_MAJOR_VERSION > 12 || \
117
+ (V8_MAJOR_VERSION == 12 && \
118
+ (defined(V8_MINOR_VERSION) && \
119
+ (V8_MINOR_VERSION > 5 || \
120
+ (V8_MINOR_VERSION == 5 && defined(V8_BUILD_NUMBER) && \
121
+ V8_BUILD_NUMBER >= 214)))))
122
+ return info_.This();
123
+ #else
124
+ return info_.Holder();
125
+ #endif
126
+ }
113
127
  inline bool IsConstructCall() const { return info_.IsConstructCall(); }
114
128
  inline int Length() const { return info_.Length(); }
115
129
  inline v8::Local<v8::Value> operator[](int i) const { return info_[i]; }
@@ -136,9 +136,13 @@ class FunctionCallbackInfo {
136
136
  return ReturnValue<T>(return_value_);
137
137
  }
138
138
 
139
- inline v8::Local<v8::Function> Callee() const { return args_.Callee(); }
139
+ NAN_DEPRECATED inline v8::Local<v8::Function> Callee() const {
140
+ return args_.Callee();
141
+ }
140
142
  inline v8::Local<v8::Value> Data() const { return data_; }
141
- inline v8::Local<v8::Object> Holder() const { return args_.Holder(); }
143
+ inline v8::Local<v8::Object> Holder() const {
144
+ return args_.Holder();
145
+ }
142
146
  inline bool IsConstructCall() const { return args_.IsConstructCall(); }
143
147
  inline int Length() const { return args_.Length(); }
144
148
  inline v8::Local<v8::Value> operator[](int i) const { return args_[i]; }
@@ -90,7 +90,7 @@ inline Maybe<bool> Set(
90
90
  }
91
91
 
92
92
  #if NODE_MODULE_VERSION < NODE_4_0_MODULE_VERSION
93
- #include "nan_define_own_property_helper.h" // NOLINT(build/include)
93
+ #include "nan_define_own_property_helper.h" // NOLINT(build/include_subdir)
94
94
  #endif
95
95
 
96
96
  inline Maybe<bool> DefineOwnProperty(
@@ -100,7 +100,7 @@ inline Maybe<bool> Set(
100
100
  return Just<bool>(obj->Set(index, value));
101
101
  }
102
102
 
103
- #include "nan_define_own_property_helper.h" // NOLINT(build/include)
103
+ #include "nan_define_own_property_helper.h" // NOLINT(build/include_subdir)
104
104
 
105
105
  inline Maybe<bool> DefineOwnProperty(
106
106
  v8::Handle<v8::Object> obj
@@ -11,26 +11,28 @@
11
11
 
12
12
  class ScriptOrigin : public v8::ScriptOrigin {
13
13
  public:
14
-
15
- #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || \
16
- (V8_MAJOR_VERSION == 12 && (defined(V8_MINOR_VERSION) && (V8_MINOR_VERSION > 6\
17
- || (V8_MINOR_VERSION == 6 && defined(V8_BUILD_NUMBER) \
18
- && V8_BUILD_NUMBER >= 175)))))
14
+ #if defined(V8_MAJOR_VERSION) && \
15
+ (V8_MAJOR_VERSION > 12 || \
16
+ (V8_MAJOR_VERSION == 12 && \
17
+ (defined(V8_MINOR_VERSION) && \
18
+ (V8_MINOR_VERSION > 6 || \
19
+ (V8_MINOR_VERSION == 6 && defined(V8_BUILD_NUMBER) && \
20
+ V8_BUILD_NUMBER >= 175)))))
19
21
  explicit ScriptOrigin(v8::Local<v8::Value> name) :
20
22
  v8::ScriptOrigin(name) {}
21
23
 
22
24
  ScriptOrigin(v8::Local<v8::Value> name
23
25
  , v8::Local<v8::Integer> line) :
24
26
  v8::ScriptOrigin(name
25
- , To<int32_t>(line).FromMaybe(0)) {}
27
+ , To<int32_t>(line).FromMaybe(0)) {}
26
28
 
27
29
  ScriptOrigin(v8::Local<v8::Value> name
28
30
  , v8::Local<v8::Integer> line
29
31
  , v8::Local<v8::Integer> column) :
30
32
  v8::ScriptOrigin(name
31
- , To<int32_t>(line).FromMaybe(0)
32
- , To<int32_t>(column).FromMaybe(0)) {}
33
- #elif defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 9 || \
33
+ , To<int32_t>(line).FromMaybe(0)
34
+ , To<int32_t>(column).FromMaybe(0)) {}
35
+ #elif defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 9 || \
34
36
  (V8_MAJOR_VERSION == 9 && (defined(V8_MINOR_VERSION) && (V8_MINOR_VERSION > 0\
35
37
  || (V8_MINOR_VERSION == 0 && defined(V8_BUILD_NUMBER) \
36
38
  && V8_BUILD_NUMBER >= 1)))))
@@ -83,7 +83,7 @@ class TypedArrayContents {
83
83
  private:
84
84
  NAN_DISALLOW_ASSIGN_COPY_MOVE(TypedArrayContents)
85
85
 
86
- //Disable heap allocation
86
+ // Disable heap allocation
87
87
  void *operator new(size_t size);
88
88
  void operator delete(void *, size_t) {
89
89
  abort();
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nan",
3
- "version": "2.22.2",
4
- "description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 22 compatibility",
3
+ "version": "2.23.0",
4
+ "description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 24 compatibility",
5
5
  "main": "include_dirs.js",
6
6
  "repository": {
7
7
  "type": "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/agent-bundle",
3
- "version": "5.39.1",
3
+ "version": "5.41.0",
4
4
  "description": "Contrast Security Node.js Agent bundle with all dependencies included",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -26,7 +26,9 @@
26
26
  "test": "bash ../scripts/test.sh"
27
27
  },
28
28
  "dependencies": {
29
- "@contrast/agent": "5.39.1"
29
+ "@contrast/agent": "5.41.0"
30
30
  },
31
- "bundleDependencies": true
31
+ "bundleDependencies": [
32
+ "@contrast/agent"
33
+ ]
32
34
  }
@@ -1,94 +0,0 @@
1
- /*
2
- * Copyright: 2025 Contrast Security, Inc
3
- * Contact: support@contrastsecurity.com
4
- * License: Commercial
5
-
6
- * NOTICE: This Software and the patented inventions embodied within may only be
7
- * used as part of Contrast Security’s commercial offerings. Even though it is
8
- * made available through public repositories, use of this Software is subject to
9
- * the applicable End User Licensing Agreement found at
10
- * https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
11
- * between Contrast Security and the End User. The Software may not be reverse
12
- * engineered, modified, repackaged, sold, redistributed or otherwise used in a
13
- * way not consistent with the End User License Agreement.
14
- */
15
-
16
- 'use strict';
17
-
18
- const { EventEmitter } = require('events');
19
- const onFinished = require('on-finished');
20
- const { Event, primordials: { StringPrototypeToLowerCase } } = require('@contrast/common');
21
-
22
- module.exports = function(core) {
23
- const {
24
- messages,
25
- instrumentation: { instrument },
26
- scopes: { sources: sourcesStorage }
27
- } = core;
28
-
29
- const _hooks = new EventEmitter();
30
-
31
- function aroundHook(serverType) {
32
- return function around(next, data) {
33
- const { args: [event, req, res] } = data;
34
-
35
- if (event !== 'request') {
36
- if (event === 'listening') {
37
- // take a snapshot of Perf.all at this point. this will get logged
38
- // at some point on the perf interval timer.
39
- core.Perf.mark('listening');
40
- }
41
- return next();
42
- }
43
- // let's count requests.
44
- core.Perf.requestCount += 1;
45
-
46
- const store = {
47
- sourceInfo: {
48
- port: req.socket.address?.()?.port || 0,
49
- protocol: serverType === 'http' ? 'http' : 'https',
50
- serverType,
51
- time: Date.now(),
52
- method: StringPrototypeToLowerCase.call(req.method),
53
- }
54
- };
55
-
56
- if (_hooks._events.onSource) {
57
- _hooks.emit('onSource', {
58
- // future: non-http sources will have their own type
59
- sourceType: 'HTTP',
60
- store,
61
- incomingMessage: req,
62
- serverResponse: res,
63
- });
64
- }
65
-
66
- onFinished(res, (/* err, req */) => {
67
- messages.emit(Event.RESPONSE_FINISH, store);
68
- });
69
-
70
- return sourcesStorage.run(store, next);
71
- };
72
- }
73
-
74
- function install() {
75
- ['http', 'https', 'spdy', 'http2'].forEach((moduleName) => {
76
- instrument({
77
- moduleName,
78
- patchObjects: [{
79
- name: 'Server.prototype',
80
- methods: ['emit'],
81
- patchType: 'sources',
82
- around: aroundHook(moduleName)
83
- }]
84
- });
85
- });
86
- }
87
- return core.sources = {
88
- install,
89
- addHook(name, handler) {
90
- if (name === 'onSource') _hooks.on(name, handler);
91
- },
92
- aroundHook
93
- };
94
- };
@@ -1,44 +0,0 @@
1
- /*
2
- * Copyright: 2025 Contrast Security, Inc
3
- * Contact: support@contrastsecurity.com
4
- * License: Commercial
5
-
6
- * NOTICE: This Software and the patented inventions embodied within may only be
7
- * used as part of Contrast Security’s commercial offerings. Even though it is
8
- * made available through public repositories, use of this Software is subject to
9
- * the applicable End User Licensing Agreement found at
10
- * https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
11
- * between Contrast Security and the End User. The Software may not be reverse
12
- * engineered, modified, repackaged, sold, redistributed or otherwise used in a
13
- * way not consistent with the End User License Agreement.
14
- */
15
- 'use strict';
16
-
17
- module.exports = function init(core) {
18
- const { depHooks, patcher, routeCoverage } = core;
19
-
20
- let handled;
21
-
22
- return core.routeCoverage.http = {
23
- install() {
24
- [['http', '*'], ['https', '*'], ['spdy', '<5']].forEach(([name, version]) => {
25
- depHooks.resolve({ name, version }, (_export) => {
26
- if (!_export?.Server?.prototype) return;
27
-
28
- patcher.patch(_export.Server.prototype, 'listen', {
29
- name: `${name}.Server.prototype.listen`,
30
- patchType: 'route-coverage',
31
- post(data) {
32
- data.result?.on('listening', () => {
33
- if (!handled) {
34
- handled = true;
35
- routeCoverage.discoveryFinished();
36
- }
37
- });
38
- }
39
- });
40
- });
41
- });
42
- }
43
- };
44
- };
@@ -1,12 +0,0 @@
1
- Copyright: 2025 Contrast Security, Inc
2
- Contact: support@contrastsecurity.com
3
- License: Commercial
4
-
5
- NOTICE: This Software and the patented inventions embodied within may only be
6
- used as part of Contrast Security’s commercial offerings. Even though it is
7
- made available through public repositories, use of this Software is subject to
8
- the applicable End User Licensing Agreement found at
9
- https://www.contrastsecurity.com/enduser-terms-0317a or as otherwise agreed
10
- between Contrast Security and the End User. The Software may not be reverse
11
- engineered, modified, repackaged, sold, redistributed or otherwise used in a
12
- way not consistent with the End User License Agreement.