-
Notifications
You must be signed in to change notification settings - Fork 147
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
[IAST] Lock vulnerabilities list access #6531
Conversation
var ranges = vulnerability.Evidence?.Ranges; | ||
|
||
if (ranges != null) | ||
lock (Vulnerabilities) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there's lots more potential concurrency issues in this type🤔 For example, there's concurrent access to Sources
which similarly could cause issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, but they only occur when adding a vulnerability when serializing, so covering both methods should be enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
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 (6531) - mean (69ms) : 65, 72
. : milestone, 69,
master - mean (69ms) : 66, 72
. : milestone, 69,
section CallTarget+Inlining+NGEN
This PR (6531) - mean (980ms) : 959, 1002
. : milestone, 980,
master - mean (975ms) : 950, 1001
. : milestone, 975,
gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6531) - mean (107ms) : 104, 111
. : milestone, 107,
master - mean (108ms) : 105, 110
. : milestone, 108,
section CallTarget+Inlining+NGEN
This PR (6531) - mean (678ms) : 658, 699
. : milestone, 678,
master - mean (679ms) : 664, 694
. : milestone, 679,
gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6531) - mean (91ms) : 88, 93
. : milestone, 91,
master - mean (91ms) : 90, 93
. : milestone, 91,
section CallTarget+Inlining+NGEN
This PR (6531) - mean (633ms) : 617, 649
. : milestone, 633,
master - mean (635ms) : 619, 651
. : milestone, 635,
gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6531) - mean (190ms) : 185, 195
. : milestone, 190,
master - mean (194ms) : 189, 198
. : milestone, 194,
section CallTarget+Inlining+NGEN
This PR (6531) - mean (1,092ms) : 1057, 1127
. : milestone, 1092,
master - mean (1,094ms) : 1067, 1122
. : milestone, 1094,
gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6531) - mean (275ms) : 272, 279
. : milestone, 275,
master - mean (277ms) : 273, 281
. : milestone, 277,
section CallTarget+Inlining+NGEN
This PR (6531) - mean (867ms) : 837, 897
. : milestone, 867,
master - mean (871ms) : 849, 892
. : milestone, 871,
gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat X
axisFormat %s
todayMarker off
section Baseline
This PR (6531) - mean (264ms) : 260, 268
. : milestone, 264,
master - mean (267ms) : 263, 271
. : milestone, 267,
section CallTarget+Inlining+NGEN
This PR (6531) - mean (843ms) : 813, 873
. : milestone, 843,
master - mean (855ms) : 820, 889
. : milestone, 855,
|
Datadog ReportBranch report: ✅ 0 Failed, 239672 Passed, 1978 Skipped, 18h 38m 10.94s Total Time |
Benchmarks Report for appsec 🐌Benchmarks for #6531 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 - Faster 🎉 Fewer allocations 🎉
|
Benchmark | base/diff | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net6.0 | 1.193 | 61,100.00 | 51,200.00 |
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatAspectBenchmark‑net6.0 | 264.02 KB | 254.88 KB | -9.14 KB | -3.46% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StringConcatBenchmark |
net6.0 | 59.4μs | 518ns | 4.75μs | 0 | 0 | 0 | 43.44 KB |
master | StringConcatBenchmark |
netcoreapp3.1 | 54μs | 236ns | 818ns | 0 | 0 | 0 | 42.64 KB |
master | StringConcatBenchmark |
net472 | 38.5μs | 174ns | 651ns | 0 | 0 | 0 | 59.07 KB |
master | StringConcatAspectBenchmark |
net6.0 | 308μs | 1.36μs | 5.11μs | 0 | 0 | 0 | 264.02 KB |
master | StringConcatAspectBenchmark |
netcoreapp3.1 | 346μs | 1.71μs | 7.64μs | 0 | 0 | 0 | 255.27 KB |
master | StringConcatAspectBenchmark |
net472 | 282μs | 5.75μs | 55.4μs | 0 | 0 | 0 | 278.53 KB |
#6531 | StringConcatBenchmark |
net6.0 | 51.2μs | 257ns | 1.06μs | 0 | 0 | 0 | 43.44 KB |
#6531 | StringConcatBenchmark |
netcoreapp3.1 | 53.6μs | 275ns | 1.26μs | 0 | 0 | 0 | 42.64 KB |
#6531 | StringConcatBenchmark |
net472 | 37.8μs | 171ns | 641ns | 0 | 0 | 0 | 59.07 KB |
#6531 | StringConcatAspectBenchmark |
net6.0 | 316μs | 1.54μs | 9.52μs | 0 | 0 | 0 | 254.88 KB |
#6531 | StringConcatAspectBenchmark |
netcoreapp3.1 | 348μs | 1.59μs | 8.4μs | 0 | 0 | 0 | 254.4 KB |
#6531 | StringConcatAspectBenchmark |
net472 | 280μs | 5.47μs | 51.6μs | 0 | 0 | 0 | 278.53 KB |
Benchmarks Report for tracer 🐌Benchmarks for #6531 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 ✔️ More allocations
|
Benchmark | Base Allocated | Diff Allocated | Change | Change % |
---|---|---|---|---|
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark.WriteAndFlushEnrichedTraces‑net6.0 | 41.43 KB | 41.64 KB | 209 B | 0.50% |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | WriteAndFlushEnrichedTraces |
net6.0 | 580μs | 2.98μs | 14.3μs | 0.598 | 0 | 0 | 41.43 KB |
master | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 657μs | 2.64μs | 9.87μs | 0.347 | 0 | 0 | 41.79 KB |
master | WriteAndFlushEnrichedTraces |
net472 | 829μs | 3.27μs | 12.7μs | 8.33 | 2.5 | 0.417 | 53.28 KB |
#6531 | WriteAndFlushEnrichedTraces |
net6.0 | 566μs | 1.58μs | 5.93μs | 0.563 | 0 | 0 | 41.64 KB |
#6531 | WriteAndFlushEnrichedTraces |
netcoreapp3.1 | 651μs | 2.84μs | 12.1μs | 0.334 | 0 | 0 | 41.63 KB |
#6531 | WriteAndFlushEnrichedTraces |
net472 | 852μs | 4.11μs | 15.9μs | 8.28 | 2.48 | 0.414 | 53.27 KB |
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | ExecuteNonQuery |
net6.0 | 1.3μs | 1.56ns | 6.04ns | 0.0143 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
netcoreapp3.1 | 1.83μs | 4ns | 15.5ns | 0.0136 | 0 | 0 | 1.02 KB |
master | ExecuteNonQuery |
net472 | 2.12μs | 2.29ns | 8.88ns | 0.157 | 0.00105 | 0 | 987 B |
#6531 | ExecuteNonQuery |
net6.0 | 1.19μs | 1.21ns | 4.68ns | 0.0143 | 0 | 0 | 1.02 KB |
#6531 | ExecuteNonQuery |
netcoreapp3.1 | 1.71μs | 1.18ns | 4.58ns | 0.0136 | 0 | 0 | 1.02 KB |
#6531 | ExecuteNonQuery |
net472 | 2.13μs | 1.59ns | 5.95ns | 0.157 | 0.00106 | 0 | 987 B |
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | CallElasticsearch |
net6.0 | 1.28μs | 0.577ns | 2.23ns | 0.0134 | 0 | 0 | 976 B |
master | CallElasticsearch |
netcoreapp3.1 | 1.52μs | 1.07ns | 4.01ns | 0.0129 | 0 | 0 | 976 B |
master | CallElasticsearch |
net472 | 2.68μs | 2.19ns | 8.48ns | 0.157 | 0 | 0 | 995 B |
master | CallElasticsearchAsync |
net6.0 | 1.33μs | 0.617ns | 2.22ns | 0.0132 | 0 | 0 | 952 B |
master | CallElasticsearchAsync |
netcoreapp3.1 | 1.64μs | 2.92ns | 11.3ns | 0.0141 | 0 | 0 | 1.02 KB |
master | CallElasticsearchAsync |
net472 | 2.6μs | 1.7ns | 6.34ns | 0.166 | 0 | 0 | 1.05 KB |
#6531 | CallElasticsearch |
net6.0 | 1.19μs | 1.4ns | 5.22ns | 0.0138 | 0 | 0 | 976 B |
#6531 | CallElasticsearch |
netcoreapp3.1 | 1.48μs | 4.04ns | 15.7ns | 0.0132 | 0 | 0 | 976 B |
#6531 | CallElasticsearch |
net472 | 2.53μs | 1.83ns | 7.09ns | 0.157 | 0 | 0 | 995 B |
#6531 | CallElasticsearchAsync |
net6.0 | 1.27μs | 0.571ns | 2.21ns | 0.0133 | 0 | 0 | 952 B |
#6531 | CallElasticsearchAsync |
netcoreapp3.1 | 1.65μs | 0.612ns | 2.29ns | 0.0141 | 0 | 0 | 1.02 KB |
#6531 | CallElasticsearchAsync |
net472 | 2.6μs | 1.63ns | 6.08ns | 0.166 | 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.32μs | 1.08ns | 4.04ns | 0.0133 | 0 | 0 | 952 B |
master | ExecuteAsync |
netcoreapp3.1 | 1.74μs | 0.99ns | 3.83ns | 0.0128 | 0 | 0 | 952 B |
master | ExecuteAsync |
net472 | 1.79μs | 0.376ns | 1.46ns | 0.145 | 0 | 0 | 915 B |
#6531 | ExecuteAsync |
net6.0 | 1.3μs | 0.612ns | 2.29ns | 0.0131 | 0 | 0 | 952 B |
#6531 | ExecuteAsync |
netcoreapp3.1 | 1.58μs | 0.709ns | 2.75ns | 0.0129 | 0 | 0 | 952 B |
#6531 | ExecuteAsync |
net472 | 1.86μs | 0.34ns | 1.27ns | 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.41μs | 1.7ns | 6.6ns | 0.0308 | 0 | 0 | 2.31 KB |
master | SendAsync |
netcoreapp3.1 | 5.24μs | 2.83ns | 11ns | 0.0394 | 0 | 0 | 2.85 KB |
master | SendAsync |
net472 | 7.34μs | 1.84ns | 7.11ns | 0.492 | 0 | 0 | 3.12 KB |
#6531 | SendAsync |
net6.0 | 4.39μs | 1.78ns | 6.65ns | 0.031 | 0 | 0 | 2.31 KB |
#6531 | SendAsync |
netcoreapp3.1 | 5.31μs | 1.76ns | 6.81ns | 0.0373 | 0 | 0 | 2.85 KB |
#6531 | SendAsync |
net472 | 7.43μs | 1.49ns | 5.56ns | 0.495 | 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.46μs | 0.863ns | 3.34ns | 0.0227 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
netcoreapp3.1 | 2.27μs | 1.14ns | 4.25ns | 0.0216 | 0 | 0 | 1.64 KB |
master | EnrichedLog |
net472 | 2.72μs | 1.54ns | 5.56ns | 0.249 | 0 | 0 | 1.57 KB |
#6531 | EnrichedLog |
net6.0 | 1.5μs | 0.849ns | 3.18ns | 0.023 | 0 | 0 | 1.64 KB |
#6531 | EnrichedLog |
netcoreapp3.1 | 2.34μs | 1.35ns | 5.05ns | 0.0223 | 0 | 0 | 1.64 KB |
#6531 | EnrichedLog |
net472 | 2.71μs | 1.12ns | 4.2ns | 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 | 121μs | 95ns | 368ns | 0.0602 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
netcoreapp3.1 | 119μs | 147ns | 530ns | 0.0599 | 0 | 0 | 4.28 KB |
master | EnrichedLog |
net472 | 151μs | 321ns | 1.24μs | 0.671 | 0.224 | 0 | 4.46 KB |
#6531 | EnrichedLog |
net6.0 | 117μs | 387ns | 1.45μs | 0.0581 | 0 | 0 | 4.28 KB |
#6531 | EnrichedLog |
netcoreapp3.1 | 122μs | 103ns | 400ns | 0 | 0 | 0 | 4.28 KB |
#6531 | EnrichedLog |
net472 | 151μs | 262ns | 1.02μs | 0.678 | 0.226 | 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.11μs | 0.716ns | 2.77ns | 0.0299 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
netcoreapp3.1 | 4.18μs | 2.14ns | 8.31ns | 0.0292 | 0 | 0 | 2.2 KB |
master | EnrichedLog |
net472 | 5.06μs | 1.46ns | 5.66ns | 0.32 | 0 | 0 | 2.02 KB |
#6531 | EnrichedLog |
net6.0 | 2.91μs | 0.784ns | 3.04ns | 0.0305 | 0 | 0 | 2.2 KB |
#6531 | EnrichedLog |
netcoreapp3.1 | 4.26μs | 1.72ns | 6.42ns | 0.0298 | 0 | 0 | 2.2 KB |
#6531 | EnrichedLog |
net472 | 5.03μs | 0.825ns | 3.09ns | 0.32 | 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.39μs | 0.997ns | 3.86ns | 0.0163 | 0 | 0 | 1.14 KB |
master | SendReceive |
netcoreapp3.1 | 1.76μs | 1.22ns | 4.4ns | 0.0158 | 0 | 0 | 1.14 KB |
master | SendReceive |
net472 | 2.1μs | 0.779ns | 2.91ns | 0.184 | 0 | 0 | 1.16 KB |
#6531 | SendReceive |
net6.0 | 1.26μs | 1.52ns | 5.87ns | 0.0162 | 0 | 0 | 1.14 KB |
#6531 | SendReceive |
netcoreapp3.1 | 1.77μs | 1.34ns | 5.21ns | 0.0151 | 0 | 0 | 1.14 KB |
#6531 | SendReceive |
net472 | 2.07μs | 1.4ns | 5.41ns | 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.79μs | 0.541ns | 1.95ns | 0.0222 | 0 | 0 | 1.6 KB |
master | EnrichedLog |
netcoreapp3.1 | 3.85μs | 1.78ns | 6.91ns | 0.0212 | 0 | 0 | 1.65 KB |
master | EnrichedLog |
net472 | 4.3μs | 2.32ns | 8.98ns | 0.322 | 0 | 0 | 2.04 KB |
#6531 | EnrichedLog |
net6.0 | 2.81μs | 0.881ns | 3.3ns | 0.0225 | 0 | 0 | 1.6 KB |
#6531 | EnrichedLog |
netcoreapp3.1 | 3.85μs | 4.05ns | 15.7ns | 0.0211 | 0 | 0 | 1.65 KB |
#6531 | EnrichedLog |
net472 | 4.27μs | 3.57ns | 13.8ns | 0.322 | 0 | 0 | 2.04 KB |
Benchmarks.Trace.SpanBenchmark - Slower ⚠️ Same allocations ✔️
Slower ⚠️ in #6531
Benchmark
diff/base
Base Median (ns)
Diff Median (ns)
Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1
1.118
686.72
767.58
Benchmark | diff/base | Base Median (ns) | Diff Median (ns) | Modality |
---|---|---|---|---|
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑netcoreapp3.1 | 1.118 | 686.72 | 767.58 |
Raw results
Branch | Method | Toolchain | Mean | StdError | StdDev | Gen 0 | Gen 1 | Gen 2 | Allocated |
---|---|---|---|---|---|---|---|---|---|
master | StartFinishSpan |
net6.0 | 403ns | 0.294ns | 1.14ns | 0.0081 | 0 | 0 | 576 B |
master | StartFinishSpan |
netcoreapp3.1 | 569ns | 0.401ns | 1.5ns | 0.00769 | 0 | 0 | 576 B |
master | StartFinishSpan |
net472 | 710ns | 0.553ns | 2.14ns | 0.0917 | 0 | 0 | 578 B |
master | StartFinishScope |
net6.0 | 541ns | 0.262ns | 1.02ns | 0.00972 | 0 | 0 | 696 B |
master | StartFinishScope |
netcoreapp3.1 | 686ns | 0.527ns | 2.04ns | 0.00938 | 0 | 0 | 696 B |
master | StartFinishScope |
net472 | 927ns | 0.39ns | 1.46ns | 0.105 | 0 | 0 | 658 B |
#6531 | StartFinishSpan |
net6.0 | 397ns | 0.172ns | 0.643ns | 0.00801 | 0 | 0 | 576 B |
#6531 | StartFinishSpan |
netcoreapp3.1 | 560ns | 0.606ns | 2.19ns | 0.00782 | 0 | 0 | 576 B |
#6531 | StartFinishSpan |
net472 | 676ns | 0.195ns | 0.755ns | 0.0917 | 0 | 0 | 578 B |
#6531 | StartFinishScope |
net6.0 | 488ns | 0.407ns | 1.57ns | 0.00976 | 0 | 0 | 696 B |
#6531 | StartFinishScope |
netcoreapp3.1 | 768ns | 0.458ns | 1.77ns | 0.00931 | 0 | 0 | 696 B |
#6531 | StartFinishScope |
net472 | 841ns | 0.336ns | 1.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 | 654ns | 0.525ns | 2.03ns | 0.00982 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
netcoreapp3.1 | 873ns | 0.651ns | 2.52ns | 0.00942 | 0 | 0 | 696 B |
master | RunOnMethodBegin |
net472 | 1.12μs | 0.706ns | 2.73ns | 0.104 | 0 | 0 | 658 B |
#6531 | RunOnMethodBegin |
net6.0 | 593ns | 0.307ns | 1.19ns | 0.00978 | 0 | 0 | 696 B |
#6531 | RunOnMethodBegin |
netcoreapp3.1 | 963ns | 0.603ns | 2.33ns | 0.00925 | 0 | 0 | 696 B |
#6531 | RunOnMethodBegin |
net472 | 1.17μs | 0.568ns | 2.13ns | 0.104 | 0 | 0 | 658 B |
8356b1f
to
688f6cf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ad discussed, I think this type is inherently unsafe as it exposes public, mutable, non-thread-safe properties while also mutating them internally. The type isn't thread safe, yet it is used across threads.
There are probably some small fixes we can do to reduce the risk here, like exposing non-mutable collections at least.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This good, but agree with Andrew's comment that there's probably more to do.
Cover the whole json generation Covered ToMessagePack Covered the rest of vulnerable methods Increased safety Fix test
fbf9d9c
to
b3fa46e
Compare
Summary of changes
Lock access to vulnerabilities list in
VulnerabilityBatch
Reason for change
A crash has been reported where a vuln is added when serializing the
VulnerabilityBatch
Implementation details
Add lock to
Vulnerabilities
list accessTest coverage
Other details