-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.scan/licenseIssues relating to license scanningIssues relating to license scanning
Milestone
Description
Description
If Trivy can't normilize license - Trivy includes empty LicenseChoice
element into CycloneDX report:
trivy/pkg/sbom/cyclonedx/marshal.go
Lines 318 to 323 in 298a994
normalizedLicenses, err := expression.Normalize(license, licensing.NormalizeLicense, expression.NormalizeForSPDX) | |
if err != nil { | |
// Not fail on the invalid license | |
m.logger.Warn("Unable to marshal SPDX licenses", log.String("license", license)) | |
return cdx.LicenseChoice{} | |
} |
Discussed in #9321
Metadata
Metadata
Assignees
Labels
kind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.scan/licenseIssues relating to license scanningIssues relating to license scanning