-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ASM] iast: Tainting of DefaultInterpolatedStringHandler #6340
base: master
Are you sure you want to change the base?
Conversation
Datadog ReportBranch report: ❌ 7 Failed (0 Known Flaky), 456814 Passed, 3502 Skipped, 32h 35m 36.84s Total Time ❌ Failed Tests (7)
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing the following branches/commits: Execution-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 shown 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). gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6340) - mean (74ms) : 65, 83
. : milestone, 74,
master - mean (71ms) : 64, 78
. : milestone, 71,
section CallTarget+Inlining+NGEN
This PR (6340) - mean (1,122ms) : 1063, 1181
. : milestone, 1122,
master - mean (1,109ms) : 1083, 1135
. : milestone, 1109,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6340) - mean (110ms) : 108, 112
. : milestone, 110,
master - mean (109ms) : 106, 112
. : milestone, 109,
section CallTarget+Inlining+NGEN
This PR (6340) - mean (818ms) : 633, 1003
. : milestone, 818,
master - mean (772ms) : 752, 791
. : milestone, 772,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6340) - mean (94ms) : 91, 96
. : milestone, 94,
master - mean (92ms) : 91, 94
. : milestone, 92,
section CallTarget+Inlining+NGEN
This PR (6340) - mean (739ms) : 690, 787
. : milestone, 739,
master - mean (726ms) : 711, 741
. : milestone, 726,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6340) - mean (191ms) : 186, 195
. : milestone, 191,
master - mean (192ms) : 186, 198
. : milestone, 192,
section CallTarget+Inlining+NGEN
This PR (6340) - mean (1,219ms) : 1195, 1242
. : milestone, 1219,
master - mean (1,214ms) : 1192, 1237
. : milestone, 1214,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6340) - mean (277ms) : 272, 281
. : milestone, 277,
master - mean (278ms) : 272, 284
. : milestone, 278,
section CallTarget+Inlining+NGEN
This PR (6340) - mean (955ms) : 932, 979
. : milestone, 955,
master - mean (949ms) : 933, 965
. : milestone, 949,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6340) - mean (266ms) : 262, 269
. : milestone, 266,
master - mean (266ms) : 262, 270
. : milestone, 266,
section CallTarget+Inlining+NGEN
This PR (6340) - mean (925ms) : 907, 943
. : milestone, 925,
master - mean (931ms) : 914, 948
. : milestone, 931,
|
Benchmarks Report for tracer 🐌Benchmarks for #6340 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.ElasticsearchBenchmark - Slower
|
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.ElasticsearchBenchmark.CallElasticsearch‑net6.0 | 1.124 | 1,204.15 | 1,353.80 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.2μs | 0.724ns | 2.71ns | 0.0138 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.51μs | 1.23ns | 4.6ns | 0.0129 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.46μs | 1.32ns | 5.12ns | 0.157 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.35μs | 0.535ns | 2.07ns | 0.0129 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.66μs | 0.878ns | 3.4ns | 0.0134 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.75μs | 1.27ns | 4.76ns | 0.166 | 0 | 0 | 1.05 KB |
#6340 | CallElasticsearch |
net6.0 | 1.35μs | 0.518ns | 1.94ns | 0.0135 | 0 | 0 | 976 B |
#6340 | CallElasticsearch |
netcoreapp3.1 | 1.6μs | 0.633ns | 2.37ns | 0.013 | 0 | 0 | 976 B |
#6340 | CallElasticsearch |
net472 | 2.58μs | 1.08ns | 4.19ns | 0.158 | 0 | 0 | 995 B |
#6340 | CallElasticsearchAsync |
net6.0 | 1.31μs | 0.674ns | 2.52ns | 0.0131 | 0 | 0 | 952 B |
#6340 | CallElasticsearchAsync |
netcoreapp3.1 | 1.66μs | 1.48ns | 5.75ns | 0.0137 | 0 | 0 | 1.02 KB |
#6340 | CallElasticsearchAsync |
net472 | 2.61μs | 1.41ns | 5.47ns | 0.167 | 0 | 0 | 1.05 KB |
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteAsync |
net6.0 | 1.31μs | 0.484ns | 1.81ns | 0.0131 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.62μs | 2.24ns | 8.37ns | 0.0128 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.77μs | 0.485ns | 1.81ns | 0.145 | 0 | 0 | 915 B |
#6340 | ExecuteAsync |
net6.0 | 1.27μs | 0.587ns | 2.28ns | 0.0135 | 0 | 0 | 952 B |
#6340 | ExecuteAsync |
netcoreapp3.1 | 1.59μs | 0.936ns | 3.5ns | 0.0128 | 0 | 0 | 952 B |
#6340 | ExecuteAsync |
net472 | 1.82μs | 0.594ns | 2.22ns | 0.145 | 0 | 0 | 915 B |
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendAsync |
net6.0 | 4.32μs | 3.27ns | 12.7ns | 0.0323 | 0 | 0 | 2.31 KB |
master | SendAsync |
netcoreapp3.1 | 5.35μs | 3.02ns | 11.7ns | 0.0375 | 0 | 0 | 2.85 KB |
master | SendAsync |
net472 | 7.37μs | 8.02ns | 31.1ns | 0.493 | 0 | 0 | 3.12 KB |
#6340 | SendAsync |
net6.0 | 4.21μs | 1.93ns | 7.46ns | 0.0315 | 0 | 0 | 2.31 KB |
#6340 | SendAsync |
netcoreapp3.1 | 5.44μs | 1.95ns | 7.54ns | 0.0382 | 0 | 0 | 2.85 KB |
#6340 | SendAsync |
net472 | 7.36μs | 2.14ns | 8.27ns | 0.494 | 0 | 0 | 3.12 KB |
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 1.6μs | 0.785ns | 2.94ns | 0.0233 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.22μs | 0.93ns | 3.48ns | 0.0221 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.77μs | 0.859ns | 3.33ns | 0.249 | 0 | 0 | 1.57 KB |
#6340 | EnrichedLog |
net6.0 | 1.5μs | 0.969ns | 3.63ns | 0.0232 | 0 | 0 | 1.64 KB |
#6340 | EnrichedLog |
netcoreapp3.1 | 2.14μs | 1.3ns | 4.86ns | 0.0226 | 0 | 0 | 1.64 KB |
#6340 | EnrichedLog |
net472 | 2.82μs | 1.76ns | 6.58ns | 0.249 | 0 | 0 | 1.57 KB |
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 119μs | 174ns | 673ns | 0.0596 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 124μs | 226ns | 875ns | 0 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 150μs | 107ns | 399ns | 0.681 | 0.227 | 0 | 4.46 KB |
#6340 | EnrichedLog |
net6.0 | 119μs | 150ns | 582ns | 0.0597 | 0 | 0 | 4.28 KB |
#6340 | EnrichedLog |
netcoreapp3.1 | 122μs | 136ns | 509ns | 0 | 0 | 0 | 4.28 KB |
#6340 | EnrichedLog |
net472 | 153μs | 80ns | 299ns | 0.687 | 0.229 | 0 | 4.46 KB |
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 3.12μs | 1.24ns | 4.82ns | 0.0297 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.17μs | 3.85ns | 14.9ns | 0.0293 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 4.91μs | 4.95ns | 19.2ns | 0.32 | 0 | 0 | 2.02 KB |
#6340 | EnrichedLog |
net6.0 | 3.12μs | 2.9ns | 10ns | 0.03 | 0 | 0 | 2.2 KB |
#6340 | EnrichedLog |
netcoreapp3.1 | 4.24μs | 2.19ns | 8.49ns | 0.0289 | 0 | 0 | 2.2 KB |
#6340 | EnrichedLog |
net472 | 4.85μs | 1.28ns | 4.8ns | 0.319 | 0 | 0 | 2.02 KB |
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | SendReceive |
net6.0 | 1.29μs | 0.403ns | 1.51ns | 0.016 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.76μs | 1ns | 3.88ns | 0.015 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.03μs | 1.27ns | 4.92ns | 0.183 | 0 | 0 | 1.16 KB |
#6340 | SendReceive |
net6.0 | 1.34μs | 0.69ns | 2.67ns | 0.016 | 0 | 0 | 1.14 KB |
#6340 | SendReceive |
netcoreapp3.1 | 1.74μs | 0.534ns | 1.92ns | 0.0154 | 0 | 0 | 1.14 KB |
#6340 | SendReceive |
net472 | 2.04μs | 1.72ns | 6.67ns | 0.183 | 0 | 0 | 1.16 KB |
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | EnrichedLog |
net6.0 | 2.7μs | 0.665ns | 2.49ns | 0.0217 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.99μs | 1.83ns | 6.59ns | 0.0223 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.34μs | 1.7ns | 6.12ns | 0.322 | 0 | 0 | 2.04 KB |
#6340 | EnrichedLog |
net6.0 | 2.85μs | 1.05ns | 4.06ns | 0.0214 | 0 | 0 | 1.6 KB |
#6340 | EnrichedLog |
netcoreapp3.1 | 3.88μs | 1.6ns | 6.19ns | 0.0212 | 0 | 0 | 1.65 KB |
#6340 | EnrichedLog |
net472 | 4.41μs | 2.02ns | 7.81ns | 0.322 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6340
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0
1.151
387.35
445.75
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1
1.132
640.08
724.51
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishSpan‑net6.0 | 1.151 | 387.35 | 445.75 | |
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 1.132 | 640.08 | 724.51 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 388ns | 0.528ns | 2.04ns | 0.00809 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 615ns | 1.12ns | 4.34ns | 0.00767 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 643ns | 1.25ns | 4.82ns | 0.0917 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 477ns | 0.672ns | 2.6ns | 0.0099 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 639ns | 1.12ns | 4.18ns | 0.00921 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 847ns | 1.27ns | 4.91ns | 0.105 | 0 | 0 | 658 B |
#6340 | StartFinishSpan |
net6.0 | 447ns | 0.717ns | 2.78ns | 0.00794 | 0 | 0 | 576 B |
#6340 | StartFinishSpan |
netcoreapp3.1 | 635ns | 0.889ns | 3.44ns | 0.00797 | 0 | 0 | 576 B |
#6340 | StartFinishSpan |
net472 | 655ns | 1.26ns | 4.89ns | 0.0918 | 0 | 0 | 578 B |
#6340 | StartFinishScope |
net6.0 | 496ns | 0.747ns | 2.89ns | 0.00974 | 0 | 0 | 696 B |
#6340 | StartFinishScope |
netcoreapp3.1 | 723ns | 1.66ns | 6.44ns | 0.00908 | 0 | 0 | 696 B |
#6340 | StartFinishScope |
net472 | 906ns | 1.6ns | 6.21ns | 0.104 | 0 | 0 | 658 B |
Benchmarks.Trace.TraceAnnotationsBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | RunOnMethodBegin |
net6.0 | 594ns | 0.832ns | 3.22ns | 0.00963 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 857ns | 1.45ns | 5.61ns | 0.00952 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.09μs | 1.86ns | 7.22ns | 0.104 | 0 | 0 | 658 B |
#6340 | RunOnMethodBegin |
net6.0 | 658ns | 1.09ns | 4.23ns | 0.00981 | 0 | 0 | 696 B |
#6340 | RunOnMethodBegin |
netcoreapp3.1 | 921ns | 1.26ns | 4.38ns | 0.00932 | 0 | 0 | 696 B |
#6340 | RunOnMethodBegin |
net472 | 1.1μs | 2.41ns | 9.32ns | 0.104 | 0 | 0 | 658 B |
Benchmarks Report for appsec 🐌Benchmarks for #6340 compared to master:
The following thresholds were used for comparing the benchmark speeds:
Allocation changes below 0.5% are ignored. Benchmark detailsBenchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️Raw results
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ Fewer allocations 🎉
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 256.25 KB | 253.83 KB | -2.42 KB | -0.94% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑netcoreapp3.1 | 263.55 KB | 253.8 KB | -9.75 KB | -3.70% |
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 | 59.36 KB | 57.16 KB | -2.2 KB | -3.71% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 58.5μs | 750ns | 7.39μs | 0 | 0 | 0 | 43.44 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 61.6μs | 799ns | 7.91μs | 0 | 0 | 0 | 42.64 KB |
master | StringConcatBenchmark |
net472 | 37.9μs | 150ns | 542ns | 0 | 0 | 0 | 59.36 KB |
master | StringConcatAspectBenchmark |
net6.0 | 322μs | 1.85μs | 13.7μs | 0 | 0 | 0 | 256.25 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 365μs | 2.07μs | 18.7μs | 0 | 0 | 0 | 263.55 KB |
master | StringConcatAspectBenchmark |
net472 | 289μs | 5.53μs | 53.4μs | 0 | 0 | 0 | 278.53 KB |
#6340 | StringConcatBenchmark |
net6.0 | 54μs | 256ns | 1.02μs | 0 | 0 | 0 | 43.44 KB |
#6340 | StringConcatBenchmark |
netcoreapp3.1 | 63.5μs | 737ns | 7.26μs | 0 | 0 | 0 | 42.64 KB |
#6340 | StringConcatBenchmark |
net472 | 38.8μs | 196ns | 1.24μs | 0 | 0 | 0 | 57.16 KB |
#6340 | StringConcatAspectBenchmark |
net6.0 | 294μs | 5.47μs | 53.8μs | 0 | 0 | 0 | 253.83 KB |
#6340 | StringConcatAspectBenchmark |
netcoreapp3.1 | 337μs | 1.61μs | 9.12μs | 0 | 0 | 0 | 253.8 KB |
#6340 | StringConcatAspectBenchmark |
net472 | 307μs | 7.67μs | 74.7μs | 0 | 0 | 0 | 278.53 KB |
Summary of changes
Reason for change
Implementation details
Test coverage
Other details