dd-trace 5.136.0 → 5.138.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 +3 -0
- package/ci/cypress/support.js +2 -1
- package/ci/vitest-no-worker-init-node-setup.mjs +2 -1
- package/ci/vitest-no-worker-init-runner-setup.mjs +2 -1
- package/ci/vitest-no-worker-init-setup.mjs +729 -724
- package/ci/vitest-no-worker-init-v5-setup.mjs +2 -1
- package/index.d.ts +56 -0
- package/initialize.mjs +5 -3
- package/package.json +36 -32
- package/packages/datadog-esbuild/index.js +8 -15
- package/packages/datadog-esbuild/src/log.js +2 -29
- package/packages/datadog-instrumentations/src/ai.js +88 -122
- package/packages/datadog-instrumentations/src/aws-lambda.js +9 -0
- package/packages/datadog-instrumentations/src/cypress-config.js +20 -9
- package/packages/datadog-instrumentations/src/helpers/bundler-esm-exports.js +23 -1
- package/packages/datadog-instrumentations/src/helpers/bundler-log.js +38 -0
- package/packages/datadog-instrumentations/src/helpers/bundler-transform.js +9 -6
- package/packages/datadog-instrumentations/src/helpers/fetch.js +51 -6
- package/packages/datadog-instrumentations/src/helpers/hooks.js +0 -1
- package/packages/datadog-instrumentations/src/helpers/instrument.js +1 -3
- package/packages/datadog-instrumentations/src/helpers/rewriter/index.js +6 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentation-registry.js +12 -1
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/ai.js +2 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/graphql-jit.js +5 -3
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/modelcontextprotocol-client.js +30 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/modelcontextprotocol-server.js +23 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/next.js +21 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/postgres.js +33 -4
- package/packages/datadog-instrumentations/src/helpers/rewriter/target-patterns.json +30 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/targets.json +6 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/transforms/postgres.js +122 -0
- package/packages/datadog-instrumentations/src/microgateway-core.js +1 -2
- package/packages/datadog-instrumentations/src/modelcontextprotocol-client.js +21 -0
- package/packages/datadog-instrumentations/src/modelcontextprotocol-sdk.js +32 -2
- package/packages/datadog-instrumentations/src/modelcontextprotocol-server.js +43 -0
- package/packages/datadog-instrumentations/src/next.js +184 -20
- package/packages/datadog-instrumentations/src/path-to-regexp.js +11 -11
- package/packages/datadog-instrumentations/src/router.js +52 -13
- package/packages/datadog-instrumentations/src/vitest-main-no-worker-init.js +1 -1
- package/packages/datadog-instrumentations/src/vitest-main.js +10 -2
- package/packages/datadog-plugin-aws-lambda/src/arn.js +41 -0
- package/packages/datadog-plugin-aws-lambda/src/context/events.js +167 -0
- package/packages/datadog-plugin-aws-lambda/src/context/extractor.js +153 -0
- package/packages/datadog-plugin-aws-lambda/src/context/http.js +50 -0
- package/packages/datadog-plugin-aws-lambda/src/context/span-context.js +26 -0
- package/packages/datadog-plugin-aws-lambda/src/context/step-functions.js +142 -0
- package/packages/datadog-plugin-aws-lambda/src/context/types.d.ts +17 -0
- package/packages/datadog-plugin-aws-lambda/src/context/xray.js +67 -0
- package/packages/datadog-plugin-aws-lambda/src/event-type-guards.js +170 -0
- package/packages/datadog-plugin-aws-lambda/src/index.js +52 -4
- package/packages/datadog-plugin-aws-lambda/src/trigger.js +339 -0
- package/packages/datadog-plugin-aws-sdk/src/services/dynamodb.js +7 -0
- package/packages/datadog-plugin-aws-sdk/src/services/kinesis.js +32 -10
- package/packages/datadog-plugin-aws-sdk/src/services/lambda.js +10 -1
- package/packages/datadog-plugin-aws-sdk/src/services/sqs.js +4 -0
- package/packages/datadog-plugin-aws-sdk/src/services/stepfunctions.js +3 -0
- package/packages/datadog-plugin-azure-functions/src/index.js +68 -12
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +30 -4
- package/packages/datadog-plugin-cypress/src/support.mjs +1353 -0
- package/packages/datadog-plugin-express/src/code_origin.js +2 -2
- package/packages/datadog-plugin-fastify/src/code_origin.js +2 -2
- package/packages/datadog-plugin-fetch/src/index.js +7 -0
- package/packages/datadog-plugin-google-cloud-pubsub/src/consumer.js +10 -0
- package/packages/datadog-plugin-google-cloud-pubsub/src/producer.js +2 -0
- package/packages/datadog-plugin-google-cloud-pubsub/src/pubsub-push-subscription.js +7 -0
- package/packages/datadog-plugin-google-cloud-pubsub/src/resource-names.js +24 -0
- package/packages/datadog-plugin-graphql/src/tools/transforms.js +1 -0
- package/packages/datadog-plugin-http/src/client.js +14 -1
- package/packages/datadog-plugin-http/src/server.js +18 -4
- package/packages/datadog-plugin-http2/src/client.js +2 -1
- package/packages/datadog-plugin-modelcontextprotocol-sdk/src/tracing.js +28 -2
- package/packages/datadog-plugin-modelcontextprotocol-sdk/src/utils.js +1 -0
- package/packages/datadog-plugin-mongodb-core/src/query.js +17 -1
- package/packages/datadog-plugin-postgres/src/index.js +118 -41
- package/packages/datadog-plugin-supabase/src/supabase-auth-js-gotrueclient-getuser.js +18 -8
- package/packages/datadog-plugin-supabase/src/supabase-functions-js-functionsclient-invoke.js +49 -13
- package/packages/datadog-plugin-supabase/src/supabase-storage-js-handle-request.js +34 -9
- package/packages/datadog-plugin-vitest/src/index.js +3 -2
- package/packages/datadog-plugin-ws/src/close.js +3 -5
- package/packages/datadog-plugin-ws/src/producer.js +1 -4
- package/packages/datadog-plugin-ws/src/receiver.js +3 -5
- package/packages/datadog-plugin-ws/src/server.js +44 -13
- package/packages/datadog-vite/index.js +537 -0
- package/packages/datadog-vite/src/log.js +5 -0
- package/packages/datadog-webpack/src/log.js +2 -29
- package/packages/dd-trace/src/aiguard/client.js +7 -9
- package/packages/dd-trace/src/aiguard/evaluation.js +7 -2
- package/packages/dd-trace/src/aiguard/index.js +1 -1
- package/packages/dd-trace/src/aiguard/integrations/index.js +6 -5
- package/packages/dd-trace/src/aiguard/messages/utils.js +2 -2
- package/packages/dd-trace/src/aiguard/sdk.js +7 -2
- package/packages/dd-trace/src/appsec/api_security/normalized-route.js +273 -167
- package/packages/dd-trace/src/appsec/blocking/index.js +17 -1
- package/packages/dd-trace/src/appsec/channels.js +8 -0
- package/packages/dd-trace/src/appsec/downstream_requests.js +105 -0
- package/packages/dd-trace/src/appsec/graphql.js +10 -13
- package/packages/dd-trace/src/appsec/handlers/auth.js +1 -3
- package/packages/dd-trace/src/appsec/handlers/http-request.js +60 -65
- package/packages/dd-trace/src/appsec/handlers/http-response.js +61 -7
- package/packages/dd-trace/src/appsec/handlers/payments.js +23 -27
- package/packages/dd-trace/src/appsec/iast/taint-tracking/plugin.js +21 -14
- package/packages/dd-trace/src/appsec/index.js +9 -0
- package/packages/dd-trace/src/appsec/lambda.js +17 -17
- package/packages/dd-trace/src/appsec/rasp/command_injection.js +4 -4
- package/packages/dd-trace/src/appsec/rasp/index.js +64 -3
- package/packages/dd-trace/src/appsec/rasp/lfi.js +2 -2
- package/packages/dd-trace/src/appsec/rasp/sql_injection.js +7 -17
- package/packages/dd-trace/src/appsec/rasp/ssrf.js +80 -16
- package/packages/dd-trace/src/appsec/rasp/utils.js +47 -3
- package/packages/dd-trace/src/appsec/recommended.json +70 -3
- package/packages/dd-trace/src/appsec/reporter.js +9 -0
- package/packages/dd-trace/src/appsec/sdk/set_user.js +3 -3
- package/packages/dd-trace/src/appsec/sdk/track_event.js +4 -4
- package/packages/dd-trace/src/appsec/sdk/user_blocking.js +1 -1
- package/packages/dd-trace/src/appsec/user_tracking.js +6 -8
- package/packages/dd-trace/src/appsec/waf/index.js +65 -6
- package/packages/dd-trace/src/appsec/waf/waf_context_wrapper.js +33 -38
- package/packages/dd-trace/src/appsec/waf/waf_manager.js +18 -2
- package/packages/dd-trace/src/carrier.js +7 -1
- package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/index.js +4 -2
- package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/worker/index.js +31 -19
- package/packages/dd-trace/src/config/generated-config-types.d.ts +14 -5
- package/packages/dd-trace/src/config/index.js +73 -27
- package/packages/dd-trace/src/config/parsers.js +60 -0
- package/packages/dd-trace/src/config/remote-config-layers.js +38 -0
- package/packages/dd-trace/src/config/remote_config.js +2 -1
- package/packages/dd-trace/src/config/supported-configurations.json +41 -13
- package/packages/dd-trace/src/datastreams/fnv.js +27 -0
- package/packages/dd-trace/src/datastreams/http.js +57 -0
- package/packages/dd-trace/src/datastreams/index.js +24 -0
- package/packages/dd-trace/src/datastreams/pathway.js +142 -28
- package/packages/dd-trace/src/datastreams/processor.js +27 -7
- package/packages/dd-trace/src/debugger/config.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/request-options.js +7 -9
- package/packages/dd-trace/src/debugger/devtools_client/send.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/state.js +3 -1
- package/packages/dd-trace/src/debugger/devtools_client/tags.js +1 -1
- package/packages/dd-trace/src/debugger/index.js +2 -2
- package/packages/dd-trace/src/debugger/inspect-segment.js +3 -2
- package/packages/dd-trace/src/debugger/pause-duration-histogram.js +4 -1
- package/packages/dd-trace/src/debugger/probe_sampler.js +39 -17
- package/packages/dd-trace/src/debugger/unsupported-runtime.js +2 -0
- package/packages/dd-trace/src/git_metadata.js +2 -1
- package/packages/dd-trace/src/index.js +6 -3
- package/packages/dd-trace/src/lambda/facade.js +6 -5
- package/packages/dd-trace/src/lambda/handler-paths.js +1 -1
- package/packages/dd-trace/src/llmobs/constants/tags.js +1 -0
- package/packages/dd-trace/src/llmobs/plugins/modelcontextprotocol-sdk/index.js +86 -3
- package/packages/dd-trace/src/llmobs/plugins/modelcontextprotocol-sdk/utils.js +182 -1
- package/packages/dd-trace/src/llmobs/span_processor.js +3 -0
- package/packages/dd-trace/src/llmobs/tagger.js +9 -0
- package/packages/dd-trace/src/noop/span.js +0 -4
- package/packages/dd-trace/src/openfeature/agentless_configuration_source.js +3 -0
- package/packages/dd-trace/src/openfeature/configuration_source.js +20 -0
- package/packages/dd-trace/src/openfeature/flagging_provider.js +17 -0
- package/packages/dd-trace/src/opentelemetry/logs/otlp_transformer.js +2 -1
- package/packages/dd-trace/src/opentelemetry/metrics/otlp_transformer.js +2 -1
- package/packages/dd-trace/src/opentelemetry/otlp/otlp_transformer_base.js +16 -1
- package/packages/dd-trace/src/opentelemetry/trace/index.js +5 -4
- package/packages/dd-trace/src/opentelemetry/trace/otlp_http_trace_exporter.js +10 -6
- package/packages/dd-trace/src/opentelemetry/trace/otlp_transformer.js +42 -26
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +4 -4
- package/packages/dd-trace/src/plugin_manager.js +2 -0
- package/packages/dd-trace/src/plugins/ci_plugin.js +104 -9
- package/packages/dd-trace/src/plugins/index.js +2 -0
- package/packages/dd-trace/src/plugins/util/ci.js +34 -0
- package/packages/dd-trace/src/plugins/util/http-otel-semantics.js +9 -14
- package/packages/dd-trace/src/plugins/util/inferred_proxy.js +3 -5
- package/packages/dd-trace/src/plugins/util/test.js +28 -1
- package/packages/dd-trace/src/plugins/util/url.js +9 -6
- package/packages/dd-trace/src/plugins/util/user-provided-git.js +4 -4
- package/packages/dd-trace/src/process-tags/index.js +1 -1
- package/packages/dd-trace/src/profiler.js +74 -12
- package/packages/dd-trace/src/profiling/profiler.js +30 -2
- package/packages/dd-trace/src/profiling/profilers/space.js +3 -1
- package/packages/dd-trace/src/profiling/profilers/wall.js +4 -4
- package/packages/dd-trace/src/profiling/remote-config.js +354 -0
- package/packages/dd-trace/src/profiling/runtime-capabilities.js +11 -0
- package/packages/dd-trace/src/propagation-hash/index.js +7 -0
- package/packages/dd-trace/src/proxy.js +13 -1
- package/packages/dd-trace/src/register-loader.js +43 -0
- package/register.js +10 -44
- package/register.mjs +27 -0
- package/vendor/dist/@opentelemetry/core/LICENSE +11 -0
- package/vendor/dist/@opentelemetry/core/index.js +1 -1
- package/vite.d.ts +7 -0
- package/vite.js +3 -0
- package/lambda.d.ts +0 -39
- package/lambda.js +0 -3
- package/packages/datadog-plugin-cypress/src/support.js +0 -1348
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "2.2",
|
|
3
3
|
"metadata": {
|
|
4
|
-
"rules_version": "1.
|
|
4
|
+
"rules_version": "1.20.0"
|
|
5
5
|
},
|
|
6
6
|
"rules": [
|
|
7
7
|
{
|
|
@@ -6012,6 +6012,39 @@
|
|
|
6012
6012
|
"keys_only"
|
|
6013
6013
|
]
|
|
6014
6014
|
},
|
|
6015
|
+
{
|
|
6016
|
+
"id": "dog-920-210",
|
|
6017
|
+
"name": "Java4Shell - Attempts to exploit Java's base64 misdecoding (CVE-2026-114938)",
|
|
6018
|
+
"tags": {
|
|
6019
|
+
"type": "exploit_detection",
|
|
6020
|
+
"category": "attack_attempt",
|
|
6021
|
+
"cwe": "416",
|
|
6022
|
+
"capec": "1000/152/242",
|
|
6023
|
+
"confidence": "0",
|
|
6024
|
+
"module": "waf"
|
|
6025
|
+
},
|
|
6026
|
+
"conditions": [
|
|
6027
|
+
{
|
|
6028
|
+
"parameters": {
|
|
6029
|
+
"inputs": [
|
|
6030
|
+
{
|
|
6031
|
+
"address": "server.request.body"
|
|
6032
|
+
},
|
|
6033
|
+
{
|
|
6034
|
+
"address": "server.request.headers.no_cookies"
|
|
6035
|
+
}
|
|
6036
|
+
],
|
|
6037
|
+
"regex": "^(?i:basic\\s+)?(?:(?:[A-Za-z0-9+/]{64})+|(?:[A-Za-z0-9_-]{64})+)(?:[A-Za-z0-9+/_-]?={1,2}|[A-Za-z0-9+/_-]{2}=)$",
|
|
6038
|
+
"options": {
|
|
6039
|
+
"case_sensitive": true,
|
|
6040
|
+
"min_length": 65
|
|
6041
|
+
}
|
|
6042
|
+
},
|
|
6043
|
+
"operator": "match_regex"
|
|
6044
|
+
}
|
|
6045
|
+
],
|
|
6046
|
+
"transformers": []
|
|
6047
|
+
},
|
|
6015
6048
|
{
|
|
6016
6049
|
"id": "dog-931-001",
|
|
6017
6050
|
"name": "RFI: URL Payload to well known RFI target",
|
|
@@ -6233,9 +6266,9 @@
|
|
|
6233
6266
|
"address": "graphql.server.resolver"
|
|
6234
6267
|
}
|
|
6235
6268
|
],
|
|
6236
|
-
"regex": "{[{%]-?(?:(?:\\s*\\d+\\s*[*+-]\\s*\\d+\\s*)|(?:[\\s\\S]*__(?:init|class|globals|builtins|import|mro|bases?|subclasses|dict|getitem|getattribute)__[\\s\\S]*)|(?:[
|
|
6269
|
+
"regex": "{[{%]-?(?:(?:\\s*\\d+\\s*[*+-]\\s*\\d+\\s*)|(?:[\\s\\S]*__(?:init|class|globals|builtins|import|mro|bases?|subclasses|dict|getitem|getattribute)__[\\s\\S]*)|(?:(?:{}|[^}])*\\|\\s*(?:reverse|join|format|attr)\\b[\\s\\S]*))-?[}%]}",
|
|
6237
6270
|
"options": {
|
|
6238
|
-
"case_sensitive":
|
|
6271
|
+
"case_sensitive": true,
|
|
6239
6272
|
"min_length": 7
|
|
6240
6273
|
}
|
|
6241
6274
|
},
|
|
@@ -10095,6 +10128,40 @@
|
|
|
10095
10128
|
],
|
|
10096
10129
|
"transformers": []
|
|
10097
10130
|
},
|
|
10131
|
+
{
|
|
10132
|
+
"id": "ua0-600-71x",
|
|
10133
|
+
"name": "Artex",
|
|
10134
|
+
"tags": {
|
|
10135
|
+
"type": "attack_tool",
|
|
10136
|
+
"category": "attack_attempt",
|
|
10137
|
+
"cwe": "200",
|
|
10138
|
+
"capec": "1000/118/169",
|
|
10139
|
+
"tool_name": "Artex",
|
|
10140
|
+
"confidence": "0",
|
|
10141
|
+
"module": "waf"
|
|
10142
|
+
},
|
|
10143
|
+
"conditions": [
|
|
10144
|
+
{
|
|
10145
|
+
"parameters": {
|
|
10146
|
+
"inputs": [
|
|
10147
|
+
{
|
|
10148
|
+
"address": "server.request.headers.no_cookies",
|
|
10149
|
+
"key_path": [
|
|
10150
|
+
"user-agent"
|
|
10151
|
+
]
|
|
10152
|
+
}
|
|
10153
|
+
],
|
|
10154
|
+
"regex": "\\bartex(?:[\\W_]|$)",
|
|
10155
|
+
"options": {
|
|
10156
|
+
"case_sensitive": false,
|
|
10157
|
+
"min_length": 5
|
|
10158
|
+
}
|
|
10159
|
+
},
|
|
10160
|
+
"operator": "match_regex"
|
|
10161
|
+
}
|
|
10162
|
+
],
|
|
10163
|
+
"transformers": []
|
|
10164
|
+
},
|
|
10098
10165
|
{
|
|
10099
10166
|
"id": "ua0-600-7xx",
|
|
10100
10167
|
"name": "SQLmap",
|
|
@@ -26,6 +26,14 @@ const { DIAGNOSTIC_KEYS } = require('./waf/diagnostics')
|
|
|
26
26
|
const REQUEST_HEADER_TAG_PREFIX = 'http.request.headers.'
|
|
27
27
|
const RESPONSE_HEADER_TAG_PREFIX = 'http.response.headers.'
|
|
28
28
|
|
|
29
|
+
// Preserve the first redirect target across independently evaluated outgoing requests.
|
|
30
|
+
const REDIRECT_TARGET_ATTRIBUTES = new Set([
|
|
31
|
+
'appsec.api.redirection.move_target',
|
|
32
|
+
'appsec.api.redirection.redirect_target',
|
|
33
|
+
'api.security.redirection.move_target',
|
|
34
|
+
'api.security.redirection.redirect_target',
|
|
35
|
+
])
|
|
36
|
+
|
|
29
37
|
const COLLECTED_REQUEST_BODY_MAX_STRING_LENGTH = 4096
|
|
30
38
|
const COLLECTED_REQUEST_BODY_MAX_DEPTH = 20
|
|
31
39
|
const COLLECTED_REQUEST_BODY_MAX_ELEMENTS_PER_NODE = 256
|
|
@@ -560,6 +568,7 @@ function reportAttributes (attributes, req, rootSpan) {
|
|
|
560
568
|
|
|
561
569
|
const tags = {}
|
|
562
570
|
for (let [tag, value] of Object.entries(attributes)) {
|
|
571
|
+
if (REDIRECT_TARGET_ATTRIBUTES.has(tag) && rootSpan.context().hasTag(tag)) continue
|
|
563
572
|
if (isSchemaAttribute(tag)) {
|
|
564
573
|
const gzippedValue = zlib.gzipSync(JSON.stringify(value))
|
|
565
574
|
value = gzippedValue.toString('base64')
|
|
@@ -27,15 +27,15 @@ function setUser (tracer, user) {
|
|
|
27
27
|
|
|
28
28
|
setUserTags(user, rootSpan)
|
|
29
29
|
|
|
30
|
-
const
|
|
30
|
+
const requestData = {
|
|
31
31
|
[addresses.USER_ID]: String(user.id),
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
if (user.session_id && typeof user.session_id === 'string') {
|
|
35
|
-
|
|
35
|
+
requestData[addresses.USER_SESSION_ID] = user.session_id
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
waf.run(
|
|
38
|
+
waf.run(requestData)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
module.exports = {
|
|
@@ -211,19 +211,19 @@ function trackEvent (eventName, fields, sdkMethodName, rootSpan) {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
function runWaf (eventName, user) {
|
|
214
|
-
const
|
|
214
|
+
const requestData = {
|
|
215
215
|
[`server.business_logic.${eventName}`]: null,
|
|
216
216
|
}
|
|
217
217
|
|
|
218
218
|
if (user?.id) {
|
|
219
|
-
|
|
219
|
+
requestData[addresses.USER_ID] = String(user.id)
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
if (user?.login) {
|
|
223
|
-
|
|
223
|
+
requestData[addresses.USER_LOGIN] = String(user.login)
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
waf.run(
|
|
226
|
+
waf.run(requestData)
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
module.exports = {
|
|
@@ -10,7 +10,7 @@ const { setUserTags } = require('./set_user')
|
|
|
10
10
|
const { getRootSpan } = require('./utils')
|
|
11
11
|
|
|
12
12
|
function isUserBlocked (user) {
|
|
13
|
-
const results = waf.run({
|
|
13
|
+
const results = waf.run({ [USER_ID]: user.id })
|
|
14
14
|
return !!getBlockingAction(results?.actions)
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -87,7 +87,7 @@ function trackLogin (framework, login, user, success, rootSpan) {
|
|
|
87
87
|
|
|
88
88
|
let newTags
|
|
89
89
|
|
|
90
|
-
const
|
|
90
|
+
const requestData = {
|
|
91
91
|
[addresses.USER_LOGIN]: login,
|
|
92
92
|
}
|
|
93
93
|
|
|
@@ -116,11 +116,11 @@ function trackLogin (framework, login, user, success, rootSpan) {
|
|
|
116
116
|
|
|
117
117
|
if (shouldSetTag('usr.id')) {
|
|
118
118
|
newTags['usr.id'] = userId
|
|
119
|
-
|
|
119
|
+
requestData[addresses.USER_ID] = userId
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
|
|
123
|
+
requestData[addresses.LOGIN_SUCCESS] = null
|
|
124
124
|
} else {
|
|
125
125
|
newTags = {
|
|
126
126
|
'appsec.events.users.login.failure.track': 'true',
|
|
@@ -146,14 +146,14 @@ function trackLogin (framework, login, user, success, rootSpan) {
|
|
|
146
146
|
}
|
|
147
147
|
*/
|
|
148
148
|
|
|
149
|
-
|
|
149
|
+
requestData[addresses.LOGIN_FAILURE] = null
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
keepTrace(rootSpan, ASM)
|
|
153
153
|
|
|
154
154
|
rootSpan.addTags(newTags)
|
|
155
155
|
|
|
156
|
-
return waf.run(
|
|
156
|
+
return waf.run(requestData)
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
function trackUser (user, rootSpan) {
|
|
@@ -177,9 +177,7 @@ function trackUser (user, rootSpan) {
|
|
|
177
177
|
})
|
|
178
178
|
|
|
179
179
|
return waf.run({
|
|
180
|
-
|
|
181
|
-
[addresses.USER_ID]: userId,
|
|
182
|
-
},
|
|
180
|
+
[addresses.USER_ID]: userId,
|
|
183
181
|
})
|
|
184
182
|
}
|
|
185
183
|
}
|
|
@@ -37,6 +37,9 @@ const waf = {
|
|
|
37
37
|
removeConfig,
|
|
38
38
|
checkAsmDdFallback,
|
|
39
39
|
run: noop,
|
|
40
|
+
runSubContext: noop,
|
|
41
|
+
disposeSubContext,
|
|
42
|
+
getRequest,
|
|
40
43
|
disposeContext: noop,
|
|
41
44
|
WafUpdateError,
|
|
42
45
|
}
|
|
@@ -55,6 +58,7 @@ function init (rules, config) {
|
|
|
55
58
|
|
|
56
59
|
waf.wafManager = new WAFManager(rules, config)
|
|
57
60
|
|
|
61
|
+
waf.runSubContext = runSubContext
|
|
58
62
|
waf.run = run
|
|
59
63
|
waf.disposeContext = disposeContext
|
|
60
64
|
}
|
|
@@ -65,6 +69,7 @@ function destroy () {
|
|
|
65
69
|
waf.wafManager = null
|
|
66
70
|
}
|
|
67
71
|
|
|
72
|
+
waf.runSubContext = noop
|
|
68
73
|
waf.run = noop
|
|
69
74
|
waf.disposeContext = noop
|
|
70
75
|
}
|
|
@@ -116,7 +121,7 @@ function removeConfig (configPath) {
|
|
|
116
121
|
// @see packages/dd-trace/test/appsec/lambda.spec.js
|
|
117
122
|
|
|
118
123
|
/**
|
|
119
|
-
* @param {object} data - WAF address
|
|
124
|
+
* @param {object} data - Flat WAF address map
|
|
120
125
|
* @param {object} req - Request key for WAF context lookup. May be an HTTP
|
|
121
126
|
* IncomingMessage or a plain object (Lambda invocation key).
|
|
122
127
|
* @param {string} [raspRule] - RASP rule identifier
|
|
@@ -132,7 +137,19 @@ function run (data, req, raspRule, rootSpan) {
|
|
|
132
137
|
}
|
|
133
138
|
|
|
134
139
|
const wafContext = waf.wafManager.getWAFContext(req)
|
|
135
|
-
|
|
140
|
+
if (!wafContext) return
|
|
141
|
+
return runContext(data, wafContext, raspRule, rootSpan)
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @param {object} data - Flat WAF address map.
|
|
146
|
+
* @param {import('./waf_context_wrapper')} wafContext - Context selected for this evaluation.
|
|
147
|
+
* @param {object} [raspRule] - RASP rule metadata.
|
|
148
|
+
* @param {object} [rootSpan] - Explicit Lambda root span.
|
|
149
|
+
*/
|
|
150
|
+
function runContext (data, wafContext, raspRule, rootSpan) {
|
|
151
|
+
const req = wafContext.parent ? wafContext.parent.req : wafContext.req
|
|
152
|
+
const result = wafContext.run(data, raspRule, rootSpan)
|
|
136
153
|
|
|
137
154
|
if (result?.keep) {
|
|
138
155
|
if (limiter.isAllowed()) {
|
|
@@ -146,12 +163,54 @@ function run (data, req, raspRule, rootSpan) {
|
|
|
146
163
|
return result
|
|
147
164
|
}
|
|
148
165
|
|
|
149
|
-
|
|
150
|
-
|
|
166
|
+
/**
|
|
167
|
+
* @typedef {{ wafSubcontext?: import('./waf_context_wrapper') }} SubcontextState
|
|
168
|
+
*/
|
|
151
169
|
|
|
152
|
-
|
|
153
|
-
|
|
170
|
+
/**
|
|
171
|
+
* Evaluate an isolated check, or reuse a subcontext across calls carrying the same state.
|
|
172
|
+
* @param {object} data - Flat WAF address map.
|
|
173
|
+
* @param {object} [raspRule] - RASP rule metadata.
|
|
174
|
+
* @param {SubcontextState} [state] - Instrumentation context, released by calling disposeSubContext.
|
|
175
|
+
* @param {object} [req] - Explicit request when the publisher provides it.
|
|
176
|
+
*/
|
|
177
|
+
function runSubContext (data, raspRule, state, req) {
|
|
178
|
+
let subcontext = state?.wafSubcontext
|
|
179
|
+
if (!subcontext) {
|
|
180
|
+
req ||= getActiveRequest()
|
|
181
|
+
if (!req) return
|
|
182
|
+
const context = waf.wafManager.getWAFContext(req)
|
|
183
|
+
if (!context) return
|
|
184
|
+
if (context.ddwafContext.disposed) return runContext(data, context, raspRule)
|
|
185
|
+
// Stateful checks can need response inputs even when no request inputs are known.
|
|
186
|
+
if (!state && (data === null || typeof data !== 'object' ||
|
|
187
|
+
!Object.keys(data).some(key => context.knownAddresses.has(key)))) return
|
|
188
|
+
subcontext = context.createSubcontext()
|
|
189
|
+
if (!subcontext) return
|
|
190
|
+
if (state) state.wafSubcontext = subcontext
|
|
154
191
|
}
|
|
192
|
+
try {
|
|
193
|
+
return runContext(data, subcontext, raspRule)
|
|
194
|
+
} finally {
|
|
195
|
+
if (!state) subcontext.dispose()
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/** @param {SubcontextState} state - Instrumentation context bound by runSubContext. */
|
|
200
|
+
function getRequest (state) {
|
|
201
|
+
return state.wafSubcontext?.parent.req
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/** @param {SubcontextState} state - Instrumentation context whose evaluation is complete. */
|
|
205
|
+
function disposeSubContext (state) {
|
|
206
|
+
const subcontext = state.wafSubcontext
|
|
207
|
+
if (!subcontext) return
|
|
208
|
+
state.wafSubcontext = undefined
|
|
209
|
+
subcontext.dispose()
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function disposeContext (req) {
|
|
213
|
+
waf.wafManager.disposeContext(req)
|
|
155
214
|
}
|
|
156
215
|
|
|
157
216
|
function noop () {}
|
|
@@ -6,14 +6,16 @@ const addresses = require('../addresses')
|
|
|
6
6
|
const { getBlockingAction } = require('../blocking')
|
|
7
7
|
const { wafRunFinished } = require('../channels')
|
|
8
8
|
|
|
9
|
-
//
|
|
9
|
+
// Some HTTP hooks can supply the same query more than once.
|
|
10
10
|
const preventDuplicateAddresses = new Set([
|
|
11
11
|
addresses.HTTP_INCOMING_QUERY,
|
|
12
12
|
])
|
|
13
13
|
|
|
14
14
|
class WAFContextWrapper {
|
|
15
|
-
constructor (ddwafContext, wafTimeout, wafVersion, rulesVersion, knownAddresses) {
|
|
15
|
+
constructor (ddwafContext, wafTimeout, wafVersion, rulesVersion, knownAddresses, req, parent) {
|
|
16
16
|
this.ddwafContext = ddwafContext
|
|
17
|
+
this.parent = parent
|
|
18
|
+
this.req = req
|
|
17
19
|
this.wafTimeout = wafTimeout
|
|
18
20
|
this.wafVersion = wafVersion
|
|
19
21
|
this.rulesVersion = rulesVersion
|
|
@@ -36,7 +38,7 @@ class WAFContextWrapper {
|
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
run (
|
|
41
|
+
run (data, raspRule, rootSpan) {
|
|
40
42
|
if (this.ddwafContext.disposed) {
|
|
41
43
|
log.warn('[ASM] Calling run on a disposed context')
|
|
42
44
|
if (raspRule) {
|
|
@@ -46,9 +48,8 @@ class WAFContextWrapper {
|
|
|
46
48
|
return
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const userId = persistent?.[addresses.USER_ID] || ephemeral?.[addresses.USER_ID]
|
|
51
|
+
const req = this.req
|
|
52
|
+
const userId = data?.[addresses.USER_ID]
|
|
52
53
|
if (userId) {
|
|
53
54
|
const cachedResults = this.cachedUserIdResults.get(userId)
|
|
54
55
|
if (cachedResults) {
|
|
@@ -61,42 +62,17 @@ class WAFContextWrapper {
|
|
|
61
62
|
// Cloned lazily; only the preventDuplicateAddresses branch below adds to it.
|
|
62
63
|
let newAddressesToSkip
|
|
63
64
|
|
|
64
|
-
if (
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
let hasPersistentInputs = false
|
|
68
|
-
for (const key of Object.keys(persistent)) {
|
|
65
|
+
if (data !== null && typeof data === 'object') {
|
|
66
|
+
for (const key of Object.keys(data)) {
|
|
69
67
|
if (!this.addressesToSkip.has(key) && this.knownAddresses.has(key)) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
if (preventDuplicateAddresses.has(key)) {
|
|
68
|
+
payloadHasData = true
|
|
69
|
+
payload[key] = data[key]
|
|
70
|
+
if (!this.parent && preventDuplicateAddresses.has(key)) {
|
|
73
71
|
newAddressesToSkip ??= new Set(this.addressesToSkip)
|
|
74
72
|
newAddressesToSkip.add(key)
|
|
75
73
|
}
|
|
76
74
|
}
|
|
77
75
|
}
|
|
78
|
-
|
|
79
|
-
if (hasPersistentInputs) {
|
|
80
|
-
payload.persistent = persistentInputs
|
|
81
|
-
payloadHasData = true
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (ephemeral !== null && typeof ephemeral === 'object') {
|
|
86
|
-
const ephemeralInputs = {}
|
|
87
|
-
|
|
88
|
-
let hasEphemeral = false
|
|
89
|
-
for (const key of Object.keys(ephemeral)) {
|
|
90
|
-
if (this.knownAddresses.has(key)) {
|
|
91
|
-
hasEphemeral = true
|
|
92
|
-
ephemeralInputs[key] = ephemeral[key]
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
if (hasEphemeral) {
|
|
97
|
-
payload.ephemeral = ephemeralInputs
|
|
98
|
-
payloadHasData = true
|
|
99
|
-
}
|
|
100
76
|
}
|
|
101
77
|
|
|
102
78
|
if (!payloadHasData) return
|
|
@@ -168,7 +144,7 @@ class WAFContextWrapper {
|
|
|
168
144
|
metrics.errorCode = err.errorCode ?? -127
|
|
169
145
|
} finally {
|
|
170
146
|
if (wafRunFinished.hasSubscribers) {
|
|
171
|
-
wafRunFinished.publish({ payload })
|
|
147
|
+
wafRunFinished.publish({ payload, req, isSubcontext: !!this.parent })
|
|
172
148
|
}
|
|
173
149
|
|
|
174
150
|
Reporter.reportMetrics(metrics, raspRule, req, rootSpan)
|
|
@@ -195,8 +171,27 @@ class WAFContextWrapper {
|
|
|
195
171
|
}
|
|
196
172
|
}
|
|
197
173
|
|
|
174
|
+
createSubcontext () {
|
|
175
|
+
if (this.parent || this.ddwafContext.disposed) return
|
|
176
|
+
try {
|
|
177
|
+
const subcontext = new WAFContextWrapper(
|
|
178
|
+
this.ddwafContext.createSubcontext(), this.wafTimeout, this.wafVersion,
|
|
179
|
+
this.rulesVersion, this.knownAddresses, this.req, this
|
|
180
|
+
)
|
|
181
|
+
this.subcontexts ??= new Set()
|
|
182
|
+
this.subcontexts.add(subcontext)
|
|
183
|
+
return subcontext
|
|
184
|
+
} catch (error) {
|
|
185
|
+
log.error('[ASM] Error creating an AppSec WAF subcontext', error)
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
198
189
|
dispose () {
|
|
199
|
-
this.
|
|
190
|
+
this.parent?.subcontexts.delete(this)
|
|
191
|
+
if (this.subcontexts) {
|
|
192
|
+
for (const subcontext of this.subcontexts) subcontext.dispose()
|
|
193
|
+
}
|
|
194
|
+
if (!this.ddwafContext.disposed) this.ddwafContext.dispose()
|
|
200
195
|
}
|
|
201
196
|
}
|
|
202
197
|
|
|
@@ -53,14 +53,19 @@ class WAFManager {
|
|
|
53
53
|
|
|
54
54
|
getWAFContext (req) {
|
|
55
55
|
let wafContext = contexts.get(req)
|
|
56
|
+
if (wafContext === null) return
|
|
56
57
|
|
|
57
58
|
if (!wafContext) {
|
|
59
|
+
const context = this.ddwaf.createContext()
|
|
60
|
+
if (context === null) return
|
|
61
|
+
|
|
58
62
|
wafContext = new WAFContextWrapper(
|
|
59
|
-
|
|
63
|
+
context,
|
|
60
64
|
this.wafTimeout,
|
|
61
65
|
this.ddwafVersion,
|
|
62
66
|
this.rulesVersion,
|
|
63
|
-
this.ddwaf.knownAddresses
|
|
67
|
+
this.ddwaf.knownAddresses,
|
|
68
|
+
req
|
|
64
69
|
)
|
|
65
70
|
contexts.set(req, wafContext)
|
|
66
71
|
}
|
|
@@ -68,6 +73,17 @@ class WAFManager {
|
|
|
68
73
|
return wafContext
|
|
69
74
|
}
|
|
70
75
|
|
|
76
|
+
/** @param {object} req Request whose evaluations have finished. */
|
|
77
|
+
disposeContext (req) {
|
|
78
|
+
const context = contexts.get(req)
|
|
79
|
+
if (context) {
|
|
80
|
+
context.dispose()
|
|
81
|
+
} else {
|
|
82
|
+
// No native context exists when all rules were removed; late callbacks must still stay disabled.
|
|
83
|
+
contexts.set(req, null)
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
71
87
|
setRulesVersion () {
|
|
72
88
|
if (this.ddwaf.diagnostics.ruleset_version) {
|
|
73
89
|
this.rulesVersion = this.ddwaf.diagnostics.ruleset_version
|
|
@@ -8,6 +8,7 @@ const FIELD_WRITE = 2
|
|
|
8
8
|
const FIELD_HAS = 4
|
|
9
9
|
const FIELD_DELETE = 8
|
|
10
10
|
const FIELD_NAME_LENGTH = 16
|
|
11
|
+
const FIELD_NAME = 32
|
|
11
12
|
|
|
12
13
|
const b3FlagsHeader = 'x-b3-flags'
|
|
13
14
|
const b3Header = 'b3'
|
|
@@ -36,6 +37,7 @@ const carrierOperations = {}
|
|
|
36
37
|
* @property {unknown} [has]
|
|
37
38
|
* @property {unknown} [delete]
|
|
38
39
|
* @property {unknown} [nameLength]
|
|
40
|
+
* @property {unknown} [name]
|
|
39
41
|
*/
|
|
40
42
|
|
|
41
43
|
/**
|
|
@@ -47,6 +49,7 @@ const carrierOperations = {}
|
|
|
47
49
|
* @property {(carrier: Carrier) => void} delete
|
|
48
50
|
* @property {(carrier: Carrier, target: Carrier) => void} copy
|
|
49
51
|
* @property {number} nameLength
|
|
52
|
+
* @property {string} name
|
|
50
53
|
*/
|
|
51
54
|
|
|
52
55
|
/**
|
|
@@ -63,6 +66,7 @@ function defineCapability (name, operations, capability) {
|
|
|
63
66
|
if (operations & FIELD_HAS) carrierOperations[`has${suffix}`] = capability.has
|
|
64
67
|
if (operations & FIELD_DELETE) carrierOperations[`delete${suffix}`] = capability.delete
|
|
65
68
|
if (operations & FIELD_NAME_LENGTH) carrierOperations[`${name}NameLength`] = capability.nameLength
|
|
69
|
+
if (operations & FIELD_NAME) carrierOperations[`${name}Name`] = capability.name
|
|
66
70
|
return capability
|
|
67
71
|
}
|
|
68
72
|
|
|
@@ -109,6 +113,7 @@ function defineField (fieldName, headerName, read, operations) {
|
|
|
109
113
|
},
|
|
110
114
|
|
|
111
115
|
nameLength: headerName.length,
|
|
116
|
+
name: headerName,
|
|
112
117
|
})
|
|
113
118
|
}
|
|
114
119
|
|
|
@@ -277,7 +282,7 @@ const dsmBase64 = defineField(
|
|
|
277
282
|
'dsmBase64',
|
|
278
283
|
dsmBase64Header,
|
|
279
284
|
readDsmBase64,
|
|
280
|
-
FIELD_READ | FIELD_WRITE | FIELD_HAS | FIELD_NAME_LENGTH
|
|
285
|
+
FIELD_READ | FIELD_WRITE | FIELD_HAS | FIELD_NAME_LENGTH | FIELD_NAME
|
|
281
286
|
)
|
|
282
287
|
const dsmBinary = defineField('dsmBinary', dsmBinaryHeader, readDsmBinary, FIELD_READ | FIELD_HAS)
|
|
283
288
|
|
|
@@ -363,6 +368,7 @@ function pickDsm (carrier) {
|
|
|
363
368
|
/**
|
|
364
369
|
* @typedef {object} CarrierOperations
|
|
365
370
|
* @property {typeof datadogParentId.delete} deleteDatadogParentId
|
|
371
|
+
* @property {typeof dsmBase64.name} dsmBase64Name
|
|
366
372
|
* @property {typeof dsmBase64.nameLength} dsmBase64NameLength
|
|
367
373
|
* @property {typeof dsmBase64.has} hasDsmBase64
|
|
368
374
|
* @property {typeof dsmBinary.has} hasDsmBinary
|
|
@@ -203,7 +203,8 @@ class TestVisDynamicInstrumentation {
|
|
|
203
203
|
// Allow the parent to exit even if the worker is still running
|
|
204
204
|
this.worker.unref?.()
|
|
205
205
|
|
|
206
|
-
this.breakpointSetChannel.port2.on('message', (probeId) => {
|
|
206
|
+
this.breakpointSetChannel.port2.on('message', ({ probeId, error }) => {
|
|
207
|
+
if (error) log.error('Test Optimization - Dynamic Instrumentation failed to set probe', error)
|
|
207
208
|
const probeState = this.#probeStateById.get(probeId)
|
|
208
209
|
if (probeState?.resolveSet) {
|
|
209
210
|
probeState.resolveSet()
|
|
@@ -230,7 +231,8 @@ class TestVisDynamicInstrumentation {
|
|
|
230
231
|
}
|
|
231
232
|
}).unref?.()
|
|
232
233
|
|
|
233
|
-
this.breakpointRemoveChannel.port2.on('message', (probeId) => {
|
|
234
|
+
this.breakpointRemoveChannel.port2.on('message', ({ probeId, error }) => {
|
|
235
|
+
if (error) log.error('Test Optimization - Dynamic Instrumentation failed to remove probe', error)
|
|
234
236
|
const probeState = this.#probeStateById.get(probeId)
|
|
235
237
|
if (probeState?.resolveRemove) {
|
|
236
238
|
probeState.resolveRemove()
|
|
@@ -155,16 +155,32 @@ breakpointHitChannel.on('message', ({ drainRequestId }) => {
|
|
|
155
155
|
scheduleBreakpointHitDrain()
|
|
156
156
|
})
|
|
157
157
|
|
|
158
|
-
breakpointRemoveChannel.on('message',
|
|
159
|
-
|
|
160
|
-
breakpointRemoveChannel.postMessage(probeId)
|
|
158
|
+
breakpointRemoveChannel.on('message', (probeId) => {
|
|
159
|
+
acknowledge(breakpointRemoveChannel, probeId, removeBreakpoint(probeId))
|
|
161
160
|
})
|
|
162
161
|
|
|
163
|
-
breakpointSetChannel.on('message',
|
|
164
|
-
|
|
165
|
-
breakpointSetChannel.postMessage(probe.id)
|
|
162
|
+
breakpointSetChannel.on('message', (probe) => {
|
|
163
|
+
acknowledge(breakpointSetChannel, probe.id, addBreakpoint(probe))
|
|
166
164
|
})
|
|
167
165
|
|
|
166
|
+
/**
|
|
167
|
+
* Acknowledges a probe operation once it settles, along with its error if it failed. Rejecting instead would end the
|
|
168
|
+
* worker, and only the main thread's logs reach telemetry.
|
|
169
|
+
*
|
|
170
|
+
* @param {import('node:worker_threads').MessagePort} channel - The channel that requested the operation
|
|
171
|
+
* @param {string} probeId - The ID of the probe the operation was for
|
|
172
|
+
* @param {Promise<void>} operation - The pending operation
|
|
173
|
+
*/
|
|
174
|
+
async function acknowledge (channel, probeId, operation) {
|
|
175
|
+
let error
|
|
176
|
+
try {
|
|
177
|
+
await operation
|
|
178
|
+
} catch (err) {
|
|
179
|
+
error = err
|
|
180
|
+
}
|
|
181
|
+
channel.postMessage({ probeId, error })
|
|
182
|
+
}
|
|
183
|
+
|
|
168
184
|
async function removeBreakpoint (probeId) {
|
|
169
185
|
if (!sessionStarted) {
|
|
170
186
|
// We should not get in this state, but abort if we do, so the code doesn't fail unexpected
|
|
@@ -212,20 +228,16 @@ async function addBreakpoint (probe) {
|
|
|
212
228
|
}
|
|
213
229
|
}
|
|
214
230
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
})
|
|
231
|
+
const { breakpointId } = await session.post('Debugger.setBreakpoint', {
|
|
232
|
+
location: {
|
|
233
|
+
scriptId,
|
|
234
|
+
lineNumber: lineNumber - 1,
|
|
235
|
+
columnNumber,
|
|
236
|
+
},
|
|
237
|
+
})
|
|
223
238
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
} catch (e) {
|
|
227
|
-
log.error('Error setting breakpoint at %s:%s', url, line, e)
|
|
228
|
-
}
|
|
239
|
+
breakpointIdToProbe.set(breakpointId, probe)
|
|
240
|
+
probeIdToBreakpointId.set(probe.id, breakpointId)
|
|
229
241
|
}
|
|
230
242
|
|
|
231
243
|
async function start () {
|