Target netstandard2.0 in OneOf.Extended#190
Target netstandard2.0 in OneOf.Extended#190Swimburger wants to merge 2 commits intomcintyre321:masterfrom
Conversation
…sitive dependencies to users
|
Can this be merged? We really appreciate this project, but we cannot depend on it if it isn't patched for security vulnerabilities. We'll have to fork it or find an alternative. |
|
@Swimburger forking maybe, 2mo is quite some time for no interactions regarding a vulnerability issue. |
|
@mcintyre321 it would be awesome for OneOf to accept this vulnerability patch! |
|
Info: you can pin the transient package versions using Central Package Management Especially these two are pinned in all my projects, because of dependencies in some library in my test projects. |
|
@MPapst that only works for consumers of libraries, but we're providing libraries to other customers, so it's not a working solution for us unfortunately. |
|
I want to re-ask about whether this can be merged. Please. Best regards, |
We enjoy using OneOf and are also using OneOf.Extended. Unfortunately, OneOf.Extended targets netstandard1.3, but not more recent versions, which introduce vulnerable transitive dependencies to consumers of our libraries.
Our libraries don't target netstandard1.3, but because netstandard1.3 is the highest version and is compatible with our .NET (Core) TFMs, it uses the netstandard1.3 build.
As a result, we're forced to include System.Net.Http as a direct nuget dependency to overwrite the version used.
Here's the .NET CLI reporting the vulnerable dependency:
This PR adds netstandard2.0 as a TFM which will fix the issue for consumers using netstandard2.0 or above.
output:
Update: I conditionally include a package reference to the vulnerable packages to set their minimum version only when building for netstandard1.3. (Also fixed in OneOf main). I can revert this change tho. Our customers don't use netstandard1.3, so building for 2.0 is sufficient for us.