Update json_report.go

Signed-off-by: Hardik Nanda <hnanda21@gmail.com>
This commit is contained in:
Hardik Nanda 2024-05-17 16:44:45 +05:30 committed by GitHub
parent 6ac40c592d
commit 1d48cf116a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -266,14 +266,13 @@ func (j *jsonReportGenerator) buildJsonPackageReportFromPackage(p *models.Packag
if (len(pkg.Vulnerabilities) > 0 && flag) {
pkg.Advices = append(pkg.Advices, &schema.RemediationAdvice{
Type: schema.RemediationAdviceType_UpgradePackage,
TargetAlternatePackageVersion: updateToVersion,
})
flag = false
}
}
for _, license := range licenses {
pkg.Licenses = append(pkg.Licenses, &modelspec.InsightLicenseInfo{
Id: string(license),