Skip to content

Commit af8bde4

Browse files
Fix known high severity vulnerabilities (#2613)
* workaround known high severity vulnerabilities * Reverted added dependencies. Updated dependencies to fix vulnerabilities. Removed netstandard1.0 target from Annotations. --------- Co-authored-by: Tim <[email protected]>
1 parent 6248e85 commit af8bde4

File tree

10 files changed

+34
-34
lines changed

10 files changed

+34
-34
lines changed

samples/BenchmarkDotNet.Samples.FSharp/BenchmarkDotNet.Samples.FSharp.fsproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
</ItemGroup>
1414
<ItemGroup>
1515
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
16-
<ProjectReference Include="..\..\src\BenchmarkDotNet.TestAdapter\BenchmarkDotNet.TestAdapter.csproj"/>
16+
<ProjectReference Include="..\..\src\BenchmarkDotNet.TestAdapter\BenchmarkDotNet.TestAdapter.csproj" />
1717
</ItemGroup>
1818

1919
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETFramework' ">

src/BenchmarkDotNet.Annotations/BenchmarkDotNet.Annotations.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Import Project="..\..\build\common.props" />
33
<PropertyGroup>
44
<AssemblyTitle>Basic BenchmarkDotNet attributes that can be used to annotate your benchmarks</AssemblyTitle>
5-
<TargetFrameworks>netstandard1.0;netstandard2.0</TargetFrameworks>
5+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
66
<NoWarn>$(NoWarn);1701;1702;1705;1591;3005;NU1702;CA1825</NoWarn>
77
<AssemblyName>BenchmarkDotNet.Annotations</AssemblyName>
88
<PackageId>BenchmarkDotNet.Annotations</PackageId>

src/BenchmarkDotNet.Diagnostics.dotMemory/BenchmarkDotNet.Diagnostics.dotMemory.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="JetBrains.Profiler.SelfApi" Version="2.5.9" />
17+
<PackageReference Include="JetBrains.Profiler.SelfApi" Version="2.5.11" />
1818
</ItemGroup>
1919

2020
</Project>

src/BenchmarkDotNet.Diagnostics.dotTrace/BenchmarkDotNet.Diagnostics.dotTrace.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</ItemGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="JetBrains.Profiler.SelfApi" Version="2.5.9" />
17+
<PackageReference Include="JetBrains.Profiler.SelfApi" Version="2.5.11" />
1818
</ItemGroup>
1919

2020
</Project>

tests/BenchmarkDotNet.Exporters.Plotting.Tests/BenchmarkDotNet.Exporters.Plotting.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
</ItemGroup>
1818
<ItemGroup>
1919
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
20-
<PackageReference Include="xunit" Version="2.6.2" />
21-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
20+
<PackageReference Include="xunit" Version="2.9.2" />
21+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
2222
<PrivateAssets>all</PrivateAssets>
2323
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2424
</PackageReference>

tests/BenchmarkDotNet.IntegrationTests.ManualRunning.MultipleFrameworks/BenchmarkDotNet.IntegrationTests.ManualRunning.MultipleFrameworks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
</ItemGroup>
4040
<ItemGroup>
4141
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
42-
<PackageReference Include="xunit" Version="2.6.2" />
42+
<PackageReference Include="xunit" Version="2.9.2" />
4343
<!-- We use older version 2.4.1 for combatibility with netcoreapp3.1. -->
4444
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
4545
<PrivateAssets>all</PrivateAssets>

tests/BenchmarkDotNet.IntegrationTests.ManualRunning/BenchmarkDotNet.IntegrationTests.ManualRunning.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\build\common.props" />
33
<PropertyGroup>
44
<AssemblyTitle>BenchmarkDotNet.IntegrationTests.ManualRunning</AssemblyTitle>
@@ -35,8 +35,8 @@
3535
</ItemGroup>
3636
<ItemGroup>
3737
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
38-
<PackageReference Include="xunit" Version="2.6.2" />
39-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
38+
<PackageReference Include="xunit" Version="2.9.2" />
39+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
4040
<PrivateAssets>all</PrivateAssets>
4141
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4242
</PackageReference>

tests/BenchmarkDotNet.IntegrationTests/BenchmarkDotNet.IntegrationTests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
3636
<!-- We implicitly need v13.0.1 of Newtonsoft.Json for BenchmarkDotNet.IntegrationTests.NuGetReferenceTests -->
3737
<PackageReference Include="Newtonsoft.Json" Version="[13.0.1]" />
38-
<PackageReference Include="xunit" Version="2.6.2" />
39-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
38+
<PackageReference Include="xunit" Version="2.9.2" />
39+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
4040
<PrivateAssets>all</PrivateAssets>
4141
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4242
</PackageReference>

tests/BenchmarkDotNet.Tests/BenchmarkDotNet.Tests.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2-
<Import Project="..\..\build\common.props"/>
2+
<Import Project="..\..\build\common.props" />
33
<PropertyGroup>
44
<AssemblyTitle>BenchmarkDotNet.Tests</AssemblyTitle>
55
<TargetFrameworks>net8.0;net462</TargetFrameworks>
@@ -17,9 +17,9 @@
1717
<ItemGroup>
1818
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
1919
<!-- We use Verify.Xunit v20.8.2 because it's the latest version with net461 support -->
20-
<PackageReference Include="Verify.Xunit" Version="[20.8.2]"/>
21-
<PackageReference Include="xunit" Version="2.6.2"/>
22-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
20+
<PackageReference Include="Verify.Xunit" Version="[20.8.2]" />
21+
<PackageReference Include="xunit" Version="2.9.2" />
22+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
2323
<PrivateAssets>all</PrivateAssets>
2424
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2525
</PackageReference>
@@ -40,10 +40,10 @@
4040
<ProjectReference Include="..\..\src\BenchmarkDotNet\BenchmarkDotNet.csproj" />
4141
</ItemGroup>
4242
<ItemGroup>
43-
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}"/>
43+
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
4444
</ItemGroup>
4545
<ItemGroup>
46-
<EmbeddedResource Include="Detectors\Cpu\TestFiles\*.txt"/>
46+
<EmbeddedResource Include="Detectors\Cpu\TestFiles\*.txt" />
4747
</ItemGroup>
4848
<ItemGroup>
4949
<None Update="Detectors\Cpu\VerifiedFiles\CpuInfoFormatterTests.FormatTest.verified.txt">

