mirror of
https://github.com/anchore/syft.git
synced 2026-11-04 08:26:38 +01:00
feat: Add PURL list input/output format (#3853)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
@@ -18,6 +18,7 @@ import (
|
||||
"github.com/anchore/syft/syft/artifact"
|
||||
"github.com/anchore/syft/syft/cpe"
|
||||
"github.com/anchore/syft/syft/file"
|
||||
"github.com/anchore/syft/syft/format/internal"
|
||||
"github.com/anchore/syft/syft/format/internal/spdxutil/helpers"
|
||||
"github.com/anchore/syft/syft/license"
|
||||
"github.com/anchore/syft/syft/linux"
|
||||
@@ -509,6 +510,8 @@ func toSyftPackage(p *spdx.Package) pkg.Package {
|
||||
Metadata: extractMetadata(p, info),
|
||||
}
|
||||
|
||||
internal.Backfill(sP)
|
||||
|
||||
if p.PackageSPDXIdentifier != "" {
|
||||
// always prefer the IDs from the SBOM over derived IDs
|
||||
sP.OverrideID(artifact.ID(p.PackageSPDXIdentifier))
|
||||
|
||||
Reference in New Issue
Block a user