mirror of
https://github.com/anchore/syft.git
synced 2025-11-17 08:23:15 +01:00
* migrate CPE generation logic to internal Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * remove create function Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
16 lines
350 B
Go
16 lines
350 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)
|
|
}
|