tests/BenchmarkDotNet.Tests/ConfigParserTests.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ public void UserCanSpecifyMultipleCoreRunPaths()
233233

234234
var jobs = config.GetJobs().ToArray();
235235
Assert.Equal(2, jobs.Length);
236-
Assert.Single(jobs.Where(job => job.GetToolchain() is CoreRunToolchain toolchain && toolchain.SourceCoreRun.FullName == fakeCoreRunPath_1));
237-
Assert.Single(jobs.Where(job => job.GetToolchain() is CoreRunToolchain toolchain && toolchain.SourceCoreRun.FullName == fakeCoreRunPath_2));
236+
Assert.Single(jobs, job => job.GetToolchain() is CoreRunToolchain toolchain && toolchain.SourceCoreRun.FullName == fakeCoreRunPath_1);
237+
Assert.Single(jobs, job => job.GetToolchain() is CoreRunToolchain toolchain && toolchain.SourceCoreRun.FullName == fakeCoreRunPath_2);
238238
}
239239

240240
[Fact]
@@ -244,7 +244,7 @@ public void MonoPathParsedCorrectly()
244244
var config = ConfigParser.Parse(new[] { "-r", "mono", "--monoPath", fakeMonoPath }, new OutputLogger(Output)).config;
245245

246246
Assert.Single(config.GetJobs());
247-
Assert.Single(config.GetJobs().Where(job => job.Environment.Runtime is MonoRuntime mono && mono.CustomPath == fakeMonoPath));
247+
Assert.Single(config.GetJobs(), job => job.Environment.Runtime is MonoRuntime mono && mono.CustomPath == fakeMonoPath);
248248
}
249249

