-
-
Notifications
You must be signed in to change notification settings - Fork 587
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
Added support of deprecation of Nuget and Npm #4521
base: master
Are you sure you want to change the base?
Conversation
- Added support of deprecation for Npm Signed-off-by: pohli81 <[email protected]>
I recently thought about doing something like this. But I realized it might be good to align any changes here with the (hopefully) upcoming OWASP Common Lifecycle Enumeration. https://docs.google.com/document/d/1sRMS1IX0r7ZkYthDR0VY1bYyvp_6K_xw4sR1vZwla8E/edit?tab=t.0 Would it be wise to pick fieldnames for DT from those already mentioned in the document? |
@pohli81 Thanks for the PR! Are deprecations in the NuGet and NPM ecosystem on a per-package, or a per-version basis? The limitation we have is that So if only a subset of versions was to be deprecated, we cannot record this in I do agree with @valentijnscholten in that we should look towards CLE and align with it as much as possible. But in any case, we probably need a slight refactoring to support resolution of metadata on the version-level. Or even more granular, on the full PURL, so that qualifiers etc. are also considered. |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more Footnotes
|
…s for package version checks Signed-off-by: pohli81 <[email protected]>
Thanks for the answers. The deprecation information is on version level. My implementation sets the deprecation only in case the latest version is marked as deprecated. Unfortunately the reason for deprecation is mentioned in the message (EOL, renamed, no longer maintained, ...) so it is currently not easy to inference the reason. At least there is an enumeration in Nuget describing the reason (see https://learn.microsoft.com/en-us/nuget/api/registration-base-url-resource#package-deprecation). I added further tests to make the limitation transparent. There was also a bug I made in the NpmAnalyzer implementation I also fixed. You are right @nscuro that the implementation based on version level needs a larger refactoring. The current impementation allows to make it visible in the UI, that there will be no newer package and Dependency Track can show the reason of the deprecation in a message. I read the specification but currently it is not obvious to map the specification to the information available in the repositories and the data model of Dependency Track. So perhaps there could be a versionEvent field of type enumeration with the potential members out of the specification instead of isDeprecated of type boolean. If we find an acceptable solution I can implement the same for further repositories supporting deprecation. |
Added support of deprecation for Nuget and Npm
Description
The component meta information is extended by the deprecation string and a boolean whether the component is deprecated or not. Currently this is implemented for Nuget and Npm. This enhancement can be used to show deprecation information in the component list as in the following example:
Addressed Issue
This PR should fix #2388.
Additional Details
Currently it is implemented only for Nuget and Npm. It has to be implemented for other package repositories as well.
Checklist