@contrast/agent-bundle 5.42.0 → 5.45.1
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.
- package/README.md +1 -10
- package/node_modules/@contrast/agent/README.md +1 -10
- package/node_modules/@contrast/agent/package.json +12 -12
- package/node_modules/@contrast/agent-swc-plugin/package.json +3 -3
- package/node_modules/@contrast/agentify/lib/rewrite-hooks.js +3 -3
- package/node_modules/@contrast/agentify/lib/utils.js +13 -7
- package/node_modules/@contrast/agentify/package.json +17 -17
- package/node_modules/@contrast/architecture-components/package.json +6 -6
- package/node_modules/@contrast/assess/lib/dataflow/propagation/install/ejs/template.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/propagation/install/pug/index.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/sinks/install/http/server-response.js +1 -12
- package/node_modules/@contrast/assess/lib/dataflow/sinks/install/restify.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/sources/install/http.js +1 -1
- package/node_modules/@contrast/assess/lib/dataflow/tracker.js +1 -1
- package/node_modules/@contrast/assess/lib/get-source-context.js +1 -1
- package/node_modules/@contrast/assess/lib/response-scanning/install/http.js +0 -12
- package/node_modules/@contrast/assess/package.json +14 -14
- package/node_modules/@contrast/code-events/binding.gyp +1 -1
- package/node_modules/@contrast/code-events/package.json +11 -9
- package/node_modules/@contrast/code-events/prebuilds/darwin-x64+arm64/@contrast+code-events.abi108.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/darwin-x64+arm64/@contrast+code-events.abi115.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/darwin-x64+arm64/@contrast+code-events.abi127.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/darwin-x64+arm64/{@contrast+code-events.abi93.node → @contrast+code-events.abi137.node} +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi108.armv8.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi115.armv8.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi127.armv8.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi137.armv8.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi108.glibc.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi108.musl.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi115.glibc.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi115.musl.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi127.glibc.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi127.musl.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi137.glibc.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi137.musl.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi108.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi115.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi127.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi137.node +0 -0
- package/node_modules/@contrast/common/lib/constants.d.ts +1 -1
- package/node_modules/@contrast/common/lib/constants.js +1 -1
- package/node_modules/@contrast/common/lib/index.js +15 -15
- package/node_modules/@contrast/common/lib/primordials.d.ts +22 -20
- package/node_modules/@contrast/common/lib/types.d.ts +18 -6
- package/node_modules/@contrast/common/package.json +2 -2
- package/node_modules/@contrast/config/lib/options.js +29 -4
- package/node_modules/@contrast/config/package.json +4 -4
- package/node_modules/@contrast/core/lib/app-info.js +53 -74
- package/node_modules/@contrast/core/lib/index.d.ts +17 -1
- package/node_modules/@contrast/core/lib/sensitive-data-masking/index.js +33 -5
- package/node_modules/@contrast/core/package.json +10 -9
- package/node_modules/@contrast/deadzones/package.json +6 -6
- package/node_modules/@contrast/dep-hooks/lib/export-handler-registry.d.ts +17 -13
- package/node_modules/@contrast/dep-hooks/lib/export-handler-registry.js +16 -4
- package/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.d.ts +2 -2
- package/node_modules/@contrast/dep-hooks/lib/export-hook-descriptor.js +2 -3
- package/node_modules/@contrast/dep-hooks/lib/handler-invoker.d.ts +6 -6
- package/node_modules/@contrast/dep-hooks/lib/handler-invoker.js +0 -1
- package/node_modules/@contrast/dep-hooks/lib/helpers.d.ts +0 -7
- package/node_modules/@contrast/dep-hooks/lib/helpers.js +2 -18
- package/node_modules/@contrast/dep-hooks/lib/index.d.ts +17 -12
- package/node_modules/@contrast/dep-hooks/lib/index.js +5 -3
- package/node_modules/@contrast/dep-hooks/lib/package-finder.d.ts +2 -1
- package/node_modules/@contrast/dep-hooks/lib/package-finder.js +6 -6
- package/node_modules/@contrast/dep-hooks/package.json +4 -3
- package/node_modules/@contrast/distringuish/package.json +7 -6
- package/node_modules/@contrast/distringuish/prebuilds/darwin-x64+arm64/@contrast+distringuish.abi108.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/darwin-x64+arm64/@contrast+distringuish.abi115.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/darwin-x64+arm64/@contrast+distringuish.abi127.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/darwin-x64+arm64/{@contrast+distringuish.abi93.node → @contrast+distringuish.abi137.node} +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi108.armv8.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi115.armv8.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi127.armv8.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi137.armv8.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi108.glibc.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi108.musl.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi115.glibc.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi115.musl.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi127.glibc.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi127.musl.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi137.glibc.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi137.musl.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi108.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi115.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi127.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi137.node +0 -0
- package/node_modules/@contrast/esm-hooks/lib/debug-methods.mjs +4 -4
- package/node_modules/@contrast/esm-hooks/lib/get-file-type.mjs +2 -9
- package/node_modules/@contrast/esm-hooks/lib/hooks.mjs +0 -2
- package/node_modules/@contrast/esm-hooks/lib/redirects/builtin/fs/promises.mjs +2 -0
- package/node_modules/@contrast/esm-hooks/lib/redirects/builtin/fs.mjs +3 -0
- package/node_modules/@contrast/esm-hooks/lib/redirects/builtin/util.mjs +1 -0
- package/node_modules/@contrast/esm-hooks/package.json +7 -7
- package/node_modules/@contrast/fn-inspect/package.json +9 -5
- package/node_modules/@contrast/fn-inspect/prebuilds/darwin-x64+arm64/@contrast+fn-inspect.abi108.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/darwin-x64+arm64/@contrast+fn-inspect.abi115.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/darwin-x64+arm64/@contrast+fn-inspect.abi127.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/darwin-x64+arm64/{@contrast+fn-inspect.abi93.node → @contrast+fn-inspect.abi137.node} +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi108.armv8.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi115.armv8.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi127.armv8.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi137.armv8.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi108.glibc.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi108.musl.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi115.glibc.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi115.musl.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi127.glibc.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi127.musl.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi137.glibc.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/{@contrast+fn-inspect.abi93.musl.node → @contrast+fn-inspect.abi137.musl.node} +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi108.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi115.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi127.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi137.node +0 -0
- package/node_modules/@contrast/instrumentation/lib/http2.js +0 -11
- package/node_modules/@contrast/instrumentation/package.json +6 -6
- package/node_modules/@contrast/library-analysis/lib/install/library-reporting/dep.json +312 -224
- package/node_modules/@contrast/library-analysis/package.json +6 -6
- package/node_modules/@contrast/logger/lib/index.js +18 -8
- package/node_modules/@contrast/logger/lib/serializers.js +5 -5
- package/node_modules/@contrast/logger/lib/utils.d.ts +0 -6
- package/node_modules/@contrast/logger/package.json +4 -4
- package/node_modules/@contrast/metrics/lib/index.d.ts +6 -6
- package/node_modules/@contrast/metrics/lib/index.js +0 -1
- package/node_modules/@contrast/metrics/package.json +7 -7
- package/node_modules/@contrast/patcher/package.json +3 -3
- package/node_modules/@contrast/perf/package.json +7 -4
- package/node_modules/@contrast/protect/lib/hardening/handlers.js +37 -21
- package/node_modules/@contrast/protect/lib/index.d.ts +3 -2
- package/node_modules/@contrast/protect/lib/index.js +9 -2
- package/node_modules/@contrast/protect/lib/input-analysis/handlers.js +275 -233
- package/node_modules/@contrast/protect/lib/input-analysis/install/http.js +3 -4
- package/node_modules/@contrast/protect/lib/input-tracing/{handlers/index.js → handlers.js} +15 -15
- package/node_modules/@contrast/protect/lib/input-tracing/index.js +0 -1
- package/node_modules/@contrast/protect/lib/make-source-context.js +5 -7
- package/node_modules/@contrast/protect/lib/policy.js +130 -95
- package/node_modules/@contrast/protect/lib/semantic-analysis/handlers.js +19 -18
- package/node_modules/@contrast/protect/package.json +12 -12
- package/node_modules/@contrast/reporter/lib/index.js +1 -1
- package/node_modules/@contrast/reporter/lib/reporters/base.d.ts +0 -1
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/index.d.ts +4 -2
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/index.js +14 -14
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.d.ts +43 -6
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/application-activity/translations.js +262 -429
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/server-inventory.d.ts +3 -3
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/index.js +17 -7
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/endpoints/traces/translations.js +12 -13
- package/node_modules/@contrast/reporter/lib/reporters/contrast-ui/utils.js +6 -7
- package/node_modules/@contrast/reporter/lib/reporters/file.js +1 -1
- package/node_modules/@contrast/reporter/lib/reporters/security-logger/index.d.ts +2 -3
- package/node_modules/@contrast/reporter/lib/reporters/security-logger/index.js +72 -86
- package/node_modules/@contrast/reporter/lib/reporters/security-logger/messages.js +6 -7
- package/node_modules/@contrast/reporter/lib/validators.js +0 -1
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/.husky/pre-commit +2 -2
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/.taprc +5 -0
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/README.md +2 -4
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/bench.js +5 -36
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/index.js +56 -300
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/package.json +12 -7
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test.js +1684 -0
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/types/index.d.ts +1 -2
- package/node_modules/@contrast/reporter/package.json +10 -10
- package/node_modules/@contrast/rewriter/lib/index.js +5 -43
- package/node_modules/@contrast/rewriter/package.json +8 -8
- package/node_modules/@contrast/route-coverage/lib/install/express/express5.js +0 -5
- package/node_modules/@contrast/route-coverage/lib/install/restify.js +1 -1
- package/node_modules/@contrast/route-coverage/package.json +10 -10
- package/node_modules/@contrast/scopes/package.json +6 -6
- package/node_modules/@contrast/sec-obs/lib/traces/http.js +1 -1
- package/node_modules/@contrast/sec-obs/lib/traces/http.test.js +1 -1
- package/node_modules/@contrast/sec-obs/package.json +10 -10
- package/node_modules/@contrast/sources/lib/index.js +1 -1
- package/node_modules/@contrast/sources/lib/index.test.js +0 -26
- package/node_modules/@contrast/sources/package.json +3 -3
- package/node_modules/@contrast/telemetry/package.json +6 -6
- package/node_modules/@opentelemetry/semantic-conventions/README.md +3 -2
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.d.ts +4350 -2882
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js +4350 -2882
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.d.ts +136 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js +154 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_events.js.map +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.d.ts +713 -141
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js +713 -141
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/experimental_metrics.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.d.ts +2 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.js +2 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index-incubating.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.d.ts +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.js +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/index.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.d.ts +7 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js +7 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.d.ts +5 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.js +23 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_events.js.map +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.d.ts +4350 -2882
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js +4350 -2882
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.d.ts +136 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js +154 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_events.js.map +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.d.ts +713 -141
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js +713 -141
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/experimental_metrics.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.d.ts +2 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.js +2 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index-incubating.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.d.ts +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.js +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/index.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.d.ts +7 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js +7 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.d.ts +5 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.js +23 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/stable_events.js.map +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.d.ts +4350 -2882
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js +4354 -2883
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.d.ts +136 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js +157 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_events.js.map +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.d.ts +713 -141
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js +720 -147
- package/node_modules/@opentelemetry/semantic-conventions/build/src/experimental_metrics.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.d.ts +2 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.js +2 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index-incubating.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index.d.ts +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index.js +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/index.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.d.ts +7 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js +10 -4
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_attributes.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.d.ts +5 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.js +26 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/stable_events.js.map +1 -0
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/semantic-conventions/package.json +6 -7
- package/node_modules/@swc/core/README.md +5 -0
- package/node_modules/@swc/core/binding.d.ts +2 -2
- package/node_modules/@swc/core/index.d.ts +5 -4
- package/node_modules/@swc/core/index.js +2 -2
- package/node_modules/@swc/core/package.json +12 -12
- package/node_modules/@swc/core-darwin-arm64/package.json +1 -1
- package/node_modules/@swc/core-darwin-arm64/swc.darwin-arm64.node +0 -0
- package/node_modules/@swc/core-darwin-x64/package.json +1 -1
- package/node_modules/@swc/core-darwin-x64/swc.darwin-x64.node +0 -0
- package/node_modules/@swc/core-linux-arm64-gnu/package.json +1 -1
- package/node_modules/@swc/core-linux-arm64-gnu/swc.linux-arm64-gnu.node +0 -0
- package/node_modules/@swc/core-linux-arm64-musl/package.json +1 -1
- package/node_modules/@swc/core-linux-arm64-musl/swc.linux-arm64-musl.node +0 -0
- package/node_modules/@swc/core-linux-x64-gnu/package.json +1 -1
- package/node_modules/@swc/core-linux-x64-gnu/swc.linux-x64-gnu.node +0 -0
- package/node_modules/@swc/core-linux-x64-musl/package.json +1 -1
- package/node_modules/@swc/core-linux-x64-musl/swc.linux-x64-musl.node +0 -0
- package/node_modules/@swc/core-win32-arm64-msvc/package.json +1 -1
- package/node_modules/@swc/core-win32-arm64-msvc/swc.win32-arm64-msvc.node +0 -0
- package/node_modules/@swc/core-win32-x64-msvc/package.json +1 -1
- package/node_modules/@swc/core-win32-x64-msvc/swc.win32-x64-msvc.node +0 -0
- package/node_modules/@swc/types/index.d.ts +14 -5
- package/node_modules/@swc/types/package.json +2 -2
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/buffer.d.ts +1 -1
- package/node_modules/@types/node/child_process.d.ts +26 -122
- package/node_modules/@types/node/crypto.d.ts +44 -10
- package/node_modules/@types/node/dns.d.ts +5 -0
- package/node_modules/@types/node/fs/promises.d.ts +41 -26
- package/node_modules/@types/node/fs.d.ts +52 -35
- package/node_modules/@types/node/globals.d.ts +148 -347
- package/node_modules/@types/node/http.d.ts +29 -5
- package/node_modules/@types/node/https.d.ts +5 -0
- package/node_modules/@types/node/index.d.ts +7 -2
- package/node_modules/@types/node/inspector.d.ts +187 -4089
- package/node_modules/@types/node/inspector.generated.d.ts +4052 -0
- package/node_modules/@types/node/module.d.ts +1 -0
- package/node_modules/@types/node/net.d.ts +21 -0
- package/node_modules/@types/node/package.json +3 -3
- package/node_modules/@types/node/sqlite.d.ts +34 -0
- package/node_modules/@types/node/test.d.ts +104 -0
- package/node_modules/@types/node/tls.d.ts +32 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +7 -2
- package/node_modules/@types/node/ts5.7/index.d.ts +7 -2
- package/node_modules/@types/node/url.d.ts +19 -5
- package/node_modules/@types/node/util.d.ts +6 -4
- package/node_modules/@types/node/vm.d.ts +73 -10
- package/node_modules/@types/node/wasi.d.ts +21 -0
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/{dom-events.d.ts → web-globals/events.d.ts} +47 -52
- package/node_modules/@types/node/web-globals/fetch.d.ts +50 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/worker_threads.d.ts +51 -3
- package/node_modules/axios/CHANGELOG.md +58 -0
- package/node_modules/axios/README.md +87 -10
- package/node_modules/axios/dist/axios.js +355 -289
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +2 -2
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +286 -213
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +286 -213
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +377 -213
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +12 -5
- package/node_modules/axios/index.d.ts +13 -4
- package/node_modules/axios/lib/adapters/adapters.js +6 -4
- package/node_modules/axios/lib/adapters/fetch.js +221 -162
- package/node_modules/axios/lib/adapters/http.js +18 -0
- package/node_modules/axios/lib/adapters/xhr.js +11 -8
- package/node_modules/axios/lib/core/Axios.js +0 -2
- package/node_modules/axios/lib/core/AxiosError.js +10 -3
- package/node_modules/axios/lib/core/dispatchRequest.js +1 -1
- package/node_modules/axios/lib/defaults/index.js +1 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/buildURL.js +1 -3
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +73 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +13 -9
- package/node_modules/axios/lib/utils.js +5 -3
- package/node_modules/axios/package.json +18 -12
- package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
- package/node_modules/balanced-match/LICENSE.md +21 -0
- package/node_modules/balanced-match/README.md +97 -0
- package/node_modules/balanced-match/index.js +62 -0
- package/node_modules/balanced-match/package.json +48 -0
- package/node_modules/brace-expansion/.github/FUNDING.yml +2 -0
- package/node_modules/brace-expansion/LICENSE +21 -0
- package/node_modules/brace-expansion/README.md +135 -0
- package/node_modules/brace-expansion/index.js +203 -0
- package/node_modules/brace-expansion/package.json +49 -0
- package/node_modules/detect-libc/lib/detect-libc.js +59 -13
- package/node_modules/detect-libc/lib/elf.js +39 -0
- package/node_modules/detect-libc/lib/filesystem.js +18 -8
- package/node_modules/detect-libc/package.json +3 -2
- package/node_modules/minimatch/LICENSE +15 -0
- package/node_modules/minimatch/README.md +454 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/ast.d.ts +20 -0
- package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/ast.js +592 -0
- package/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/escape.d.ts +12 -0
- package/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/escape.js +22 -0
- package/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts +94 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.js +1017 -0
- package/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/node_modules/minimatch/dist/commonjs/unescape.d.ts +17 -0
- package/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
- package/node_modules/minimatch/dist/esm/ast.d.ts +20 -0
- package/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/ast.js +588 -0
- package/node_modules/minimatch/dist/esm/ast.js.map +1 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js +148 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
- package/node_modules/minimatch/dist/esm/escape.d.ts +12 -0
- package/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/escape.js +18 -0
- package/node_modules/minimatch/dist/esm/escape.js.map +1 -0
- package/node_modules/minimatch/dist/esm/index.d.ts +94 -0
- package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/index.js +1001 -0
- package/node_modules/minimatch/dist/esm/index.js.map +1 -0
- package/node_modules/minimatch/dist/esm/package.json +3 -0
- package/node_modules/minimatch/dist/esm/unescape.d.ts +17 -0
- package/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/unescape.js +20 -0
- package/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
- package/node_modules/minimatch/package.json +82 -0
- package/node_modules/node-abi/LICENSE +21 -0
- package/node_modules/node-abi/README.md +54 -0
- package/node_modules/node-abi/abi_registry.json +408 -0
- package/node_modules/node-abi/getNextTarget.js +13 -0
- package/node_modules/node-abi/index.js +161 -0
- package/node_modules/node-abi/package.json +46 -0
- package/node_modules/node-addon-api/README.md +25 -249
- package/node_modules/node-addon-api/common.gypi +1 -0
- package/node_modules/node-addon-api/index.js +2 -0
- package/node_modules/node-addon-api/napi-inl.h +592 -166
- package/node_modules/node-addon-api/napi.h +167 -59
- package/node_modules/node-addon-api/node_addon_api.gyp +10 -0
- package/node_modules/node-addon-api/noexcept.gypi +1 -1
- package/node_modules/node-addon-api/package.json +13 -13
- package/node_modules/node-addon-api/tools/conversion.js +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.js +2 -2
- package/node_modules/protobufjs/dist/protobuf.min.js +2 -2
- package/node_modules/protobufjs/google/protobuf/descriptor.json +2 -2
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +2 -1
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/undici-types/diagnostics-channel.d.ts +9 -0
- package/node_modules/undici-types/dispatcher.d.ts +3 -2
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +2 -1
- package/node_modules/undici-types/eventsource.d.ts +3 -3
- package/node_modules/undici-types/fetch.d.ts +1 -0
- package/node_modules/undici-types/handlers.d.ts +1 -1
- package/node_modules/undici-types/mock-client.d.ts +2 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +2 -0
- package/node_modules/undici-types/mock-pool.d.ts +2 -0
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +9 -0
- package/node_modules/undici-types/webidl.d.ts +29 -15
- package/node_modules/undici-types/websocket.d.ts +3 -1
- package/package.json +3 -3
- package/node_modules/@contrast/code-events/prebuilds/linux-arm64/@contrast+code-events.abi93.armv8.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi93.glibc.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi93.musl.node +0 -0
- package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi93.node +0 -0
- package/node_modules/@contrast/core/lib/sensitive-data-masking/protect-listener.js +0 -111
- package/node_modules/@contrast/distringuish/prebuilds/linux-arm64/@contrast+distringuish.abi93.armv8.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi93.glibc.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/linux-x64/@contrast+distringuish.abi93.musl.node +0 -0
- package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi93.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-arm64/@contrast+fn-inspect.abi93.armv8.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/linux-x64/@contrast+fn-inspect.abi93.glibc.node +0 -0
- package/node_modules/@contrast/fn-inspect/prebuilds/win32-x64/@contrast+fn-inspect.abi93.node +0 -0
- package/node_modules/@contrast/perf/lib/index.test.js +0 -547
- package/node_modules/@contrast/perf/lib/tsconfig.json +0 -31
- package/node_modules/@contrast/protect/lib/input-tracing/install/spdy.js +0 -63
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/.taprc.yaml +0 -11
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/destroy.test.js +0 -49
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/end.test.js +0 -98
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/flush-sync.test.js +0 -140
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/flush.test.js +0 -419
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/fsync.test.js +0 -63
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/helper.js +0 -42
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/minlength.test.js +0 -35
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/mode.test.js +0 -116
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/reopen.test.js +0 -239
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/retry.test.js +0 -414
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/sync.test.js +0 -261
- package/node_modules/@contrast/reporter/node_modules/sonic-boom/test/write.test.js +0 -465
- package/node_modules/node-addon-api/tools/eslint-format.js +0 -79
|
@@ -28,7 +28,21 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
28
28
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
29
29
|
};
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.
|
|
31
|
+
exports.empties = void 0;
|
|
32
|
+
exports.isString = isString;
|
|
33
|
+
exports.isNonEmptyObject = isNonEmptyObject;
|
|
34
|
+
exports.encodeString = encodeString;
|
|
35
|
+
exports.traverseKeysAndValues = traverseKeysAndValues;
|
|
36
|
+
exports.traverseValues = traverseValues;
|
|
37
|
+
exports.traverseKeys = traverseKeys;
|
|
38
|
+
exports.callChildComponentMethodsSync = callChildComponentMethodsSync;
|
|
39
|
+
exports.callChildComponentMethods = callChildComponentMethods;
|
|
40
|
+
exports.groupResultsMap = groupResultsMap;
|
|
41
|
+
exports.get = get;
|
|
42
|
+
exports.set = set;
|
|
43
|
+
exports.safeConsoleError = safeConsoleError;
|
|
44
|
+
exports.safeConsoleWarn = safeConsoleWarn;
|
|
45
|
+
exports.normalizeURI = normalizeURI;
|
|
32
46
|
const constants_1 = require("./constants");
|
|
33
47
|
const primordials_1 = require("./primordials");
|
|
34
48
|
__exportStar(require("./constants"), exports);
|
|
@@ -49,16 +63,13 @@ exports.empties = {
|
|
|
49
63
|
function isString(value) {
|
|
50
64
|
return typeof value === 'string' || value instanceof String;
|
|
51
65
|
}
|
|
52
|
-
exports.isString = isString;
|
|
53
66
|
function isNonEmptyObject(value) {
|
|
54
67
|
return !!value && typeof value === 'object' && Object.keys(value).length > 0;
|
|
55
68
|
}
|
|
56
|
-
exports.isNonEmptyObject = isNonEmptyObject;
|
|
57
69
|
/* c8 ignore next 3 */
|
|
58
70
|
function encodeString(str) {
|
|
59
71
|
return BufferPrototypeToString.call(BufferFrom(str), 'base64');
|
|
60
72
|
}
|
|
61
|
-
exports.encodeString = encodeString;
|
|
62
73
|
function traverse(obj, cb, path, traverseValues, traverseKeys, depth = Infinity) {
|
|
63
74
|
let shouldKeepTraversing = true;
|
|
64
75
|
let reachedDepth = 0;
|
|
@@ -115,21 +126,18 @@ function traverseKeysAndValues(obj, cb, depth) {
|
|
|
115
126
|
}
|
|
116
127
|
traverse(obj, cb, [], true, true, depth);
|
|
117
128
|
}
|
|
118
|
-
exports.traverseKeysAndValues = traverseKeysAndValues;
|
|
119
129
|
function traverseValues(obj, cb, depth) {
|
|
120
130
|
if (typeof obj !== 'object' || obj === null) {
|
|
121
131
|
return;
|
|
122
132
|
}
|
|
123
133
|
traverse(obj, cb, [], true, false, depth);
|
|
124
134
|
}
|
|
125
|
-
exports.traverseValues = traverseValues;
|
|
126
135
|
function traverseKeys(obj, cb, depth) {
|
|
127
136
|
if (typeof obj !== 'object' || obj === null) {
|
|
128
137
|
return;
|
|
129
138
|
}
|
|
130
139
|
traverse(obj, cb, [], false, true, depth);
|
|
131
140
|
}
|
|
132
|
-
exports.traverseKeys = traverseKeys;
|
|
133
141
|
function callChildComponentMethodsSync(parent, method, order) {
|
|
134
142
|
const keys = order || Object.keys(parent);
|
|
135
143
|
for (const key of keys) {
|
|
@@ -137,7 +145,6 @@ function callChildComponentMethodsSync(parent, method, order) {
|
|
|
137
145
|
component?.[method]?.();
|
|
138
146
|
}
|
|
139
147
|
}
|
|
140
|
-
exports.callChildComponentMethodsSync = callChildComponentMethodsSync;
|
|
141
148
|
async function callChildComponentMethods(parent, method, order) {
|
|
142
149
|
const keys = order || Object.keys(parent);
|
|
143
150
|
for (const key of keys) {
|
|
@@ -145,7 +152,6 @@ async function callChildComponentMethods(parent, method, order) {
|
|
|
145
152
|
await component?.[method]?.();
|
|
146
153
|
}
|
|
147
154
|
}
|
|
148
|
-
exports.callChildComponentMethods = callChildComponentMethods;
|
|
149
155
|
function groupResultsMap(resultsMap) {
|
|
150
156
|
const result = {
|
|
151
157
|
commonResultsMap: {},
|
|
@@ -184,7 +190,6 @@ function groupResultsMap(resultsMap) {
|
|
|
184
190
|
}, result);
|
|
185
191
|
return result;
|
|
186
192
|
}
|
|
187
|
-
exports.groupResultsMap = groupResultsMap;
|
|
188
193
|
function get(obj, name) {
|
|
189
194
|
let target = obj;
|
|
190
195
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -197,7 +202,6 @@ function get(obj, name) {
|
|
|
197
202
|
}
|
|
198
203
|
return target;
|
|
199
204
|
}
|
|
200
|
-
exports.get = get;
|
|
201
205
|
function set(obj, name, value) {
|
|
202
206
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
203
207
|
// @ts-ignore
|
|
@@ -210,21 +214,18 @@ function set(obj, name, value) {
|
|
|
210
214
|
}
|
|
211
215
|
obj[lastProp] = value;
|
|
212
216
|
}
|
|
213
|
-
exports.set = set;
|
|
214
217
|
/** Suppresses output to stderr when installed by the universal agent */
|
|
215
218
|
function safeConsoleError(...args) {
|
|
216
219
|
if (CONTRAST_INSTALLATION_TOOL === 'NONE') {
|
|
217
220
|
console.error(...args);
|
|
218
221
|
}
|
|
219
222
|
}
|
|
220
|
-
exports.safeConsoleError = safeConsoleError;
|
|
221
223
|
/** Suppresses output to stderr when installed by the universal agent */
|
|
222
224
|
function safeConsoleWarn(...args) {
|
|
223
225
|
if (CONTRAST_INSTALLATION_TOOL === 'NONE') {
|
|
224
226
|
console.warn(...args);
|
|
225
227
|
}
|
|
226
228
|
}
|
|
227
|
-
exports.safeConsoleWarn = safeConsoleWarn;
|
|
228
229
|
function normalizeURI(uri) {
|
|
229
230
|
let normalizedUri = uri;
|
|
230
231
|
constants_1.URI_REGEXES.forEach(({ rx, rp }) => {
|
|
@@ -233,6 +234,5 @@ function normalizeURI(uri) {
|
|
|
233
234
|
});
|
|
234
235
|
return normalizedUri;
|
|
235
236
|
}
|
|
236
|
-
exports.normalizeURI = normalizeURI;
|
|
237
237
|
;
|
|
238
238
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
|
-
/// <reference types="node" />
|
|
5
1
|
import { inspect } from 'util';
|
|
6
2
|
import fs from 'fs';
|
|
7
3
|
export declare const primordials: {
|
|
8
|
-
ArrayPrototypeJoin: (separator?: string
|
|
9
|
-
ArrayPrototypeSlice: (start?: number
|
|
4
|
+
ArrayPrototypeJoin: (separator?: string) => string;
|
|
5
|
+
ArrayPrototypeSlice: (start?: number, end?: number) => any[];
|
|
10
6
|
BufferFrom: typeof Buffer.from;
|
|
11
|
-
BufferPrototypeToString: (encoding?: BufferEncoding
|
|
7
|
+
BufferPrototypeToString: (encoding?: BufferEncoding, start?: number, end?: number) => string;
|
|
12
8
|
StringPrototypeConcat: (...strings: string[]) => string;
|
|
13
9
|
StringPrototypeMatch: {
|
|
14
10
|
(regexp: string | RegExp): RegExpMatchArray | null;
|
|
@@ -16,7 +12,7 @@ export declare const primordials: {
|
|
|
16
12
|
[Symbol.match](string: string): RegExpMatchArray | null;
|
|
17
13
|
}): RegExpMatchArray | null;
|
|
18
14
|
};
|
|
19
|
-
StringPrototypeMatchAll: (regexp: RegExp) =>
|
|
15
|
+
StringPrototypeMatchAll: (regexp: RegExp) => RegExpStringIterator<RegExpExecArray>;
|
|
20
16
|
StringPrototypeReplace: {
|
|
21
17
|
(searchValue: string | RegExp, replaceValue: string): string;
|
|
22
18
|
(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
@@ -31,30 +27,36 @@ export declare const primordials: {
|
|
|
31
27
|
(searchValue: string | RegExp, replaceValue: string): string;
|
|
32
28
|
(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
33
29
|
};
|
|
34
|
-
StringPrototypeSlice: (start?: number
|
|
30
|
+
StringPrototypeSlice: (start?: number, end?: number) => string;
|
|
35
31
|
StringPrototypeSplit: {
|
|
36
|
-
(separator: string | RegExp, limit?: number
|
|
32
|
+
(separator: string | RegExp, limit?: number): string[];
|
|
37
33
|
(splitter: {
|
|
38
|
-
[Symbol.split](string: string, limit?: number
|
|
39
|
-
}, limit?: number
|
|
34
|
+
[Symbol.split](string: string, limit?: number): string[];
|
|
35
|
+
}, limit?: number): string[];
|
|
40
36
|
};
|
|
41
|
-
StringPrototypeSubstr: (from: number, length?: number
|
|
42
|
-
StringPrototypeSubstring: (start: number, end?: number
|
|
37
|
+
StringPrototypeSubstr: (from: number, length?: number) => string;
|
|
38
|
+
StringPrototypeSubstring: (start: number, end?: number) => string;
|
|
43
39
|
StringPrototypeToLowerCase: () => string;
|
|
44
40
|
StringPrototypeToUpperCase: () => string;
|
|
45
|
-
StringPrototypeToLocaleLowerCase:
|
|
46
|
-
|
|
41
|
+
StringPrototypeToLocaleLowerCase: {
|
|
42
|
+
(locales?: string | string[]): string;
|
|
43
|
+
(locales?: Intl.LocalesArgument): string;
|
|
44
|
+
};
|
|
45
|
+
StringPrototypeToLocaleUpperCase: {
|
|
46
|
+
(locales?: string | string[]): string;
|
|
47
|
+
(locales?: Intl.LocalesArgument): string;
|
|
48
|
+
};
|
|
47
49
|
StringPrototypeTrim: () => string;
|
|
48
50
|
RegExpPrototypeTest: (string: string) => boolean;
|
|
49
51
|
RegExpPrototypeExec: (string: string) => RegExpExecArray | null;
|
|
50
52
|
FunctionPrototypeToString: () => string;
|
|
51
|
-
JSONParse: (text: string, reviver?: (
|
|
53
|
+
JSONParse: (text: string, reviver?: (this: any, key: string, value: any) => any) => any;
|
|
52
54
|
JSONStringify: {
|
|
53
|
-
(value: any, replacer?: (
|
|
54
|
-
(value: any, replacer?: (
|
|
55
|
+
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
56
|
+
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
|
55
57
|
};
|
|
56
58
|
UtilInspect: typeof inspect;
|
|
57
|
-
PathBasename: (path: string, ext?: string
|
|
59
|
+
PathBasename: (path: string, ext?: string) => string;
|
|
58
60
|
FsOpen: typeof fs.open;
|
|
59
61
|
FsOpenSync: typeof fs.openSync;
|
|
60
62
|
FsReadFile: typeof fs.readFile;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import { EventEmitter } from 'events';
|
|
4
2
|
import { ServerResponse } from 'node:http';
|
|
5
3
|
import { Event, ProtectRuleMode, Rule } from './constants';
|
|
@@ -152,9 +150,8 @@ export interface Result {
|
|
|
152
150
|
mongoExpansionResult?: boolean;
|
|
153
151
|
path?: string[];
|
|
154
152
|
ruleId: Rule;
|
|
155
|
-
score
|
|
153
|
+
score?: number;
|
|
156
154
|
value: string;
|
|
157
|
-
sinkContext?: any;
|
|
158
155
|
}
|
|
159
156
|
export interface SemanticAnalysisResult extends Result {
|
|
160
157
|
ruleId: SemanticAnalysisRules;
|
|
@@ -232,6 +229,7 @@ export interface SourceInfo {
|
|
|
232
229
|
contentType?: string;
|
|
233
230
|
ip: string;
|
|
234
231
|
httpVersion: string;
|
|
232
|
+
getHeader(name: string): string | null;
|
|
235
233
|
}
|
|
236
234
|
/**
|
|
237
235
|
* this is known as RequestStore even though, in the future, instrumentation
|
|
@@ -348,6 +346,20 @@ export interface RouteInfo {
|
|
|
348
346
|
*/
|
|
349
347
|
normalizedUrl: string;
|
|
350
348
|
}
|
|
349
|
+
export interface ProtectFindingEventArg {
|
|
350
|
+
store: RequestStore;
|
|
351
|
+
result: Result;
|
|
352
|
+
sinkContext?: {
|
|
353
|
+
name: string;
|
|
354
|
+
value: any;
|
|
355
|
+
stacktraceOpts?: {
|
|
356
|
+
constructorOpt: any;
|
|
357
|
+
prependFrames: any[];
|
|
358
|
+
};
|
|
359
|
+
stack?: any[];
|
|
360
|
+
};
|
|
361
|
+
findings?: any;
|
|
362
|
+
}
|
|
351
363
|
/**
|
|
352
364
|
* Agent event emitter for messaging to/from external systems. Use cases are
|
|
353
365
|
* reporting agent findings and broadcasting settings updates.
|
|
@@ -360,7 +372,7 @@ export interface Messages extends EventEmitter {
|
|
|
360
372
|
emit(event: Event.ASSESS_DATAFLOW_FINDING, msg: any): boolean;
|
|
361
373
|
emit(event: Event.LIBRARY, msg: Library): boolean;
|
|
362
374
|
emit(event: Event.LIBRARY_USAGE, msg: LibraryUsage): boolean;
|
|
363
|
-
emit(event: Event.
|
|
375
|
+
emit(event: Event.PROTECT_FINDING, msg: ProtectFindingEventArg): boolean;
|
|
364
376
|
emit(event: Event.ROUTE_COVERAGE_DISCOVERY_FINISHED, routes: RouteInfo[]): boolean;
|
|
365
377
|
emit(event: Event.ROUTE_COVERAGE_OBSERVATION, route: RouteInfo): boolean;
|
|
366
378
|
emit(event: Event.SERVER_SETTINGS_UPDATE, msg: Record<string, any>): boolean;
|
|
@@ -371,7 +383,7 @@ export interface Messages extends EventEmitter {
|
|
|
371
383
|
on(event: Event.ASSESS_DATAFLOW_FINDING, listenter: (msg: any) => void): this;
|
|
372
384
|
on(event: Event.LIBRARY, listener: (msg: Library) => void): this;
|
|
373
385
|
on(event: Event.LIBRARY_USAGE, listener: (msg: LibraryUsage) => void): this;
|
|
374
|
-
on(event: Event.
|
|
386
|
+
on(event: Event.PROTECT_FINDING, listener: (msg: ProtectFindingEventArg) => void): this;
|
|
375
387
|
on(event: Event.ROUTE_COVERAGE_DISCOVERY_FINISHED, listener: (routes: RouteInfo[]) => void): this;
|
|
376
388
|
on(event: Event.ROUTE_COVERAGE_OBSERVATION, listener: (route: RouteInfo) => void): this;
|
|
377
389
|
on(event: Event.SERVER_SETTINGS_UPDATE, listener: (msg: Record<string, any>) => void): this;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.37.0",
|
|
4
4
|
"description": "Shared constants and utilities for all Contrast Agent modules",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"types": "lib/index.d.ts",
|
|
15
15
|
"engines": {
|
|
16
16
|
"npm": ">=6.13.7 <7 || >= 8.3.1",
|
|
17
|
-
"node": ">=
|
|
17
|
+
"node": ">= 18.7.0"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"build": "tsc --build src/",
|
|
@@ -23,6 +23,31 @@ const path = require('path');
|
|
|
23
23
|
const { Rule, primordials: { BufferFrom, BufferPrototypeToString, StringPrototypeReplace, StringPrototypeReplaceAll, StringPrototypeSplit, StringPrototypeToLowerCase, StringPrototypeToUpperCase, JSONParse } } = require('@contrast/common');
|
|
24
24
|
const { ConfigSource: { DEFAULT_VALUE } } = require('./common');
|
|
25
25
|
|
|
26
|
+
const CMD_IGNORE_LIST_DEFAULTS = [
|
|
27
|
+
'**/npm',
|
|
28
|
+
'**/npx',
|
|
29
|
+
'**/yarn',
|
|
30
|
+
'**/pnpm',
|
|
31
|
+
|
|
32
|
+
'**/.bin/next',
|
|
33
|
+
'**/node_modules/**/next/**',
|
|
34
|
+
'**/.bin/nuxi', // nuxt
|
|
35
|
+
'**/.bin/vite',
|
|
36
|
+
'**/.bin/astro',
|
|
37
|
+
'**/.bin/sv', // svelte
|
|
38
|
+
'**/.bin/webpack',
|
|
39
|
+
'**/node_modules/**/webpack-cli/**',
|
|
40
|
+
'**/.bin/rollup',
|
|
41
|
+
'**/.bin/parcel',
|
|
42
|
+
'**/@parcel/workers/**',
|
|
43
|
+
'**/.bin/babel',
|
|
44
|
+
'**/.bin/gulp',
|
|
45
|
+
'**/.bin/grunt',
|
|
46
|
+
|
|
47
|
+
'**/Visual Studio Code*/**',
|
|
48
|
+
'**/.vscode/**',
|
|
49
|
+
];
|
|
50
|
+
|
|
26
51
|
/**
|
|
27
52
|
* Takes strings "true"|"t" or "false"|"f" (case insensitive) and return the appropriate boolean.
|
|
28
53
|
* @param {boolean | string} value passed arg; never undefined or the function isn't called
|
|
@@ -160,7 +185,7 @@ const options = [
|
|
|
160
185
|
name: 'api.token',
|
|
161
186
|
arg: '<token>',
|
|
162
187
|
desc: 'base64 encoded JSON object containing the `url`, `api_key`, `service_key`, and `user_name` config options, allowing them all to be set in a single variable.',
|
|
163
|
-
fn(value, cfg, source) {
|
|
188
|
+
fn: (value, cfg, source) => {
|
|
164
189
|
try {
|
|
165
190
|
// parse the base64 encoded value
|
|
166
191
|
const parsed = JSONParse(BufferPrototypeToString.call(BufferFrom(value, 'base64'), 'utf8'));
|
|
@@ -470,14 +495,14 @@ Example - \`/opt/Contrast/contrast.log\` creates a log in the \`/opt/Contrast\`
|
|
|
470
495
|
name: 'agent.node.cmd_ignore_list',
|
|
471
496
|
arg: '<commands>',
|
|
472
497
|
default: '',
|
|
473
|
-
fn: (arg) => StringPrototypeSplit.call(arg,
|
|
474
|
-
desc:
|
|
498
|
+
fn: (arg) => [...CMD_IGNORE_LIST_DEFAULTS, ...StringPrototypeSplit.call(arg, /,(?![^{]*}|[^[]*\])/g).filter((v) => v)],
|
|
499
|
+
desc: "Comma-separated list of glob patterns that will prevent instrumentation when matched in node's arguments."
|
|
475
500
|
},
|
|
476
501
|
{
|
|
477
502
|
// SEE NODE-2886
|
|
478
503
|
name: 'agent.node.exclusive_entrypoint',
|
|
479
504
|
arg: '<entrypoint.js>',
|
|
480
|
-
desc: '
|
|
505
|
+
desc: 'An entrypoint for an application that, when specified, will force the agent to instrument and prevent the agent instrumenting anything else. Resolved relative to `app_root` if set or the current working directory otherwise.'
|
|
481
506
|
},
|
|
482
507
|
{
|
|
483
508
|
name: 'agent.node.rewrite.enable',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.52.1",
|
|
4
4
|
"description": "An API for discovering Contrast agent configuration data",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"types": "lib/index.d.ts",
|
|
15
15
|
"engines": {
|
|
16
16
|
"npm": ">=6.13.7 <7 || >= 8.3.1",
|
|
17
|
-
"node": ">=
|
|
17
|
+
"node": ">= 18.7.0"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"test": "bash ../scripts/test.sh"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@contrast/common": "1.
|
|
24
|
-
"@contrast/core": "1.
|
|
23
|
+
"@contrast/common": "1.37.0",
|
|
24
|
+
"@contrast/core": "1.57.1",
|
|
25
25
|
"deepmerge": "^4.3.1",
|
|
26
26
|
"yaml": "^2.2.2"
|
|
27
27
|
}
|
|
@@ -20,7 +20,8 @@ const fs = require('fs');
|
|
|
20
20
|
const path = require('path');
|
|
21
21
|
const semver = require('semver');
|
|
22
22
|
const process = require('process');
|
|
23
|
-
const {
|
|
23
|
+
const { minimatch } = require('minimatch');
|
|
24
|
+
const { IntentionalError } = require('@contrast/common');
|
|
24
25
|
const { findPackageJsonSync } = require('@contrast/find-package-json');
|
|
25
26
|
|
|
26
27
|
/**
|
|
@@ -35,10 +36,8 @@ module.exports = function (core) {
|
|
|
35
36
|
const { app_root, cmd_ignore_list, exclusive_entrypoint } = config.agent.node;
|
|
36
37
|
|
|
37
38
|
checkPreLoadFlag();
|
|
38
|
-
const cmd = getCommand();
|
|
39
39
|
const pkgInfo = getPackageInfo();
|
|
40
|
-
const
|
|
41
|
-
const name = getApplicationName();
|
|
40
|
+
const { cmd, indexFile } = parseArgv();
|
|
42
41
|
|
|
43
42
|
core.appInfo = {
|
|
44
43
|
// dedupe this? - it's already in systemInfo
|
|
@@ -50,15 +49,15 @@ module.exports = function (core) {
|
|
|
50
49
|
},
|
|
51
50
|
cmd,
|
|
52
51
|
hostname: os.hostname(),
|
|
53
|
-
indexFile
|
|
52
|
+
indexFile,
|
|
54
53
|
path: pkgInfo.packageFile,
|
|
55
54
|
pkg: pkgInfo.packageData,
|
|
56
|
-
name,
|
|
55
|
+
name: getApplicationName(),
|
|
57
56
|
app_dir: pkgInfo.dir,
|
|
58
|
-
version: config.application.version
|
|
57
|
+
version: config.application.version ?? pkgInfo.packageData.version,
|
|
59
58
|
serverVersion: config.server.version,
|
|
60
59
|
nodeVersion: process.version,
|
|
61
|
-
appPath: config.application.path
|
|
60
|
+
appPath: config.application.path ?? pkgInfo.dir,
|
|
62
61
|
serverName: config.server.name,
|
|
63
62
|
serverType: config.server.type,
|
|
64
63
|
serverEnvironment: config.server.environment,
|
|
@@ -76,13 +75,12 @@ module.exports = function (core) {
|
|
|
76
75
|
} = process;
|
|
77
76
|
[
|
|
78
77
|
{ range: '>=18.19.0', flags: ['--import'] },
|
|
79
|
-
{ range: '>=16.17.0 <18.19.0', flags: ['--loader'] }
|
|
80
|
-
{ range: '<16.17.0', flags: ['-r', '--require'] }
|
|
78
|
+
{ range: '>=16.17.0 <18.19.0', flags: ['--loader'] }
|
|
81
79
|
].forEach(({ range, flags }) => {
|
|
82
80
|
if (
|
|
83
81
|
semver.satisfies(version, range) &&
|
|
84
82
|
(execArgv.some((el, idx) => el === '@contrast/agent' && !flags.includes(execArgv[idx - 1])) ||
|
|
85
|
-
|
|
83
|
+
NODE_OPTIONS?.includes('@contrast/agent') && !flags.some(flag => NODE_OPTIONS.includes(flag)))
|
|
86
84
|
) {
|
|
87
85
|
logger.warn(
|
|
88
86
|
'For Node LTS %s, use %s command to run the agent. See: https://docs.contrastsecurity.com/en/install-node-js.html',
|
|
@@ -94,84 +92,69 @@ module.exports = function (core) {
|
|
|
94
92
|
}
|
|
95
93
|
|
|
96
94
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
95
|
+
* Parse and process the process.argv array to construct `appInfo.cmd` and
|
|
96
|
+
* resolve the application entry point.
|
|
97
|
+
* Throws if the running process should not be instrumented per the
|
|
98
|
+
* `cmd_ignore_list` and `exclusive_entrypoint` config options.
|
|
101
99
|
* @throws {IntentionalError} when command should be is ignored by Contrast
|
|
100
|
+
* @returns {{ cmd: string, indexFile: string }} stringified command and resolved entrypoint file
|
|
102
101
|
*/
|
|
103
|
-
function
|
|
104
|
-
const args = [process.argv0, ...process.argv]
|
|
105
|
-
|
|
106
|
-
const message = 'application command matches cmd_ignore_list config option';
|
|
107
|
-
|
|
108
|
-
if (cmd_ignore_list) {
|
|
109
|
-
let err;
|
|
110
|
-
for (const ignoreCommand of cmd_ignore_list) {
|
|
111
|
-
|
|
112
|
-
if (ignoreCommand === 'npm*') {
|
|
113
|
-
if (cmd.includes('npm ')) err = new IntentionalError(message);
|
|
114
|
-
} else {
|
|
115
|
-
if (cmd.includes(ignoreCommand)) err = new IntentionalError(message);
|
|
116
|
-
}
|
|
117
|
-
if (err) {
|
|
118
|
-
logger.trace({ cmd_ignore_list, cmd }, message);
|
|
119
|
-
throw err;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
return cmd;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Returns the entrypoint file. If none is found, or the one discovered doesn't match the
|
|
129
|
-
* config's `agent.node.exclusive_entrypoint` value, this will throw.
|
|
130
|
-
* @returns {string} entrypoint file name
|
|
131
|
-
* @throws {Error|IntentionalError} if no entrypoint is found or we're supposed to ignore the app
|
|
132
|
-
*/
|
|
133
|
-
function getEntrypoint() {
|
|
134
|
-
let entrypoint = process.argv[1];
|
|
135
|
-
const { packageData } = pkgInfo;
|
|
102
|
+
function parseArgv() {
|
|
103
|
+
const args = new Set([process.argv0, ...process.argv]);
|
|
104
|
+
let indexFile = path.normalize(process.argv[1]);
|
|
136
105
|
|
|
137
106
|
try {
|
|
138
|
-
if (
|
|
139
|
-
const main = path.join(
|
|
107
|
+
if (indexFile && fs.statSync(indexFile).isDirectory()) {
|
|
108
|
+
const main = path.join(indexFile, pkgInfo.packageData.main ?? 'index.js');
|
|
140
109
|
try {
|
|
141
110
|
if (fs.statSync(main)) {
|
|
142
|
-
|
|
111
|
+
indexFile = main;
|
|
143
112
|
}
|
|
144
113
|
} catch (err) {
|
|
145
|
-
|
|
114
|
+
indexFile = null;
|
|
146
115
|
}
|
|
147
116
|
}
|
|
148
|
-
} catch (err) {
|
|
117
|
+
} catch (err) {
|
|
118
|
+
// use default process.argv[1]
|
|
119
|
+
}
|
|
149
120
|
|
|
150
|
-
if (!
|
|
121
|
+
if (!indexFile) {
|
|
151
122
|
logger.error('no entrypoint found for application');
|
|
152
123
|
throw new Error('No entrypoint found');
|
|
153
124
|
}
|
|
154
125
|
|
|
126
|
+
let isExclusiveEntrypoint = false;
|
|
155
127
|
if (exclusive_entrypoint) {
|
|
156
|
-
const expectedEntrypoint = path.resolve(app_root
|
|
157
|
-
if (
|
|
158
|
-
const message = 'application does not match exclusive_entrypoint config option';
|
|
159
|
-
logger.
|
|
160
|
-
entrypoint,
|
|
161
|
-
exclusive_entrypoint: expectedEntrypoint,
|
|
162
|
-
}, message);
|
|
128
|
+
const expectedEntrypoint = path.resolve(app_root ?? process.cwd(), exclusive_entrypoint);
|
|
129
|
+
if (indexFile !== expectedEntrypoint) {
|
|
130
|
+
const message = 'Skipping instrumentation because application does not match the `exclusive_entrypoint` config option.';
|
|
131
|
+
logger.info({ entrypoint: indexFile, exclusive_entrypoint: expectedEntrypoint }, message);
|
|
163
132
|
throw new IntentionalError(message);
|
|
164
133
|
}
|
|
134
|
+
isExclusiveEntrypoint = true;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const cmd = process.argv.map((arg) => path.basename(arg)).join(' ');
|
|
138
|
+
|
|
139
|
+
if (!isExclusiveEntrypoint) {
|
|
140
|
+
for (const arg of args) {
|
|
141
|
+
for (const pattern of cmd_ignore_list) {
|
|
142
|
+
if (minimatch(arg, pattern, { dot: true })) {
|
|
143
|
+
const message = 'Skipping instrumentation because application command matches the `cmd_ignore_list` config option.';
|
|
144
|
+
logger.info({ cmd_ignore_list, cmd, arg, pattern }, message);
|
|
145
|
+
throw new IntentionalError(message);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
165
149
|
}
|
|
166
150
|
|
|
167
|
-
return
|
|
151
|
+
return { cmd, indexFile };
|
|
168
152
|
}
|
|
169
153
|
|
|
170
154
|
/**
|
|
171
155
|
* Will try to read the `package.json` file of the app. This will use find-pacakge-json
|
|
172
156
|
* starting first from entrypoint, then from CWD.
|
|
173
157
|
* NOTE: If the `app_root` value is specified, this will check only there and then throw if not found.
|
|
174
|
-
* @param {string} entrypoint app entrypoint
|
|
175
158
|
* @returns {PackageInfo} dir, packageData, and packageFile
|
|
176
159
|
* @throws {Error} if package can't be found or parsed
|
|
177
160
|
*/
|
|
@@ -196,15 +179,14 @@ module.exports = function (core) {
|
|
|
196
179
|
packageFile = process.env.npm_package_json ?? findPackageJsonSync({ cwd: dir });
|
|
197
180
|
packageData = require(packageFile);
|
|
198
181
|
break;
|
|
199
|
-
} catch (err) {
|
|
182
|
+
} catch (err) {
|
|
183
|
+
// packageData stays undefined, throws below.
|
|
184
|
+
}
|
|
200
185
|
}
|
|
201
186
|
|
|
202
187
|
if (!packageData) {
|
|
203
|
-
const message =
|
|
204
|
-
logger.error({
|
|
205
|
-
app_root,
|
|
206
|
-
paths: Array.from(dirs),
|
|
207
|
-
}, message);
|
|
188
|
+
const message = "Unable to locate application's package.json";
|
|
189
|
+
logger.error({ app_root, paths: Array.from(dirs) }, message);
|
|
208
190
|
throw new Error(message);
|
|
209
191
|
}
|
|
210
192
|
|
|
@@ -220,12 +202,9 @@ module.exports = function (core) {
|
|
|
220
202
|
* @throws {Error} if there is no name identified
|
|
221
203
|
*/
|
|
222
204
|
function getApplicationName() {
|
|
223
|
-
const name = config.application.name
|
|
205
|
+
const name = config.application.name ?? pkgInfo.packageData.name;
|
|
224
206
|
if (!name) {
|
|
225
|
-
throw new Error(
|
|
226
|
-
'The application\'s name was not identified. ' +
|
|
227
|
-
'Please provide name in package.json field or with the agent\'s application.name config option.'
|
|
228
|
-
);
|
|
207
|
+
throw new Error("The application's name was not identified. Please provide `name` in package.json field or with the agent's `application.name` config option.");
|
|
229
208
|
}
|
|
230
209
|
|
|
231
210
|
return name;
|
|
@@ -44,9 +44,25 @@ export interface Core {
|
|
|
44
44
|
|
|
45
45
|
messages: Messages;
|
|
46
46
|
|
|
47
|
-
sensitiveDataMasking:
|
|
47
|
+
sensitiveDataMasking: SensitiveDataMasking;
|
|
48
48
|
|
|
49
49
|
getSystemInfo(): Promise<SystemInfo>;
|
|
50
50
|
getBuildId(): Promse<number | void>;
|
|
51
51
|
Perf: any;
|
|
52
52
|
}
|
|
53
|
+
|
|
54
|
+
export interface SensitiveDataMasking {
|
|
55
|
+
policy: any;
|
|
56
|
+
idMap: Map<Set, string>;
|
|
57
|
+
keywordSets: Set<string>[];
|
|
58
|
+
maskHttpBody: boolean;
|
|
59
|
+
maskAttackVector: boolean;
|
|
60
|
+
createMasker(): Masker;
|
|
61
|
+
getRedactedText(key: string, value: string): string;
|
|
62
|
+
traverseAndMask(target: Record<string, string>, p: Masker | Set<string>): void;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface Masker {
|
|
66
|
+
unmasked?: Set<string>;
|
|
67
|
+
getMaskedValue(key: string, value: string): string;
|
|
68
|
+
}
|