Skip to content

Fix vulnerability icon for multi-project solution PM UI#7442

Open
zivkan wants to merge 1 commit into
devfrom
dev-zivkan-gh14925
Open

Fix vulnerability icon for multi-project solution PM UI#7442
zivkan wants to merge 1 commit into
devfrom
dev-zivkan-gh14925

Conversation

@zivkan
Copy link
Copy Markdown
Member

@zivkan zivkan commented Jun 2, 2026

Bug

Fixes: NuGet/Home#14024
Fixes: NuGet/Home#14926

Description

In the solution-level PM UI Installed tab, when multiple projects reference different vulnerable versions of the same package, only the first project's version gets the vulnerability warning icon. The other projects' versions are missing the icon.

The root cause is in PackageItemViewModel.UpdateVulnerabilityInfo(), which always used Version (the model's version) as the key when adding to the VulnerableVersions dictionary. When UpdateInstalledPackagesVulnerabilities queried vulnerability data for a different installed version, the result was stored under the model version instead of the queried version. This meant VulnerableVersions.TryGetValue() in PackageSolutionDetailControlModel.UpdateInstalledVersionsAsync() only succeeded for the model version.

The fix adds a NuGetVersion version parameter to UpdateVulnerabilityInfo so each call site passes the correct version: Version for the model's own data, and packageIdentity.Version for queried installed versions.

Regression introduced by PR #6370.

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. N/A

@jeffkl jeffkl requested a review from jebriede June 2, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants