-
Notifications
You must be signed in to change notification settings - Fork 252
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
Enable server side deprecation of obsolete/legacy NuGet Packages #2867
Comments
@rrelyea this issue was logged before as far as I recall, please dedup |
@yishaigalatzer @rrelyea I searched the GitHub repo and didn't find anything similar - perhaps it was in the old CodePlex site (I didn't search there), or maybe I just missed it. |
Its a good ask, I just recall seeing it before :) You might be right, we just need to spend a few more minutes trying to find the dup |
I cannot find the duplicate. I also cannot find any issue which offers a workflow for dealing with package vulnerabilities. Or information on whether floating versions are supported in .nuspec files. Oldest-possible + no deprecation/version flagging = scary context for security process. Hoping I'm just missing something obvious. |
I agree; this would be a seriously useful feature. In particular I would also like to be able to deprecate specific versions of a package to indicate to anyone trying to install / restore this package that it no longer works (this situation normally arises when you write a client for an API and then the API itself gets deprecated or breaking changes are made). In this case the user should get a warning prompting them to upgrade their version. |
It's a real shame this feature does not exist. I can come up with multiple reasons why we would like to discontinue a certain project and at least give a warning to whoever is using, in a similar fashion to the deprecated attribute in C#. Is this being considered? From my naivety, I suppose this is more of a strategic decision for the nuget team as opposed to amount of code needed. |
I was surprise to hear that chocolatey now has a deprecation feature, which NuGet still doesn't. We'd also have use for this feature - we're currently maintaining duplicate packages, as we don't feel we can remove old packages without causing mass disruption to our users. And automatic upgrade path to a new package, like choco has would be a great solution for this. |
I think chocolatey's "feature" is more a matter of convention. I might be wrong, but I"m pretty sure you can do the same thing in nuget:
That only works if you choose to no longer have the old package available. I think this issue is about keeping the package but also deprecating it and having nuget know it's deprecated. I don't think that's possible using a convention - you need an extra bit somewhere. |
If this feature gets implemented, please can we also have a flag saying, 'This package has a vulnerability.' Our deployed applications have to be reviewed periodically to make sure they are still secure. Part of this process involves checking dependencies to make sure none of them have released security patches. At the moment it's almost impossible to distinguish between feature releases, releases that fix normal bugs, and security releases. This wastes a lot of time for us, and presumably for other people who are trying to take security seriously. |
Seems like a good feature to have as NuGet.org grows and packages become obsolete. I am trying to summarize the scenarios for deprecation here. Please add to the list (and I will add to this list so that it would be easier to design a feature that solves the most of the issues):
|
@anangaur By far the most important thing for me is 'This package has a vulnerability, so users need to upgrade to maintain their systems' security.' The big prize here, IMO, is being able to construct an automated system that tells you about important package upgrades you should be doing. If you're not bothered about automating things, you don't need to build anything extra. You can just release a new version of the package, and put something in the release notes saying why. Incidentally, I think people uploading a new version of a package to Nuget should be asked whether there are security fixes, and forced to say 'yes' or 'no'. That's the only way to make sure that this essential information is captured, because otherwise some people will fix security exposures while not bothering to set the flag (perhaps because they just don't know about it). |
I miss "deprecated" flag, too. Maybe this issue isn't already implemented because we make scope too large? "deprecated" is quite simple: If something is deprecated without follow-up this means "no longer maintained / think about removing it". With a follow-up this means "please upgrade by switching to package xyz". If you search for deprecated packages, you should have to enable some switch (similar to "include prerelease"). If you restore deprecated packages a warning should occur. It's not easy to define semantics (why is it deprecated) and we should let users decide how to handle the warning/flag. Maybe package is useless (incompatible API), maybe not, maybe partially. Security is more difficult: Who defines "is vulnerable"? Package owner, only? There are different levels of vulnerability. Is it only a problem when used in ASP.NET (world accessable)? Only a special feature has a flaw? If you have some openssh like library which support unsecure methode (RC4) is this a vulnerability of the package? Are unflagged packages secure? I see limited use for a "vulnerable" flag. Only useful aspect I could see: This might open a way to let package owners (or NuGet.Org) send security warnings to users. A common (existing) alternative for many projects is a security-announcement mailing list... |
@StefanBertels I would settle for a vulnerable flag that is yes or no, and set by the package owner. Our approach is that we update any vulnerable package, rather than trying to determine whether the vulnerability applies to us. It generally ends up being quicker, and it reduces the likelihood of making errors which allow vulnerable code to stay in production. For people who don't do that, a vulnerable marker would still be useful because it would flag up the package for investigation. One way to make things a bit smoother, I suppose, would be a way for someone to specify on the client side that they have investigated CVE-1234 and decided that it's not relevant to them. Conceptually it would be a bit like suppressing a warning in some source code. The reason people aren't screaming for a vulnerable flag, I think, is that most people just ignore security until it bites them. They deploy code with packages that were believed secure at the time, and then they just forget about it. This is very poor practice and people who do it should be shouted at by the tooling. :) |
@PeteX: (Package) users don't care, too. What happens if you "scare" your users with security warnings? There is a long way to go. |
@anangaur I am very interested in the |
Perhaps not common for many open source projects, but I'd think most companies do (including Microsoft), since most customers require it. |
This looks good, thank you, and it will save a lot of time auditing our deployed applications. A few comments:
These are just a few thoughts but overall it looks very good and will be a big help keeping our systems secure. |
@PeteX, Thanks for the comments. My response:
This was a typo and has been fixed.
Yes. Multiple deprecation reasons can be selected. Refer to the **3. Select Reason(s) storyboard screenshot in the publisher experience.
Deprecation is a publisher based experience. With this feature, we will enable publishers to deprecate packages so that the deprecation warning reaches the consumers of the package. And one of the reasons for deprecation is security vulnerability. |
This feature is interesting for sentry.io to mark a whole package ( |
@bruno-garcia That's my hypothesis too. And we want to warn you if you haven't selected all versions. But we will not stop you if you don't want to select all versions. |
@bruno-garcia @anangaur I never meant to say your scenario isn't valid. It was just that my scenario wasn't covered :-) |
@dotMorten you're right. I made my comment in an attempt to keep both use cases instead of replacing one with the other. |
With the latest proposal, both scenarios are covered :). It warns but allows you to continue deprecating a subset of package versions. |
I don't get why it warns? There's absolutely nothing wrong about deprecating only old or insecure versions. Warning people is essentially telling them that you really shouldn't be doing this. |
Is there a way to combine this with a tool like |
It appears that this feature is currently live? From reading the issue and spec document, I was under the impression that deprecation functionality has not yet rolled out, but just now I was able to set it on a package. Is there a page tracking the current state of this feature? |
@OkGoDoIt The feature is not yet live but in active development. A glitch in the roll out process made the current not-fully-implemented feature live, inadvertently, for some time. We will announce when the feature will be fully functional and live. Apologies for the false-positive. |
I swear I had seen it somewhere! :D |
We are separating out the experience for Deprecating the packages and reporting vulnerabilities. This is because as we made progress on the spec and implementation, it felt more and more like we were merging separate experiences.
I will be forking and updating the spec soon. |
Section CLI consumer experience of the spec has been updated. |
Initial support for this is shipping in NuGet 5.3. Closing this issue to reflect it in release notes. |
saving for later * NuGet package manager UI and `dotnet list package` surface deprecation information from the server. - [#2867](NuGet/Home#2867)
Here's the documentation for package deprecation. |
Update -12/21/2018 by anangaur: Spec
Original comment by @daveaglick:
As NuGet gets older, I've noticed a pattern where some packages have a description along the lines of "This package is old and shouldn't be used, use XYZ instead". It seems reasonable that as projects age, their packages may change names, split, combine, etc. over time. In fact, I'm faced with doing this for a number of packages myself soon.
I propose a feature where we can mark packages as deprecated or obsolete. This would be different from marking them as unlisted in that they would still be available on the gallery and would still show up in search results (perhaps with an additional GUI element to indicate the deprecated state). It would also be nice to specify which package(s) replace them and show that in the gallery and also when installing a deprecated package.
The text was updated successfully, but these errors were encountered: