Skip to content

bug(cyclonedx): CycloneDX report includes empty license #9376

@DmitriyLewen

Description

@DmitriyLewen

Description

If Trivy can't normilize license - Trivy includes empty LicenseChoice element into CycloneDX report:

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.scan/licenseIssues relating to license scanning

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions