From 8dcd37c3b7ea3e42e158076fc6ea71deec819aed Mon Sep 17 00:00:00 2001 From: "Jose D. Gomez R" Date: Tue, 19 Nov 2024 11:21:29 +0100 Subject: [PATCH] Use distro ID as package name and string representation as description Signed-off-by: Jose D. Gomez R --- syft/format/common/spdxhelpers/to_format_model.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syft/format/common/spdxhelpers/to_format_model.go b/syft/format/common/spdxhelpers/to_format_model.go index 5e647db2700..179a21acb67 100644 --- a/syft/format/common/spdxhelpers/to_format_model.go +++ b/syft/format/common/spdxhelpers/to_format_model.go @@ -189,8 +189,8 @@ func toOSPackage(s sbom.SBOM) *spdx.Package { return nil } return &spdx.Package{ - PackageName: distro.Name, - PackageDescription: distro.PrettyName, + PackageName: distro.ID, + PackageDescription: distro.String(), PackageSPDXIdentifier: spdx.ElementID(helpers.SanitizeElementID(fmt.Sprintf("%s-%s", prefixOS, strings.ToLower(distro.ID)))), PackageVersion: distro.VersionID, PrimaryPackagePurpose: spdxPrimaryPurposeOS,