Skip to content

Add Self-hydration for vulnerability capabilities. - #6323

Merged
jgonz120 merged 14 commits into
dev-feature-PackageDomainModelfrom
dev-jgonz120-AddVulnerabiityCapabilities
Mar 20, 2025
Merged

jgonz120 merged 14 commits into
dev-feature-PackageDomainModelfrom
dev-jgonz120-AddVulnerabiityCapabilities

Conversation

@jgonz120

@jgonz120 jgonz120 commented Mar 18, 2025 •

Copy link
Copy Markdown
Contributor

Bug

Fixes:

Description

Added vulnerability capabilities for loading from different stores.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

@jgonz120
jgonz120 changed the base branch from dev to dev-feature-PackageDomainModel March 18, 2025 21:47
@jgonz120
jgonz120 marked this pull request as ready for review March 19, 2025 18:43
@jgonz120
jgonz120 requested a review from a team as a code owner March 19, 2025 18:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces vulnerability capabilities for handling package data from multiple sources and updates various models and tests to leverage the new IVulnerableCapable interface. Key changes include:

  • Adding two new capability implementations: VulnerablePackageMetadataCapability and VulnerableDatabaseCapability.
  • Updating the VulnerableCapabilityBase class to make vulnerabilities nullable and sorting them.
  • Refactoring package models and their tests to use the new IVulnerableCapable interface.

Reviewed Changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/Package/TestVulnerableCapability.cs New test implementation for vulnerability capability testing.
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/VulnerablePackageMetadataCapability.cs Implements vulnerability capability using package metadata.
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/Package/VulnerableDatabaseCapabilityTests.cs Tests for the new VulnerableDatabaseCapability.
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/VulnerableDatabaseCapability.cs Implements vulnerability capability based on database information.
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/Package/VulnerablePackageMetadataCapabilityTests.cs Tests for the metadata-based vulnerability capability.
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/IVulnerableCapable.cs Updates the vulnerability interface to support nullable vulnerabilities and async data population.
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/VulnerableCapabilityBase.cs Refactors the base vulnerability capability with nullability support and ordered sorting.
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/ReferencedPackageModel.cs Updated to use IVulnerableCapable instead of IVulnerable.
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/RemotePackageModel.cs Updated to use IVulnerableCapable instead of IVulnerable.
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/LocalPackageModel.cs Updated to use IVulnerableCapable instead of IVulnerable.
test/NuGet.Clients.Tests/NuGet.PackageManagement.UI.Test/Models/Package/* Numerous test updates to reflect the interface renamings and ensure proper behavior.
src/NuGet.Clients/NuGet.PackageManagement.UI/Models/Package/TransitivelyReferencedPackageModel.cs Adjusted to use IVulnerableCapable, aligning with the new vulnerability capability design.

@jgonz120
jgonz120 force-pushed the dev-jgonz120-AddVulnerabiityCapabilities branch from bd47064 to 0970576 Compare March 19, 2025 21:33
@jgonz120 jgonz120 changed the title Add vulnerability capabilities. Add Self-hydration for vulnerability capabilities. Mar 19, 2025
@jgonz120
jgonz120 merged commit 5a06363 into dev-feature-PackageDomainModel Mar 20, 2025
@jgonz120
jgonz120 deleted the dev-jgonz120-AddVulnerabiityCapabilities branch March 20, 2025 00:30
jebriede pushed a commit that referenced this pull request Mar 24, 2025
* Added some vulnerability capabilities

* Update to have refresh action

* Added tests and use interface

* PR comments

* Pr comments

* Remove unused variable

* Remove extra parameters

* update tests

* update words

* combine throw

* add readonly

* simplify

* fix words

* update
jebriede pushed a commit that referenced this pull request Apr 16, 2025
* Added some vulnerability capabilities

* Update to have refresh action

* Added tests and use interface

* PR comments

* Pr comments

* Remove unused variable

* Remove extra parameters

* update tests

* update words

* combine throw

* add readonly

* simplify

* fix words

* update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants