Skip to content
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

System.Net.Http.Json nuget package not receiving service updates #50914

Closed
ankrause opened this issue Apr 8, 2021 · 15 comments
Closed

System.Net.Http.Json nuget package not receiving service updates #50914

ankrause opened this issue Apr 8, 2021 · 15 comments

Comments

@ankrause
Copy link

ankrause commented Apr 8, 2021

The System.Net.Http.Json library does not appear to get regular updates, it gets major versions (5 and 6) corresponding with the major framework releases, with 6 being in preview.

NuGet: System.Net.Http.Json
NuGet: System.Text.Json

Conversely, the core underlying library (a dependency) System.Text.Json does get regular patch versions (specifically concerned with fixes for CVEs here) and has 5.0.1 and 5.0.2 as available versions.

Can I ask why this library does not get regular updates corresponding with the core underlying dependency? I would expect there to be a 5.0.1 and 5.0.2 that reference the patched versions of the System.Text.Json library. The purpose of this of course is that I can simply reference the System.Net.Http.Json extension library as my sole reference and be fully up-to-date with security patches by default, rather than having to explicitly reference both this package as well as its underlying dependency in order to stay secure.

It seems like a departure from some other libraries, namely the full tree of Microsoft.Extensions- libraries that all get a patch version whenever fixes are introduced regardless of whether an individual library itself was patched, though I recognize that these are probably considered different classes of packages.

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Text.Json untriaged New issue has not been triaged by the area owner labels Apr 8, 2021
@ghost
Copy link

ghost commented Apr 8, 2021

Tagging subscribers to this area: @eiriktsarpalis, @layomia
See info in area-owners.md if you want to be subscribed.

Issue Details

The System.Net.Http.Json library does not appear to get regular updates, it gets major versions (5 and 6) corresponding with the major framework releases, with 6 being in preview.

NuGet: System.Net.Http.Json
NuGet: System.Text.Json

Conversely, the core underlying library (a dependency) System.Text.Json does get regular patch versions (specifically concerned with fixes for CVEs here) and has 5.0.1 and 5.0.2 as available versions.

Can I ask why this library does not get regular updates corresponding with the core underlying dependency? I would expect there to be a 5.0.1 and 5.0.2 that reference the patched versions of the System.Text.Json library. The purpose of this of course is that I can simply reference the System.Net.Http.Json extension library as my sole reference and be fully up-to-date with security patches by default, rather than having to explicitly reference both this package as well as its underlying dependency in order to stay secure.

It seems like a departure from some other libraries, namely the full tree of Microsoft.Extensions- libraries that all get a patch version whenever fixes are introduced regardless of whether an individual library itself was patched, though I recognize that these are probably considered different classes of packages.

Author: ankrause
Assignees: -
Labels:

area-System.Text.Json, untriaged

Milestone: -

@eiriktsarpalis
Copy link
Member

cc @ViktorHofer @safern

@eiriktsarpalis eiriktsarpalis changed the title System.Net.Http.Json does not get patch versions corresponding with the underlying System.Text.Json library System.Net.Http.Json nuget package not receiving service updates Apr 8, 2021
@safern
Copy link
Member

safern commented Apr 8, 2021

@Anipik @ericstj is this some scenario we should support/do in servicing releases at least for security fixes?

@ericstj
Copy link
Member

ericstj commented Apr 8, 2021

All of dotnet/runtime only ships package updates when the packages themselves require a change. We don't ship all upstack dependencies to reference the change, nor do we expect the entire NuGet ecosystem to churn when a package at the bottom of the stack ships an update. cc @terrajobst @blowdart

@watfordgnf
Copy link
Contributor

Consider the case in #49377. Today, the tooling does not provide a "pit of success" for security. You would be unaware and unable to determine the need for an update given the existing tooling.

You could use Microsoft.AspNetCore.Http.Abstractions 2.2.0 as a similar strawman to System.Net.Http.Json, adding it today to your projects you will be completely unaware that System.Text.Encodings.Web is a problem as automatically installed by NuGet. None of the tooling will help you discover this either.

A bad example based on its age, but great because NuGet.org warns you, is using Microsoft.Data.Services.Client 5.2.0 (known vulnerable transitive ref) in a NET472 project:

PS E:\scratch\ConsoleApp1> dotnet list package --include-transitive
Project 'ConsoleApp1' has the following package references
   [net472]:
   Top-level Package                     Requested   Resolved
   > Microsoft.Data.Services.Client      5.2.0       5.2.0

   Transitive Package          Resolved
   > Microsoft.Data.Edm        5.2.0
   > Microsoft.Data.OData      5.2.0
   > System.Spatial            5.2.0

PS E:\scratch\ConsoleApp1> dotnet list package --vulnerable

The following sources were used:
   https://api.nuget.org/v3/index.json
   C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

The given project `ConsoleApp1` has no vulnerable packages given the current sources.
PS E:\scratch\ConsoleApp1> dotnet list package --vulnerable --include-transitive

The following sources were used:
   https://api.nuget.org/v3/index.json
   C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

