mirror of
https://github.com/anchore/syft.git
synced 2026-11-05 08:56:41 +01:00
feat: Record where CPEs come from (#2552)
Syft can get CPEs from several source, including generating them based on package data, finding them in the NVD CPE dictionary, or finding them declared in a manifest or existing SBOM. Record where Syft got CPEs so that consumers of SBOMs can reason about how trustworthy they are. Signed-off-by: Will Murphy <will.murphy@anchore.com>
This commit is contained in:
@@ -368,7 +368,7 @@ func TestCatalog_MergeRecords(t *testing.T) {
|
||||
name: "multiple Locations with shared path",
|
||||
pkgs: []Package{
|
||||
{
|
||||
CPEs: []cpe.CPE{cpe.Must("cpe:2.3:a:package:1:1:*:*:*:*:*:*:*")},
|
||||
CPEs: []cpe.CPE{cpe.Must("cpe:2.3:a:package:1:1:*:*:*:*:*:*:*", cpe.GeneratedSource)},
|
||||
Locations: file.NewLocationSet(
|
||||
file.NewVirtualLocationFromCoordinates(
|
||||
file.Coordinates{
|
||||
@@ -381,7 +381,7 @@ func TestCatalog_MergeRecords(t *testing.T) {
|
||||
Type: RpmPkg,
|
||||
},
|
||||
{
|
||||
CPEs: []cpe.CPE{cpe.Must("cpe:2.3:b:package:1:1:*:*:*:*:*:*:*")},
|
||||
CPEs: []cpe.CPE{cpe.Must("cpe:2.3:b:package:1:1:*:*:*:*:*:*:*", cpe.NVDDictionaryLookupSource)},
|
||||
Locations: file.NewLocationSet(
|
||||
file.NewVirtualLocationFromCoordinates(
|
||||
file.Coordinates{
|
||||
|
||||
Reference in New Issue
Block a user