package cyclonedxhelpers import "github.com/anchore/syft/syft/pkg" func CPE(p pkg.Package) string { // Since the CPEs in a package are sorted by specificity // we can extract the first CPE as the one to output in cyclonedx if len(p.CPEs) > 0 { return pkg.CPEString(p.CPEs[0]) } return "" }