The given project `ConsoleApp1` has no vulnerable packages given the current sources.

The same is true for inside Visual Studio.

This matters for my org because we'll run our software on air gapped networks for 18-24 months without intervention (ideally). Being able to identify and provide security updates--when applicable--is becoming a lot harder to do as the ecosystem becomes more fragmented and we enjoy an explosion of packages.

If the tooling isn't available to recognize these issues with transitive dependencies delivered by MS, I think this should be addressed at the package owner level (or at least considered) at least as long as the .NET Framework is supported. Our customers will be on that long after ".NET Core" has died and ".NET" has moved onto version 9 or 10 (or 20) thanks to generous extended support contracts.

@ghost
Copy link

ghost commented Apr 12, 2021

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Issue Details

The System.Net.Http.Json library does not appear to get regular updates, it gets major versions (5 and 6) corresponding with the major framework releases, with 6 being in preview.

NuGet: System.Net.Http.Json
NuGet: System.Text.Json

Conversely, the core underlying library (a dependency) System.Text.Json does get regular patch versions (specifically concerned with fixes for CVEs here) and has 5.0.1 and 5.0.2 as available versions.

Can I ask why this library does not get regular updates corresponding with the core underlying dependency? I would expect there to be a 5.0.1 and 5.0.2 that reference the patched versions of the System.Text.Json library. The purpose of this of course is that I can simply reference the System.Net.Http.Json extension library as my sole reference and be fully up-to-date with security patches by default, rather than having to explicitly reference both this package as well as its underlying dependency in order to stay secure.

It seems like a departure from some other libraries, namely the full tree of Microsoft.Extensions- libraries that all get a patch version whenever fixes are introduced regardless of whether an individual library itself was patched, though I recognize that these are probably considered different classes of packages.

Author: ankrause
Assignees: -
Labels:

area-Infrastructure, area-System.Text.Json, untriaged

Milestone: -

@ViktorHofer
Copy link
Member

cc @nkolev92 to provide more details on how NuGet skips/promotes transitive dependencies in case of security vulnerabilities.

@ViktorHofer ViktorHofer added discussion and removed untriaged New issue has not been triaged by the area owner labels Apr 21, 2021
@ViktorHofer ViktorHofer added this to the 6.0.0 milestone Apr 21, 2021
@nkolev92
Copy link
Contributor

Vulnerability reporting does not affect transitive package resolution in NuGet right now.
Elevating it top level is the recommended approach.

@ericstj
Copy link
Member

ericstj commented Apr 21, 2021

@nkolev92 will NuGet raise any warning about a vulnerable transitive dependency to let folks know they need to do that? cc @GrabYourPitchforks

@nkolev92
Copy link
Contributor

At this point it's only available in dotnet list package.
Progress can be tracked here: NuGet/Home#8087

@GrabYourPitchforks
Copy link
Member

Per discussion at #49377, we're aware of this and are actively working on a solution. There is currently nothing to announce yet because we're still hammering out the rough edges.

@ghost
Copy link

ghost commented Jul 29, 2022

Tagging subscribers to this area: @dotnet/area-infrastructure-libraries
See info in area-owners.md if you want to be subscribed.

Issue Details

The System.Net.Http.Json library does not appear to get regular updates, it gets major versions (5 and 6) corresponding with the major framework releases, with 6 being in preview.

NuGet: System.Net.Http.Json
NuGet: System.Text.Json

Conversely, the core underlying library (a dependency) System.Text.Json does get regular patch versions (specifically concerned with fixes for CVEs here) and has 5.0.1 and 5.0.2 as available versions.

Can I ask why this library does not get regular updates corresponding with the core underlying dependency? I would expect there to be a 5.0.1 and 5.0.2 that reference the patched versions of the System.Text.Json library. The purpose of this of course is that I can simply reference the System.Net.Http.Json extension library as my sole reference and be fully up-to-date with security patches by default, rather than having to explicitly reference both this package as well as its underlying dependency in order to stay secure.

It seems like a departure from some other libraries, namely the full tree of Microsoft.Extensions- libraries that all get a patch version whenever fixes are introduced regardless of whether an individual library itself was patched, though I recognize that these are probably considered different classes of packages.

Author: ankrause
Assignees: -
Labels:

area-Infrastructure-libraries, discussion

Milestone: 7.0.0

@ViktorHofer
Copy link
Member

@ericstj you experimented with also require to service transitive package dependencies in dotnet/runtime. What should we do with this issue given that we are approaching .NET 7?

@ericstj
Copy link
Member

ericstj commented Aug 1, 2022

We raised this issue for reconsideration a few months ago and decided not to change our policy around incremental servicing. We will not release packages just to update their dependencies. Should a package need to be re-released for some other reason it will include updated dependencies. cc @GrabYourPitchforks @blowdart

@ViktorHofer
Copy link
Member

Closing as by design.

@ViktorHofer ViktorHofer moved this to Done in Runtime Infra Aug 2, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Sep 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

9 participants