@contrast/agent-bundle 5.40.0 → 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 (258) hide show
  1. package/node_modules/@contrast/agent/package.json +11 -11
  2. package/node_modules/@contrast/agent-swc-plugin/index.js +9 -3
  3. package/node_modules/@contrast/agent-swc-plugin/methods.js +15 -1
  4. package/node_modules/@contrast/agent-swc-plugin/package.json +5 -8
  5. package/node_modules/@contrast/agent-swc-plugin/rewriter.wasm +0 -0
  6. package/node_modules/@contrast/agentify/lib/index.js +2 -2
  7. package/node_modules/@contrast/agentify/package.json +15 -14
  8. package/node_modules/@contrast/architecture-components/package.json +5 -5
  9. package/node_modules/@contrast/assess/lib/dataflow/propagation/install/util-format.js +44 -21
  10. package/node_modules/@contrast/assess/lib/dataflow/sources/install/body-parser.js +1 -1
  11. package/node_modules/@contrast/assess/lib/dataflow/sources/install/koa/koa-bodyparsers.js +3 -1
  12. package/node_modules/@contrast/assess/lib/dataflow/sources/install/qs6.js +5 -5
  13. package/node_modules/@contrast/assess/lib/dataflow/sources/install/querystring.js +2 -1
  14. package/node_modules/@contrast/assess/lib/index.d.ts +0 -1
  15. package/node_modules/@contrast/assess/lib/make-source-context.js +7 -37
  16. package/node_modules/@contrast/assess/lib/sampler/common.js +7 -11
  17. package/node_modules/@contrast/assess/package.json +12 -11
  18. package/node_modules/@contrast/common/lib/types.d.ts +7 -1
  19. package/node_modules/@contrast/common/package.json +1 -1
  20. package/node_modules/@contrast/config/lib/common.js +1 -1
  21. package/node_modules/@contrast/config/lib/config.js +49 -27
  22. package/node_modules/@contrast/config/lib/index.d.ts +2 -2
  23. package/node_modules/@contrast/config/lib/options.js +4 -4
  24. package/node_modules/@contrast/config/package.json +4 -3
  25. package/node_modules/@contrast/core/lib/sensitive-data-masking/protect-listener.js +15 -15
  26. package/node_modules/@contrast/core/package.json +6 -6
  27. package/node_modules/@contrast/deadzones/package.json +5 -5
  28. package/node_modules/@contrast/dep-hooks/package.json +3 -3
  29. package/node_modules/@contrast/esm-hooks/package.json +6 -6
  30. package/node_modules/@contrast/instrumentation/lib/index.js +0 -1
  31. package/node_modules/@contrast/instrumentation/package.json +5 -5
  32. package/node_modules/@contrast/library-analysis/lib/install/library-reporting/dep.json +298 -148
  33. package/node_modules/@contrast/library-analysis/package.json +4 -4
  34. package/node_modules/@contrast/logger/lib/serializers.js +2 -2
  35. package/node_modules/@contrast/logger/package.json +3 -3
  36. package/node_modules/@contrast/metrics/package.json +6 -6
  37. package/node_modules/@contrast/patcher/package.json +2 -2
  38. package/node_modules/@contrast/protect/lib/get-source-context.js +3 -1
  39. package/node_modules/@contrast/protect/lib/index.js +6 -1
  40. package/node_modules/@contrast/protect/lib/input-analysis/handlers.js +7 -9
  41. package/node_modules/@contrast/protect/lib/input-analysis/install/http.js +18 -19
  42. package/node_modules/@contrast/protect/lib/input-analysis/install/qs6.js +18 -17
  43. package/node_modules/@contrast/protect/lib/input-analysis/install/universal-cookie4.js +2 -3
  44. package/node_modules/@contrast/protect/lib/make-source-context.js +22 -66
  45. package/node_modules/@contrast/protect/lib/semantic-analysis/handlers.js +73 -72
  46. package/node_modules/@contrast/protect/package.json +11 -11
  47. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/index.js +7 -7
  48. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.d.ts +3 -3
  49. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.js +24 -21
  50. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.js +1 -1
  51. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.d.ts +1 -2
  52. package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.js +8 -2
  53. package/node_modules/@contrast/reporter/lib/reporters/security-logger/index.d.ts +2 -2
  54. package/node_modules/@contrast/reporter/lib/reporters/security-logger/index.js +22 -20
  55. package/node_modules/@contrast/reporter/package.json +7 -7
  56. package/node_modules/@contrast/rewriter/lib/index.js +2 -2
  57. package/node_modules/@contrast/rewriter/package.json +6 -6
  58. package/node_modules/@contrast/route-coverage/lib/index.js +1 -9
  59. package/node_modules/@contrast/route-coverage/lib/install/express/express5.js +17 -19
  60. package/node_modules/@contrast/route-coverage/package.json +8 -8
  61. package/node_modules/@contrast/scopes/package.json +5 -5
  62. package/node_modules/@contrast/sec-obs/lib/traces/http.js +2 -2
  63. package/node_modules/@contrast/sec-obs/lib/traces/http.test.js +17 -0
  64. package/node_modules/@contrast/sec-obs/lib/traces/outbound-service-call.js +2 -2
  65. package/node_modules/@contrast/sec-obs/lib/traces/outbound-service-call.test.js +17 -0
  66. package/node_modules/@contrast/sec-obs/package.json +9 -9
  67. package/node_modules/@contrast/sources/lib/index.js +109 -0
  68. package/node_modules/@contrast/sources/lib/index.test.js +120 -0
  69. package/node_modules/@contrast/{route-coverage/lib/normalized-url-mapper.js → sources/lib/normalized-uri-mapper.js} +10 -3
  70. package/node_modules/@contrast/sources/lib/normalized-uri-mapper.test.js +59 -0
  71. package/node_modules/@contrast/{sec-obs/node_modules/@contrast/core/lib/sensitive-data-masking/constants.js → sources/lib/req-data.js} +0 -6
  72. package/node_modules/@contrast/sources/lib/source-info.js +183 -0
  73. package/node_modules/@contrast/sources/lib/source-info.test.js +68 -0
  74. package/node_modules/@contrast/sources/package.json +16 -0
  75. package/node_modules/@contrast/telemetry/package.json +6 -6
  76. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.d.ts +2831 -77
  77. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +2831 -77
  78. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js.map +1 -1
  79. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.d.ts +415 -98
  80. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js +415 -98
  81. package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js.map +1 -1
  82. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.d.ts +106 -0
  83. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js +106 -0
  84. package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js.map +1 -1
  85. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.d.ts +1 -1
  86. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +1 -1
  87. package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js.map +1 -1
  88. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.d.ts +2831 -77
  89. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js +2831 -77
  90. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js.map +1 -1
  91. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.d.ts +415 -98
  92. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js +415 -98
  93. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js.map +1 -1
  94. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.d.ts +106 -0
  95. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js +106 -0
  96. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js.map +1 -1
  97. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.d.ts +1 -1
  98. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +1 -1
  99. package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js.map +1 -1
  100. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.d.ts +2831 -77
  101. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js +2858 -103
  102. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js.map +1 -1
  103. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.d.ts +415 -98
  104. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +420 -102
  105. package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js.map +1 -1
  106. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.d.ts +106 -0
  107. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +106 -0
  108. package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js.map +1 -1
  109. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.d.ts +1 -1
  110. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +1 -1
  111. package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js.map +1 -1
  112. package/node_modules/@opentelemetry/semantic-conventions/package.json +3 -3
  113. package/node_modules/@types/node/README.md +2 -2
  114. package/node_modules/@types/node/fs.d.ts +13 -1
  115. package/node_modules/@types/node/http.d.ts +4 -19
  116. package/node_modules/@types/node/inspector.d.ts +53 -0
  117. package/node_modules/@types/node/package.json +2 -82
  118. package/node_modules/axios/CHANGELOG.md +17 -0
  119. package/node_modules/axios/README.md +1 -4
  120. package/node_modules/axios/dist/axios.js +39 -5
  121. package/node_modules/axios/dist/axios.js.map +1 -1
  122. package/node_modules/axios/dist/axios.min.js +2 -2
  123. package/node_modules/axios/dist/axios.min.js.map +1 -1
  124. package/node_modules/axios/dist/browser/axios.cjs +46 -9
  125. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  126. package/node_modules/axios/dist/esm/axios.js +46 -9
  127. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  128. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  129. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  130. package/node_modules/axios/dist/node/axios.cjs +46 -9
  131. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  132. package/node_modules/axios/index.d.cts +13 -2
  133. package/node_modules/axios/lib/core/Axios.js +2 -2
  134. package/node_modules/axios/lib/core/mergeConfig.js +1 -1
  135. package/node_modules/axios/lib/env/data.js +1 -1
  136. package/node_modules/axios/lib/helpers/throttle.js +1 -1
  137. package/node_modules/axios/lib/helpers/toURLEncodedForm.js +4 -3
  138. package/node_modules/axios/lib/utils.js +36 -0
  139. package/node_modules/axios/package.json +5 -5
  140. package/node_modules/deepmerge/.editorconfig +7 -0
  141. package/node_modules/deepmerge/.eslintcache +1 -0
  142. package/node_modules/deepmerge/changelog.md +167 -0
  143. package/node_modules/deepmerge/dist/cjs.js +133 -0
  144. package/node_modules/deepmerge/dist/umd.js +139 -0
  145. package/node_modules/deepmerge/index.d.ts +20 -0
  146. package/node_modules/deepmerge/index.js +106 -0
  147. package/node_modules/deepmerge/license.txt +21 -0
  148. package/node_modules/deepmerge/package.json +42 -0
  149. package/node_modules/deepmerge/readme.md +264 -0
  150. package/node_modules/deepmerge/rollup.config.js +22 -0
  151. package/node_modules/follow-redirects/package.json +1 -1
  152. package/node_modules/form-data/CHANGELOG.md +601 -0
  153. package/node_modules/form-data/{Readme.md → README.md} +4 -4
  154. package/node_modules/form-data/lib/form_data.js +2 -6
  155. package/node_modules/form-data/package.json +22 -6
  156. package/node_modules/nan/.github/workflows/ci.yml +8 -10
  157. package/node_modules/nan/.pre-commit-config.yaml +8 -0
  158. package/node_modules/nan/CHANGELOG.md +5 -1
  159. package/node_modules/nan/README.md +4 -4
  160. package/node_modules/nan/nan.h +16 -12
  161. package/node_modules/nan/nan_callbacks.h +13 -0
  162. package/node_modules/nan/nan_callbacks_12_inl.h +16 -2
  163. package/node_modules/nan/nan_callbacks_pre_12_inl.h +6 -2
  164. package/node_modules/nan/nan_maybe_43_inl.h +1 -1
  165. package/node_modules/nan/nan_maybe_pre_43_inl.h +1 -1
  166. package/node_modules/nan/nan_scriptorigin.h +11 -9
  167. package/node_modules/nan/nan_typedarray_contents.h +1 -1
  168. package/node_modules/nan/package.json +2 -2
  169. package/package.json +2 -2
  170. package/node_modules/@contrast/agentify/lib/sources.js +0 -95
  171. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/LICENSE +0 -12
  172. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/constants.d.ts +0 -385
  173. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/constants.js +0 -270
  174. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/index.d.ts +0 -40
  175. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/index.js +0 -228
  176. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/primordials.d.ts +0 -65
  177. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/primordials.js +0 -66
  178. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/types.d.ts +0 -383
  179. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/lib/types.js +0 -30
  180. package/node_modules/@contrast/sec-obs/node_modules/@contrast/common/package.json +0 -23
  181. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/LICENSE +0 -12
  182. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/README.md +0 -44
  183. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/common.js +0 -131
  184. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/config.js +0 -290
  185. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/index.d.ts +0 -328
  186. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/index.js +0 -29
  187. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/options.js +0 -836
  188. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/lib/validators.js +0 -23
  189. package/node_modules/@contrast/sec-obs/node_modules/@contrast/config/package.json +0 -27
  190. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/LICENSE +0 -12
  191. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/README.md +0 -98
  192. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/agent-info.js +0 -36
  193. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/app-info.js +0 -233
  194. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/build-id.js +0 -51
  195. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/capture-stacktrace.js +0 -256
  196. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/contrast-methods.js +0 -155
  197. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/index.d.ts +0 -52
  198. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/ioc/core.js +0 -95
  199. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/is-agent-path.js +0 -37
  200. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/messages.js +0 -28
  201. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/sensitive-data-masking/index.js +0 -63
  202. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/sensitive-data-masking/protect-listener.js +0 -111
  203. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/sensitive-data-masking/server-settings-listener.js +0 -44
  204. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/system-info/cloud-provider-metadata.js +0 -146
  205. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/system-info/index.js +0 -225
  206. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/system-info/linux-os-info.js +0 -137
  207. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/lib/system-info/utils.js +0 -35
  208. package/node_modules/@contrast/sec-obs/node_modules/@contrast/core/package.json +0 -33
  209. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/LICENSE +0 -12
  210. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/README.md +0 -94
  211. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/export-handler-registry.d.ts +0 -121
  212. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/export-handler-registry.js +0 -206
  213. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.d.ts +0 -72
  214. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.js +0 -88
  215. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/handler-invoker.d.ts +0 -46
  216. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/handler-invoker.js +0 -106
  217. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/helpers.d.ts +0 -28
  218. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/helpers.js +0 -66
  219. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/index.d.ts +0 -115
  220. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/index.js +0 -208
  221. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/package-finder.d.ts +0 -43
  222. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/lib/package-finder.js +0 -79
  223. package/node_modules/@contrast/sec-obs/node_modules/@contrast/dep-hooks/package.json +0 -29
  224. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/LICENSE +0 -12
  225. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/README.md +0 -270
  226. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/index.d.ts +0 -16
  227. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/index.js +0 -132
  228. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/serializers.d.ts +0 -33
  229. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/serializers.js +0 -75
  230. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/utils.d.ts +0 -15
  231. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/lib/utils.js +0 -34
  232. package/node_modules/@contrast/sec-obs/node_modules/@contrast/logger/package.json +0 -28
  233. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/LICENSE +0 -12
  234. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/README.md +0 -51
  235. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/lib/index.d.ts +0 -101
  236. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/lib/index.js +0 -544
  237. package/node_modules/@contrast/sec-obs/node_modules/@contrast/patcher/package.json +0 -25
  238. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/LICENSE +0 -12
  239. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/README.md +0 -6
  240. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/lib/cache.js +0 -318
  241. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/lib/index.js +0 -216
  242. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/lib/rewrite-is-deadzoned.js +0 -143
  243. package/node_modules/@contrast/sec-obs/node_modules/@contrast/rewriter/package.json +0 -30
  244. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/LICENSE +0 -12
  245. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/constants.js +0 -26
  246. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/index.d.ts +0 -46
  247. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/index.js +0 -70
  248. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/bluebird.js +0 -128
  249. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/index.js +0 -34
  250. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mongodb-core.js +0 -83
  251. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mongodb3.js +0 -89
  252. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mongodb4.js +0 -80
  253. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mongodb6.js +0 -46
  254. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/mysql.js +0 -151
  255. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/install/redis.js +0 -79
  256. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/lib/utils.js +0 -35
  257. package/node_modules/@contrast/sec-obs/node_modules/@contrast/scopes/package.json +0 -28
  258. package/node_modules/form-data/README.md.bak +0 -355
