mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 08:56:41 +01:00
It is possible that a given package has multiple known "official" CPEs active in the dictionary at once, so the index should support a slice of CPE strings per package Signed-off-by: Weston Steimel <commits@weston.slmail.me>
16 lines
352 B
Go
16 lines
352 B
Go
package cpe
|
|
|
|
import (
|
|
"github.com/anchore/syft/syft/cpe"
|
|
"github.com/anchore/syft/syft/pkg"
|
|
"github.com/anchore/syft/syft/pkg/cataloger/internal/cpegenerate"
|
|
)
|
|
|
|
func Generate(p pkg.Package) []cpe.CPE {
|
|
return cpegenerate.FromPackageAttributes(p)
|
|
}
|
|
|
|
func DictionaryFind(p pkg.Package) ([]cpe.CPE, bool) {
|
|
return cpegenerate.FromDictionaryFind(p)
|
|
}
|