You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The JsonReport contains only the packages of the last project.
To Reproduce
Steps to reproduce the behavior:
use parameter --solution with multiple projects
configure VulnerabilityReports.JsonReportPath
Expected behavior
The JsonReport contains all Vulnerabilities.
Tools:
IDE: VS2022
OS: Windows 10
Additional context
localy I fix this issue in VulnerabilityReporter.BuildVulnerabilityReport. Instead of setting Report.Packages in the foreach loop I use a list and add the packages to the list in the loop.
var reportedPackages = new List<VulnerableNuGetPackage>(); ... foreach (var (proj, pkgs) in projects) { ... reportedPackages.AddRange(nuGetPackages.Where .... }
At the end of the method I use Report.Packages = reportedPackages.ToArray();
to set the packages of the report.
The text was updated successfully, but these errors were encountered:
Thanks for the bug report. It will likely be a couple days before I can look into this. If you want to throw together a PR, I'd be willing to merge it although it's likely to be this weekend before I can push up a new version.
Describe the bug
The JsonReport contains only the packages of the last project.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The JsonReport contains all Vulnerabilities.
Tools:
Additional context
localy I fix this issue in VulnerabilityReporter.BuildVulnerabilityReport. Instead of setting Report.Packages in the foreach loop I use a list and add the packages to the list in the loop.
var reportedPackages = new List<VulnerableNuGetPackage>(); ... foreach (var (proj, pkgs) in projects) { ... reportedPackages.AddRange(nuGetPackages.Where .... }
At the end of the method I use
Report.Packages = reportedPackages.ToArray();
to set the packages of the report.
The text was updated successfully, but these errors were encountered: