@contrast/agent-bundle 5.42.0 → 5.46.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.
- 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/handler.js +21 -24
- 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 +11 -22
- package/node_modules/@contrast/assess/lib/index.js +1 -1
- package/node_modules/@contrast/assess/lib/make-source-context.js +5 -10
- package/node_modules/@contrast/assess/lib/policy.js +400 -0
- package/node_modules/@contrast/assess/lib/response-scanning/handlers/index.js +10 -14
- package/node_modules/@contrast/assess/lib/response-scanning/install/http.js +0 -12
- package/node_modules/@contrast/assess/lib/session-configuration/handlers.js +1 -1
- 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 +37 -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 +269 -238
- 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/assert/strict.d.ts +105 -2
- package/node_modules/@types/node/assert.d.ts +119 -95
- 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 +161 -17
- package/node_modules/@types/node/dns.d.ts +5 -0
- package/node_modules/@types/node/events.d.ts +79 -33
- package/node_modules/@types/node/fs/promises.d.ts +41 -26
- package/node_modules/@types/node/fs.d.ts +276 -35
- package/node_modules/@types/node/globals.d.ts +148 -347
- package/node_modules/@types/node/http.d.ts +57 -8
- 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 +106 -23
- 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 +25 -6
- package/node_modules/@types/node/util.d.ts +11 -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} +49 -51
- 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 +84 -50
- package/node_modules/@types/node/zlib.d.ts +6 -0
- 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/agent.d.ts +0 -4
- package/node_modules/undici-types/client.d.ts +0 -2
- package/node_modules/undici-types/diagnostics-channel.d.ts +9 -0
- package/node_modules/undici-types/dispatcher.d.ts +3 -8
- 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/h2c-client.d.ts +0 -2
- package/node_modules/undici-types/handlers.d.ts +1 -1
- package/node_modules/undici-types/index.d.ts +3 -1
- package/node_modules/undici-types/mock-client.d.ts +2 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +2 -1
- 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/snapshot-agent.d.ts +107 -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/assess/lib/get-policy.js +0 -336
- 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
|
@@ -1,336 +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 {
|
|
19
|
-
Event,
|
|
20
|
-
ExclusionType,
|
|
21
|
-
InputType,
|
|
22
|
-
Rule,
|
|
23
|
-
ResponseScanningRule,
|
|
24
|
-
SessionConfigurationRule,
|
|
25
|
-
primordials: { ArrayPrototypeJoin, RegExpPrototypeTest }
|
|
26
|
-
} = require('@contrast/common');
|
|
27
|
-
|
|
28
|
-
const ASSESS_RULES = Object.values({
|
|
29
|
-
...Rule,
|
|
30
|
-
...ResponseScanningRule,
|
|
31
|
-
...SessionConfigurationRule,
|
|
32
|
-
});
|
|
33
|
-
const BROAD_INPUT_EXCLUSION_TYPES = [
|
|
34
|
-
ExclusionType.BODY,
|
|
35
|
-
ExclusionType.QUERYSTRING
|
|
36
|
-
];
|
|
37
|
-
const NAMED_INPUT_EXCLUSION_TYPES = [
|
|
38
|
-
ExclusionType.COOKIE,
|
|
39
|
-
ExclusionType.HEADER,
|
|
40
|
-
ExclusionType.PARAMETER
|
|
41
|
-
];
|
|
42
|
-
const BODY_TYPES = [
|
|
43
|
-
InputType.BODY,
|
|
44
|
-
InputType.JSON_VALUE,
|
|
45
|
-
InputType.JSON_ARRAYED_VALUE,
|
|
46
|
-
InputType.MULTIPART_CONTENT_TYPE,
|
|
47
|
-
InputType.MULTIPART_FIELD_NAME,
|
|
48
|
-
InputType.MULTIPART_NAME,
|
|
49
|
-
InputType.MULTIPART_VALUE,
|
|
50
|
-
];
|
|
51
|
-
const DISABLED_INPUT_POLICY = { track: false };
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* @param {{
|
|
55
|
-
* config: import('@contrast/config').Config,
|
|
56
|
-
* logger: import('@contrast/logger').Logger,
|
|
57
|
-
* messages: import('@contrast/common').Messages,
|
|
58
|
-
* }} core
|
|
59
|
-
* @returns {import('@contrast/common').Installable}
|
|
60
|
-
*/
|
|
61
|
-
module.exports = function assess(core) {
|
|
62
|
-
const { config, logger, messages } = core;
|
|
63
|
-
|
|
64
|
-
const globalPolicy = {
|
|
65
|
-
// by default all rules are enabled
|
|
66
|
-
enabledRules: new Set(ASSESS_RULES),
|
|
67
|
-
exclusionMap: new Map([
|
|
68
|
-
[ExclusionType.BODY, []],
|
|
69
|
-
[ExclusionType.COOKIE, []],
|
|
70
|
-
[ExclusionType.HEADER, []],
|
|
71
|
-
[ExclusionType.PARAMETER, []],
|
|
72
|
-
[ExclusionType.QUERYSTRING, []],
|
|
73
|
-
[ExclusionType.URL, []],
|
|
74
|
-
]),
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Subscribe to settings updates and modify global policy accordingly.
|
|
79
|
-
*/
|
|
80
|
-
messages.on(Event.SERVER_SETTINGS_UPDATE, (msg) => {
|
|
81
|
-
if (!config.getEffectiveValue('assess.enable')) return;
|
|
82
|
-
|
|
83
|
-
if (msg.assess) {
|
|
84
|
-
for (const ruleId of ASSESS_RULES) {
|
|
85
|
-
const enable = msg.assess[ruleId]?.enable;
|
|
86
|
-
if (enable === true) {
|
|
87
|
-
globalPolicy.enabledRules.add(ruleId);
|
|
88
|
-
if (ruleId === Rule.NOSQL_INJECTION) globalPolicy.enabledRules.add(Rule.NOSQL_INJECTION_MONGO);
|
|
89
|
-
} else if (enable === false) {
|
|
90
|
-
globalPolicy.enabledRules.delete(ruleId);
|
|
91
|
-
if (ruleId === Rule.NOSQL_INJECTION) globalPolicy.enabledRules.delete(Rule.NOSQL_INJECTION_MONGO);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
logger.info({ enabledRules: Array.from(globalPolicy.enabledRules) }, 'Assess policy enabled rules updated');
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (msg.exclusions) {
|
|
98
|
-
const rawDtmList = [
|
|
99
|
-
// todo: NODE-3281 input exclusions
|
|
100
|
-
...(msg?.exclusions?.input || []),
|
|
101
|
-
...(msg?.exclusions?.url || []),
|
|
102
|
-
].filter((exclusion) => exclusion?.modes?.includes?.('assess'));
|
|
103
|
-
|
|
104
|
-
// reset global exclusion state
|
|
105
|
-
for (const type of Object.values(ExclusionType)) {
|
|
106
|
-
globalPolicy.exclusionMap.get(type).length = 0;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if (!rawDtmList.length) return;
|
|
110
|
-
|
|
111
|
-
for (const dtm of rawDtmList) {
|
|
112
|
-
// normalize different dtm types
|
|
113
|
-
dtm.type = dtm.type || 'URL';
|
|
114
|
-
const { type } = dtm;
|
|
115
|
-
const key = ExclusionType[type];
|
|
116
|
-
// defensive code against unanticipated DTM values
|
|
117
|
-
if (key) {
|
|
118
|
-
const Ctor = dtm.type === ExclusionType.URL ? UrlExclusion : InputExclusion;
|
|
119
|
-
globalPolicy.exclusionMap.get(dtm.type).push(new Ctor(dtm));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
logger.info({
|
|
124
|
-
exclusions: Object.fromEntries(globalPolicy.exclusionMap)
|
|
125
|
-
}, 'Assess exclusions updated (%s total)', rawDtmList.length);
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* Generates the policy for the current request. We return copy of the global policy
|
|
131
|
-
* to avoid inconsistent behavior if policy is updated during request handling. In
|
|
132
|
-
* addition, the request policy is altered to account for any URL or Input exclusions.
|
|
133
|
-
* @param {string} uriPath
|
|
134
|
-
*/
|
|
135
|
-
return core.assess.getPolicy = function getPolicy({ uriPath } = {}) {
|
|
136
|
-
const _enabledRules = new Set(globalPolicy.enabledRules);
|
|
137
|
-
const exclusionState = {
|
|
138
|
-
// types that can be disabled broadly
|
|
139
|
-
[ExclusionType.BODY]: { track: true, excludedRules: new Set() },
|
|
140
|
-
[ExclusionType.QUERYSTRING]: { track: true, excludedRules: new Set() },
|
|
141
|
-
// other types we check by name. parameter applies to body and query params
|
|
142
|
-
[ExclusionType.COOKIE]: [],
|
|
143
|
-
[ExclusionType.HEADER]: [],
|
|
144
|
-
[ExclusionType.PARAMETER]: [],
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
// Evaluate URL exclusions.
|
|
148
|
-
// If one matches and applies to all rules, we return `null` for the policy value, which
|
|
149
|
-
// will disable assess for the request (via getSourceContext()). If specific rules are
|
|
150
|
-
// disabled, we remove them from the request policy's set of enabled rules.
|
|
151
|
-
for (const urlExclusion of globalPolicy.exclusionMap.get(ExclusionType.URL)) {
|
|
152
|
-
if (urlExclusion.matchesUriPath(uriPath)) {
|
|
153
|
-
if (!urlExclusion.rules?.size) {
|
|
154
|
-
core.logger.debug({
|
|
155
|
-
name: urlExclusion.name
|
|
156
|
-
}, 'All Assess rules have been disabled by URL exclusion');
|
|
157
|
-
return null;
|
|
158
|
-
} else {
|
|
159
|
-
for (const ruleId of urlExclusion.rules) {
|
|
160
|
-
_enabledRules.delete(ruleId);
|
|
161
|
-
}
|
|
162
|
-
core.logger.debug({
|
|
163
|
-
name: urlExclusion.name,
|
|
164
|
-
rules: Array.from(urlExclusion.rules),
|
|
165
|
-
}, 'Assess rules disabled by URL exclusion');
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// Process input exclusions that apply broadly: BODY, QUERYSTRING
|
|
171
|
-
for (const type of BROAD_INPUT_EXCLUSION_TYPES) {
|
|
172
|
-
const _policy = exclusionState[type];
|
|
173
|
-
for (const exclusion of globalPolicy.exclusionMap.get(type)) {
|
|
174
|
-
if (exclusion.matchesUriPath(uriPath)) {
|
|
175
|
-
if (exclusion.rules.size) {
|
|
176
|
-
for (const ruleId of exclusion.rules) {
|
|
177
|
-
_policy.excludedRules.add(ruleId);
|
|
178
|
-
}
|
|
179
|
-
} else {
|
|
180
|
-
_policy.track = false;
|
|
181
|
-
_policy.excludedRules.clear();
|
|
182
|
-
break;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
// Filter input exclusions that will be used to get named input
|
|
188
|
-
// policies: COOKIE, HEADER, PARAMETER
|
|
189
|
-
for (const type of NAMED_INPUT_EXCLUSION_TYPES) {
|
|
190
|
-
for (const exclusion of globalPolicy.exclusionMap.get(type)) {
|
|
191
|
-
if (exclusion.matchesUriPath(uriPath)) {
|
|
192
|
-
exclusionState[type].push(exclusion);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
return {
|
|
198
|
-
/**
|
|
199
|
-
* Enabled rules filtered by any applicable URL exclusions
|
|
200
|
-
*/
|
|
201
|
-
enabledRules: _enabledRules,
|
|
202
|
-
/**
|
|
203
|
-
* Used by source handler to get policy information for specific named inputs.
|
|
204
|
-
* @param {InputType} inputType
|
|
205
|
-
* @param {string} [fieldName]
|
|
206
|
-
* @returns {InputPolicy}
|
|
207
|
-
*/
|
|
208
|
-
getInputPolicy(inputType, fieldName) {
|
|
209
|
-
let exclusionsByType;
|
|
210
|
-
const inputPolicy = { track: true, excludedRules: new Set() };
|
|
211
|
-
|
|
212
|
-
const isBody = BODY_TYPES.includes(inputType);
|
|
213
|
-
|
|
214
|
-
if (isBody || inputType === InputType.QUERYSTRING) {
|
|
215
|
-
// these can be disabled broadly
|
|
216
|
-
const _policy = exclusionState[isBody ? ExclusionType.BODY : ExclusionType.QUERYSTRING];
|
|
217
|
-
if (!_policy.track) {
|
|
218
|
-
return DISABLED_INPUT_POLICY;
|
|
219
|
-
}
|
|
220
|
-
for (const ruleId of _policy.excludedRules) {
|
|
221
|
-
inputPolicy.excludedRules.add(ruleId);
|
|
222
|
-
}
|
|
223
|
-
exclusionsByType = exclusionState[ExclusionType.PARAMETER];
|
|
224
|
-
} else if (inputType === InputType.URL_PARAMETER) {
|
|
225
|
-
exclusionsByType = exclusionState[ExclusionType.PARAMETER];
|
|
226
|
-
} else if (inputType === InputType.HEADER) {
|
|
227
|
-
exclusionsByType = exclusionState[ExclusionType.HEADER];
|
|
228
|
-
} else if ([
|
|
229
|
-
InputType.COOKIE_NAME,
|
|
230
|
-
InputType.COOKIE_VALUE
|
|
231
|
-
].includes(inputType)) {
|
|
232
|
-
exclusionsByType = exclusionState[ExclusionType.COOKIE];
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
if (!exclusionsByType) {
|
|
236
|
-
return inputPolicy;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
// check input name
|
|
240
|
-
for (const exclusion of exclusionsByType) {
|
|
241
|
-
if (exclusion.matchesInputName(fieldName)) {
|
|
242
|
-
if (exclusion.rules.size) {
|
|
243
|
-
for (const ruleId of exclusion.rules) {
|
|
244
|
-
inputPolicy.excludedRules.add(ruleId);
|
|
245
|
-
}
|
|
246
|
-
} else {
|
|
247
|
-
return DISABLED_INPUT_POLICY;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
return inputPolicy;
|
|
253
|
-
},
|
|
254
|
-
};
|
|
255
|
-
};
|
|
256
|
-
};
|
|
257
|
-
|
|
258
|
-
/**
|
|
259
|
-
* @typedef InputPolicy
|
|
260
|
-
* @property {boolean} track
|
|
261
|
-
* @property {Set<Rule>} excludedRules
|
|
262
|
-
*/
|
|
263
|
-
|
|
264
|
-
class UrlExclusion {
|
|
265
|
-
constructor(dtm) {
|
|
266
|
-
this._urlRegex = null;
|
|
267
|
-
this._urls = new Set();
|
|
268
|
-
this.name = dtm.name;
|
|
269
|
-
this.type = ExclusionType[dtm.type];
|
|
270
|
-
this.rules = new Set(dtm.assess_rules);
|
|
271
|
-
|
|
272
|
-
if (dtm.urls.length) {
|
|
273
|
-
const regexSegments = [];
|
|
274
|
-
for (const url of dtm.urls) {
|
|
275
|
-
if (shouldBeRegExp(url)) {
|
|
276
|
-
regexSegments.push(url);
|
|
277
|
-
} else {
|
|
278
|
-
this._urls.add(url);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
if (regexSegments.length) {
|
|
282
|
-
this._urlRegex = new RegExp(`^${ArrayPrototypeJoin.call(regexSegments, '|')}$`);
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* Checks whether the current URI path matches any of the exclusion's URL values.
|
|
289
|
-
* Exclusions that don't match for the current request will not be enabled. The
|
|
290
|
-
* interpretation of the DTM is that if its urls list is empty, then that means
|
|
291
|
-
* it should match all requestss (can be the case for input exclusions).
|
|
292
|
-
* @param {string} uriPath uri to check
|
|
293
|
-
* @returns {boolean}
|
|
294
|
-
*/
|
|
295
|
-
matchesUriPath(uriPath) {
|
|
296
|
-
return (!this._urlRegex && !this._urls.size) ||
|
|
297
|
-
this._urls.has(uriPath) ||
|
|
298
|
-
!!this._urlRegex?.test?.(uriPath);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
class InputExclusion extends UrlExclusion {
|
|
303
|
-
constructor(dtm) {
|
|
304
|
-
super(dtm);
|
|
305
|
-
this._inputNameRegex = null;
|
|
306
|
-
this._inputName = null;
|
|
307
|
-
|
|
308
|
-
// dtm.name value is null for BODY and QUERYSTRING types
|
|
309
|
-
if (dtm.name) {
|
|
310
|
-
if (shouldBeRegExp(dtm.name)) {
|
|
311
|
-
this._inputNameRegex = new RegExp(`^${dtm.name}$`);
|
|
312
|
-
} else {
|
|
313
|
-
this._inputName = dtm.name;
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
/**
|
|
319
|
-
* Checks if the provided name matches the value from the exclusion dtm.
|
|
320
|
-
* @param {string} name field name being evaluated
|
|
321
|
-
* @returns {boolean}
|
|
322
|
-
*/
|
|
323
|
-
matchesInputName(name) {
|
|
324
|
-
// BODY and QUERYSTRING always match since they apply broadly
|
|
325
|
-
if (!this._inputName && !this._inputNameRegex) return true;
|
|
326
|
-
return this._inputNameRegex ? RegExpPrototypeTest.call(this._inputNameRegex, name) : this._inputName === name;
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
function shouldBeRegExp(str) {
|
|
331
|
-
return str.indexOf('*') > 0 ||
|
|
332
|
-
str.indexOf('.') > 0 ||
|
|
333
|
-
str.indexOf('+') > 0 ||
|
|
334
|
-
str.indexOf('?') > 0 ||
|
|
335
|
-
str.indexOf('\\') > 0;
|
|
336
|
-
}
|
|
Binary file
|
|
Binary file
|
package/node_modules/@contrast/code-events/prebuilds/linux-x64/@contrast+code-events.abi93.musl.node
DELETED
|
Binary file
|
package/node_modules/@contrast/code-events/prebuilds/win32-x64/@contrast+code-events.abi93.node
DELETED
|
Binary file
|
|
@@ -1,111 +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 { URLSearchParams } = require('url');
|
|
19
|
-
const { Event, primordials: { StringPrototypeReplace } } = require('@contrast/common');
|
|
20
|
-
|
|
21
|
-
const { CONTRAST_REDACTED } = require('./constants');
|
|
22
|
-
|
|
23
|
-
module.exports = function (core) {
|
|
24
|
-
const {
|
|
25
|
-
messages,
|
|
26
|
-
logger,
|
|
27
|
-
sensitiveDataMasking: { policy, getRedactedText, traverseAndMask },
|
|
28
|
-
} = core;
|
|
29
|
-
|
|
30
|
-
messages.on(Event.PROTECT, (store) => {
|
|
31
|
-
if (!store.protect || !policy.keywordSets.length || !store.sourceInfo) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
logger.trace('masking sensitive fields in %s message', Event.PROTECT);
|
|
36
|
-
|
|
37
|
-
const unmasked = policy.maskAttackVector ? new Set() : undefined;
|
|
38
|
-
if (policy.maskHttpBody) {
|
|
39
|
-
store.protect.parsedBody = `${CONTRAST_REDACTED}-body`;
|
|
40
|
-
} else {
|
|
41
|
-
traverseAndMask(store.protect?.parsedBody, unmasked);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
traverseAndMask(store.protect?.parsedCookies, unmasked);
|
|
45
|
-
traverseAndMask(store.protect?.parsedQuery, unmasked);
|
|
46
|
-
|
|
47
|
-
// Do parsed URL path params and urlPath together
|
|
48
|
-
const params = store.protect?.parsedParams;
|
|
49
|
-
if (params) {
|
|
50
|
-
for (const [key, value] of Object.entries(params)) {
|
|
51
|
-
const redactedText = getRedactedText(key);
|
|
52
|
-
if (redactedText) {
|
|
53
|
-
const encoded = encodeURIComponent(value);
|
|
54
|
-
store.sourceInfo.uriPath = StringPrototypeReplace.call(
|
|
55
|
-
store.sourceInfo.uriPath,
|
|
56
|
-
encoded,
|
|
57
|
-
redactedText
|
|
58
|
-
);
|
|
59
|
-
store.protect.parsedParams[key] = redactedText;
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// raw headers
|
|
65
|
-
const headers = store.sourceInfo.rawHeaders;
|
|
66
|
-
for (let i = 0; i <= headers.length - 2; i += 2) {
|
|
67
|
-
const key = headers[i];
|
|
68
|
-
|
|
69
|
-
const redactedText = getRedactedText(key);
|
|
70
|
-
if (redactedText) {
|
|
71
|
-
headers[i + 1] = redactedText;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// raw queries
|
|
76
|
-
if (store.sourceInfo?.queries) {
|
|
77
|
-
const searchParams = new URLSearchParams(store.sourceInfo.queries);
|
|
78
|
-
for (const [key] of searchParams) {
|
|
79
|
-
const redactedText = getRedactedText(key);
|
|
80
|
-
if (redactedText) {
|
|
81
|
-
searchParams.set(key, redactedText);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
store.sourceInfo.queries = searchParams.toString();
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
if (policy.maskAttackVector) {
|
|
88
|
-
// attack values
|
|
89
|
-
const inputAnalysis = Object.entries(store.protect?.resultsMap);
|
|
90
|
-
for (const [, results] of inputAnalysis) {
|
|
91
|
-
for (const result of results) {
|
|
92
|
-
const redactedText = getRedactedText(result.key);
|
|
93
|
-
if (result.exploitMetadata.length) {
|
|
94
|
-
result.exploitMetadata.forEach((exploit) => {
|
|
95
|
-
unmasked.forEach((val) => {
|
|
96
|
-
exploit.sinkContext.value = StringPrototypeReplace.call(
|
|
97
|
-
exploit.sinkContext.value,
|
|
98
|
-
val,
|
|
99
|
-
'contrast-redacted-vector'
|
|
100
|
-
);
|
|
101
|
-
});
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
if (redactedText) {
|
|
105
|
-
result.value = redactedText;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
};
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/node_modules/@contrast/distringuish/prebuilds/win32-x64/@contrast+distringuish.abi93.node
DELETED
|
Binary file
|
|
Binary file
|