@@ -1,80 +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 { PATCH_TYPES: { ASYNC_CONTEXT } } = require('../constants');
19
- const { resolveCallbackIndex } = require('../utils');
20
-
21
- /**
22
- * Exports a function handling the patching of `mongodb` versions 4 and 5.
23
- * @param {Object} core the core Contrast object in v5
24
- */
25
- module.exports = function (core) {
26
- const { depHooks, patcher, logger, scopes: { wrap } } = core;
27
- const mongoDBCursor = { name: 'mongodb', file: 'lib/cursor/abstract_cursor.js', version: '>=4 <6' };
28
- const mongoDBCommand = { name: 'mongodb', file: 'lib/operations/command.js', version: '>=4 <6' };
29
-
30
- function install() {
31
- depHooks.resolve(mongoDBCommand, (command) => {
32
- const methods = ['executeCommand'];
33
- methods.forEach((method) => {
34
- patcher.patch(command.CommandOperation.prototype, method, {
35
- name: `mongodb.CommandOperation.prototype.${method}`,
36
- patchType: ASYNC_CONTEXT,
37
- pre: methodHook()
38
- });
39
- });
40
- });
41
-
42
- depHooks.resolve(
43
- mongoDBCursor,
44
- (cursor) => {
45
- const methods = ['hasNext', 'next', 'tryNext', 'forEach', 'toArray', 'close'];
46
- methods.forEach((method) => {
47
- patcher.patch(cursor.AbstractCursor.prototype, method, {
48
- name: `mongodb.AbstractCursor.prototype.${method}`,
49
- patchType: ASYNC_CONTEXT,
50
- pre: methodHook(),
51
- });
52
- });
53
- });
54
- }
55
-
56
- /**
57
- * Returns a function/hook to be used with a given mongodb-core/mongodb method
58
- * @param {string} name the method for hooking
59
- * @return {function} a preHook for the given mongodb-core method
60
- */
61
- function methodHook() {
62
- /**
63
- * Binds callback (when present) to the relevant AsyncStorage.
64
- * @param {object} data the argument for the preHook
65
- * @param {object} data.args the arguments passed to hooked method
66
- */
67
- return function ({ args, funcKey, name }) {
68
- try {
69
- const indexOfCallback = resolveCallbackIndex(args);
70
- args[indexOfCallback] = wrap(args[indexOfCallback]);
71
- } catch (err) {
72
- logger.warn({ err, funcKey }, 'An error occurred in %s', name);
73
- }
74
- };
75
- }
76
-
77
- return {
78
- install
79
- };
80
- };
@@ -1,46 +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 { PATCH_TYPES: { ASYNC_CONTEXT } } = require('../constants');
19
- const { resolveCallbackIndex } = require('../utils');
20
-
21
- module.exports = function (core) {
22
- const { depHooks, patcher, logger, scopes: { wrap } } = core;
23
-
24
- function install() {
25
- depHooks.resolve(
26
- { name: 'mongodb', file: 'lib/cursor/abstract_cursor.js', version: '>=6 <7' },
27
- ({ AbstractCursor }) => {
28
- patcher.patch(AbstractCursor.prototype, 'forEach', {
29
- name: 'mongodb.AbstractCursor.prototype.forEach',
30
- patchType: ASYNC_CONTEXT,
31
- pre({ args, funcKey, name }) {
32
- try {
33
- const indexOfCallback = resolveCallbackIndex(args);
34
- args[indexOfCallback] = wrap(args[indexOfCallback]);
35
- } catch (err) {
36
- logger.warn({ err, funcKey }, 'An error occurred in %s', name);
37
- }
38
- },
39
- });
40
- });
41
- }
42
-
43
- return {
44
- install
45
- };
46
- };
@@ -1,151 +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 { ASYNC_CONTEXT } = require('../constants').PATCH_TYPES;
19
-
20
- /**
21
- * Exports a function handling the patching of `mysql` and `mysql2` packages
22
- * @param {Object} core the core Contrast object in v5
23
- * @param {Object} core.depHooks instance of @contrast/depHooks
24
- * @param {Object} core.patcher instance of @contrast/patcher
25
- * @param {Object} core.logger instance of @contrast/logger
26
- * @param {Object} core.scopes instance of @contrast/scopes
27
- * @param {Function} core.scopes.wrap reference to scopes.wrap function
28
- */
29
- module.exports = ({ depHooks, patcher, logger, scopes: { wrap } }) => {
30
- function install() {
31
- depHooks.resolve({ name: 'mysql', version: '<3', file: 'lib/protocol/sequences/Sequence.js' }, patchSequence);
32
-
33
- // Note: This may not be necessary, though comments in source code re domains
34
- // suggest asyncStorage issues may be possible:
35
- // https://github.com/mysqljs/mysql/blob/master/lib/Pool.js#L231
36
- depHooks.resolve({ name: 'mysql', version: '<3', file: 'lib/Pool.js' }, patchPool);
37
-
38
- depHooks.resolve({ name: 'mysql2', version: '<4', file: 'lib/commands/query.js' }, patchQuery);
39
- }
40
-
41
- /**
42
- * Patches the Sequence constructor which the protocol classes inherit.
43
- * This _must return_ the patched value to set the export in require hook.
44
- * @param {function} sequenceCtor Sequence constructor fn
45
- * @returns {function}
46
- */
47
- function patchSequence(sequenceCtor) {
48
- return patcher.patch(sequenceCtor, {
49
- name: 'mysql/lib/protocol/sequences/Sequence',
50
- patchType: ASYNC_CONTEXT,
51
- post: sequencePostHook(),
52
- });
53
- }
54
-
55
- /**
56
- * Patches Pool.prototype.getConnection.
57
- * @param {function} poolCtor Pool constructor fn
58
- */
59
- function patchPool(poolCtor) {
60
- patcher.patch(poolCtor.prototype, 'getConnection', {
61
- name: 'mysql/lib/Pool.prototype.getConnection',
62
- patchType: ASYNC_CONTEXT,
63
- pre: poolPreHook(),
64
- });
65
- }
66
-
67
- /**
68
- * Patches the Query constructor.
69
- * This _must return_ the patched value to set the export in require hook.
70
- * @param {function} queryCtor Query constructor fn
71
- * @returns {function}
72
- */
73
- function patchQuery(queryCtor) {
74
- return patcher.patch(queryCtor, {
75
- name: 'mysql2/lib/commands/query',
76
- patchType: ASYNC_CONTEXT,
77
- pre: queryPreHook(),
78
- });
79
- }
80
-
81
- function sequencePostHook() {
82
- /**
83
- * Typically in a constructor the data.result would be the instance. But mysql
84
- * has the subclasses e.g. Query, do Sequence.call(this, cb). In this case the
85
- * data.obj is the instance.
86
- * @param {object} data the argument for the postHook
87
- * @param {object} data.obj sequence instance
88
- */
89
- return function ({ obj, funcKey, name }) {
90
- try {
91
- if (obj && obj._callback && typeof obj._callback === 'function') {
92
- obj._callback = wrap(obj._callback);
93
- }
94
- } catch (err) {
95
- logger.warn(
96
- { err, funcKey },
97
- 'An error occurred in %s',
98
- name
99
- );
100
- }
101
- };
102
- }
103
-
104
- function poolPreHook() {
105
- /**
106
- * Binds callback (when present) to the relevant AsyncStorage.
107
- * @param {object} data the argument for the preHook
108
- * @param {object} data.args getConnection arguments
109
- */
110
- return function ({ args, funcKey, name }) {
111
- try {
112
- if (args.length && typeof args[0] === 'function') {
113
- args[0] = wrap(args[0]);
114
- }
115
- } catch (err) {
116
- logger.warn(
117
- { err, funcKey },
118
- 'An error occurred in %s',
119
- name
120
- );
121
- }
122
- };
123
- }
124
-
125
-
126
- function queryPreHook() {
127
- /**
128
- * Binds callback (when present) to the context the constructor is called in.
129
- * @param {object} data the argument for the preHook
130
- * @param {object} data.args the arguments passed to the Query constructor
131
- */
132
- return function ({ args, funcKey, name }) {
133
- try {
134
- if (args.length && args[1] && typeof args[1] === 'function') {
135
- args[1] = wrap(args[1]);
136
- }
137
- } catch (err) {
138
- logger.warn({ err, funcKey }, 'An error occurred in %s', name);
139
- }
140
- };
141
- }
142
-
143
- return {
144
- install,
145
- hooks: {
146
- sequencePostHook,
147
- poolPreHook,
148
- queryPreHook
149
- },
150
- };
151
- };
@@ -1,79 +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 { ASYNC_CONTEXT } = require('../constants').PATCH_TYPES;
19
-
20
- /**
21
- * Redis doesn't properly support async hooks
22
- * In their code they bind a callback to a domain
23
- * but since this isn't an AsyncResource it loses
24
- * context when using async hooks
25
- *
26
- * https://github.com/NodeRedis/node-redis/blob/master/index.js#L807
27
- *
28
- * Exports a function handling the patching of `redis` package
29
- * @param {Object} core the core Contrast object in v5
30
- * @param {Object} core.depHooks instance of @contrast/depHooks
31
- * @param {Object} core.patcher instance of @contrast/patcher
32
- * @param {Object} hooks the relevant hooks that are to be used in the patching, found in ./hooks.js
33
- * @param {function} sendCommandPreHook - a pre hook for the internal_send_command method
34
- */
35
- module.exports = ({ depHooks, patcher, logger, scopes: { wrap } }) => {
36
- function install() {
37
- depHooks.resolve({ name: 'redis', version: '<5' }, patchRedis);
38
- }
39
-
40
- /**
41
- * Patches redis.RedisClient.prototype.internal_send_command, if present.
42
- * The redis object changes from v3.*.* onwards and no such patch is needed there.
43
- * @param {Object} redis Redis object
44
- */
45
- function patchRedis(redis) {
46
- if (redis.RedisClient?.prototype?.internal_send_command) {
47
- patcher.patch(redis.RedisClient.prototype, 'internal_send_command', {
48
- name: 'redis.RedisClient.internal_send_command',
49
- patchType: ASYNC_CONTEXT,
50
- pre: sendCommandPreHook(),
51
- });
52
- }
53
- }
54
-
55
- function sendCommandPreHook() {
56
- /**
57
- * Binds callback (when present) to the relevant AsyncStorage.
58
- * @param {object} data the argument for the preHook
59
- * @param {object} data.args the arguments passed to `.internal_send_command` method
60
- */
61
- return function ({ args, funcKey, name }) {
62
- try {
63
- if (
64
- args.length &&
65
- args[0].callback &&
66
- typeof args[0].callback === 'function'
67
- ) {
68
- args[0].callback = wrap(args[0].callback);
69
- }
70
- } catch (err) {
71
- logger.warn({ err, funcKey }, 'An error occurred in %s', name);
72
- }
73
- };
74
- }
75
-
76
- return {
77
- install
78
- };
79
- };
@@ -1,35 +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 resolveCallbackIndex = (argList) => {
19
- if (!argList || !argList.length) {
20
- return -1;
21
- }
22
-
23
- // Work backwards
24
- for (let i = argList.length - 1; 0 <= i; i--) {
25
- if (typeof argList[i] === 'function') {
26
- return i;
27
- }
28
- }
29
-
30
- return -1;
31
- };
32
-
33
- module.exports = {
34
- resolveCallbackIndex
35
- };
@@ -1,28 +0,0 @@
1
- {
2
- "name": "@contrast/scopes",
3
- "version": "1.23.0",
4
- "description": "Handles AsyncLocalStorage scopes",
5
- "license": "SEE LICENSE IN LICENSE",
6
- "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
7
- "files": [
8
- "lib/",
9
- "!*.test.*",
10
- "!tsconfig.*",
11
- "!*.map"
12
- ],
13
- "main": "lib/index.js",
14
- "types": "lib/index.d.ts",
15
- "engines": {
16
- "npm": ">=6.13.7 <7 || >= 8.3.1",
17
- "node": ">= 16.9.1"
18
- },
19
- "scripts": {
20
- "test": "bash ../scripts/test.sh"
21
- },
22
- "dependencies": {
23
- "@contrast/core": "1.53.0",
24
- "@contrast/dep-hooks": "1.22.0",
25
- "@contrast/logger": "1.26.0",
26
- "@contrast/patcher": "1.25.0"
27
- }
28
- }