Fix known high severity vulnerabilities - #2613
Conversation
I gave it a try and it has not solved the problem. Considering https://learn.microsoft.com/en-us/dotnet/standard/net-standard?tabs=net-standard-2-0 the right solution would be to remove |
|
I don't know if it'd help for this situation, but for the
case, if you wanted to keep the old .NET Standard 1.x version, I think some of the Serilog libraries used to set for .NET Standard 1.x targets to remove the automatic dependency on |
ericstj
left a comment
There was a problem hiding this comment.
If you can, get all your dependencies to, at the very least, add new target frameworks that are newer than netstandard1.x. When targeting netstandard2.0 or newer no framework packages are referenced at all. Ideally they'd remove the netstandard1.x targets as well - but that's not necessary to expose fewer dependencies to consumers.
If you can't get your dependencies to do that, then updating to the latest version of NETStandard.Library may solve the issue without needing to add unused dependencies since the latest version of this package will avoid bringing in the old packages on frameowrks where they aren't needed.
This comment was marked as resolved.
This comment was marked as resolved.
|
I vote for dropping Speaking of |
Updated dependencies to fix vulnerabilities. Removed netstandard1.0 target from Annotations.
I've tried to build and run our samples today and got following errors:
My first thought was that the fix will be straightforward: just update
System.Text.RegularExpressionsandSystem.Net.Httpto most recent versions. I've quickly realized that these are transitive dependencies.In case of
BenchmarkDotNet.Annotations, this project targetsnetstandard1.0(it's just a project with attributes, almost no logic at all and we wanted to target lowest tfm possible). This gives us a dependency to https://www.nuget.org/packages/NETStandard.Library/1.6.1. Can we just update it? No, because it has not been updated since 2018. The following warning suggests that it's on purpose:I could just remove the
netstandard1.0TFM fromBenchmarkDotNet.Annotations, butBenchmarkDotNet.Diagnostics.dotTraceandBenchmarkDotNet.Diagnostics.dotMemoryboth depend on https://www.nuget.org/packages/JetBrains.Profiler.SelfApi/, which depends on https://www.nuget.org/packages/JetBrains.HabitatDetector/ which depends on https://www.nuget.org/packages/JetBrains.FormatRipper/ which has the same dependency:As a quick workaround I've decided to just add a dependency to these two packages (
System.Text.RegularExpressionsandSystem.Net.Http) toBenchmarkDotNet.Annotations, which all BDN packages depend on.The alternatives I've considered:
System.Text.RegularExpressionsandSystem.Net.Http.net46tonet462(this would pick up thenetstandard2.0dependency ofJetBrains.HabitatDetectorand solve the problem). But this would be a breaking change (cc @AndreyAkinshin).cc @ericstj