fix(debugger): apply redaction to dictionary iterator key/value#8641
Conversation
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8641) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8641) - mean (75ms) : 70, 80
master - mean (75ms) : 70, 80
section Bailout
This PR (8641) - mean (77ms) : 75, 80
master - mean (78ms) : 76, 80
section CallTarget+Inlining+NGEN
This PR (8641) - mean (1,106ms) : 1060, 1152
master - mean (1,106ms) : 1051, 1162
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8641) - mean (114ms) : 109, 119
master - mean (115ms) : 109, 120
section Bailout
This PR (8641) - mean (114ms) : 112, 116
master - mean (115ms) : 112, 118
section CallTarget+Inlining+NGEN
This PR (8641) - mean (794ms) : 769, 818
master - mean (794ms) : 766, 822
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8641) - mean (102ms) : 98, 106
master - mean (102ms) : 97, 108
section Bailout
This PR (8641) - mean (106ms) : 100, 112
master - mean (105ms) : 100, 110
section CallTarget+Inlining+NGEN
This PR (8641) - mean (949ms) : 909, 989
master - mean (950ms) : 910, 989
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8641) - mean (100ms) : 97, 103
master - mean (99ms) : 95, 103
section Bailout
This PR (8641) - mean (101ms) : 98, 104
master - mean (103ms) : 98, 108
section CallTarget+Inlining+NGEN
This PR (8641) - mean (826ms) : 784, 868
master - mean (820ms) : 781, 860
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8641) - mean (201ms) : 195, 208
master - mean (202ms) : 196, 208
section Bailout
This PR (8641) - mean (204ms) : 200, 208
master - mean (204ms) : 200, 208
section CallTarget+Inlining+NGEN
This PR (8641) - mean (1,213ms) : 1172, 1253
master - mean (1,209ms) : 1164, 1254
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8641) - mean (291ms) : 284, 299
master - mean (290ms) : 284, 296
section Bailout
This PR (8641) - mean (291ms) : 282, 299
master - mean (292ms) : 286, 298
section CallTarget+Inlining+NGEN
This PR (8641) - mean (969ms) : 949, 988
master - mean (973ms) : 947, 999
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8641) - mean (281ms) : 273, 289
master - mean (282ms) : 275, 290
section Bailout
This PR (8641) - mean (281ms) : 275, 288
master - mean (280ms) : 273, 288
section CallTarget+Inlining+NGEN
This PR (8641) - mean (1,159ms) : 1118, 1200
master - mean (1,165ms) : 1126, 1204
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8641) - mean (281ms) : 272, 289
master - mean (281ms) : 273, 289
section Bailout
This PR (8641) - mean (281ms) : 275, 287
master - mean (280ms) : 270, 291
section CallTarget+Inlining+NGEN
This PR (8641) - mean (1,041ms) : 998, 1084
master - mean (1,048ms) : 1005, 1091
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
BenchmarksBenchmark execution time: 2026-05-20 17:24:18 Comparing candidate commit 47425fe in PR branch Some scenarios are present only in baseline or only in candidate runs. If you didn't create or remove some scenarios in your branch, this maybe a sign of crashed benchmarks 💥💥💥 Scenarios present only in baseline:
Found 3 performance improvements and 6 performance regressions! Performance is the same for 48 metrics, 15 unstable metrics, 88 known flaky benchmarks, 38 flaky benchmarks without significant changes.
|
d848e1d to
16c76e6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16c76e6c0e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR closes a redaction bypass in the debugger expression language where dictionary iterator projections (@key/@value) could expose values under sensitive keys without applying existing redaction rules.
Changes:
- Updated dictionary iterator property resolution to allow wrapping
@key/@valuewith a redaction-aware expression. - Added helper logic to decide whether a dictionary entry key should be considered sensitive for redaction purposes.
- Added a regression test ensuring sensitive dictionary keys redact both iterator key and value projections.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tracer/src/Datadog.Trace/Debugger/Expressions/ProbeExpressionParser.Collection.cs | Wraps dictionary iterator Key/Value projections with redaction checks. |
| tracer/test/Datadog.Trace.Tests/Debugger/DebuggerExpressionLanguageTests.cs | Adds regression coverage for redacting @key/@value when iterating over sensitive dictionary entries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
aa034c5 to
47425fe
Compare
Motivation
@key/@valuefor dictionary iteration but exposed a bypass that allowed reading values stored under redacted keys without applying the existing redaction rules.Description
TryGetCollectionIteratorPropertyto return anExpressionand wrapKey/Valueprojections with a conditional that returnsRedactedValue()when the entry key matches redaction rules intracer/src/Datadog.Trace/Debugger/Expressions/ProbeExpressionParser.Collection.cs.RedactDictionaryValueWhenKeyMatchesandShouldRedactDictionaryKeyto centralize the key redaction lookup and produce anExpression.Conditionfor the redaction decision.ProbeExpressionParser_DictionaryIteratorValue_RedactsSensitiveKeysintracer/test/Datadog.Trace.Tests/Debugger/DebuggerExpressionLanguageTests.csthat verifies a dictionary entry under the key"password"is surfaced as redacted when accessed through the iterator/filter/index/member path.Testing
ProbeExpressionParser_DictionaryIteratorValue_RedactsSensitiveKeysand executed focuseddotnet testruns against the test project with a filter for the new test (dotnet test tracer/test/Datadog.Trace.Tests/Datadog.Trace.Tests.csproj -f net10.0 --filter "ProbeExpressionParser_DictionaryIteratorValue_RedactsSensitiveKeys"), iterating until the parsing code produced the expected redaction behavior locally.Codex Task