250250
[FactEnvSpecific("Testing local builds of Full .NET Framework is supported only on Windows", EnvRequirement.WindowsOnly)]
@@ -254,7 +254,7 @@ public void ClrVersionParsedCorrectly()
254254
var config = ConfigParser.Parse(new[] { "--clrVersion", clrVersion }, new OutputLogger(Output)).config;
255255

256256
Assert.Single(config.GetJobs());
257-
Assert.Single(config.GetJobs().Where(job => job.Environment.Runtime is ClrRuntime clr && clr.Version == clrVersion));
257+
Assert.Single(config.GetJobs(), job => job.Environment.Runtime is ClrRuntime clr && clr.Version == clrVersion);
258258
}
259259

260260
[Fact]
@@ -418,20 +418,20 @@ public void CanCompareFewDifferentRuntimes()
418418
new OutputLogger(Output)).config;
419419

420420
Assert.True(config.GetJobs().First().Meta.Baseline); // when the user provides multiple runtimes the first one should be marked as baseline
421-
Assert.Single(config.GetJobs().Where(job => job.Environment.Runtime is ClrRuntime clrRuntime && clrRuntime.MsBuildMoniker == "net462"));
422-
Assert.Single(config.GetJobs().Where(job => job.Environment.Runtime is MonoRuntime));
423-
Assert.Single(config.GetJobs().Where(job =>
421+
Assert.Single(config.GetJobs(), job => job.Environment.Runtime is ClrRuntime clrRuntime && clrRuntime.MsBuildMoniker == "net462");
422+
Assert.Single(config.GetJobs(), job => job.Environment.Runtime is MonoRuntime);
423+
Assert.Single(config.GetJobs(), job =>
424424
job.Environment.Runtime is CoreRuntime coreRuntime && coreRuntime.MsBuildMoniker == "netcoreapp3.1" &&
425-
coreRuntime.RuntimeMoniker == RuntimeMoniker.NetCoreApp31));
426-
Assert.Single(config.GetJobs().Where(job =>
425+
coreRuntime.RuntimeMoniker == RuntimeMoniker.NetCoreApp31);
426+
Assert.Single(config.GetJobs(), job =>
427427
job.Environment.Runtime is NativeAotRuntime nativeAot && nativeAot.MsBuildMoniker == "net6.0" &&
428-
nativeAot.RuntimeMoniker == RuntimeMoniker.NativeAot60));
429-
Assert.Single(config.GetJobs().Where(job =>
428+
nativeAot.RuntimeMoniker == RuntimeMoniker.NativeAot60);
429+
Assert.Single(config.GetJobs(), job =>
430430
job.Environment.Runtime is NativeAotRuntime nativeAot && nativeAot.MsBuildMoniker == "net7.0" &&
431-
nativeAot.RuntimeMoniker == RuntimeMoniker.NativeAot70));
432-
Assert.Single(config.GetJobs().Where(job =>
431+
nativeAot.RuntimeMoniker == RuntimeMoniker.NativeAot70);
432+
Assert.Single(config.GetJobs(), job =>
433433
job.Environment.Runtime is NativeAotRuntime nativeAot && nativeAot.MsBuildMoniker == "net8.0" &&
434-
nativeAot.RuntimeMoniker == RuntimeMoniker.NativeAot80));
434+
nativeAot.RuntimeMoniker == RuntimeMoniker.NativeAot80);
435435
}
436436

437437
[Theory]
@@ -469,8 +469,8 @@ public void CanParseHardwareCounters()
469469
new OutputLogger(Output)).config;
470470

471471
Assert.Equal(2, config.GetHardwareCounters().Count());
472-
Assert.Single(config.GetHardwareCounters().Where(counter => counter == HardwareCounter.CacheMisses));
473-
Assert.Single(config.GetHardwareCounters().Where(counter => counter == HardwareCounter.InstructionRetired));
472+
Assert.Single(config.GetHardwareCounters(), counter => counter == HardwareCounter.CacheMisses);
473+
Assert.Single(config.GetHardwareCounters(), counter => counter == HardwareCounter.InstructionRetired);
474474
}
475475

476476
[Fact]

0 commit comments

Comments
 (0)