From 7fd41ddc5675fd9647aee47646854f3bd5e07a0f 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 c4c378f0cbb3..b9232d9e8082 100644 --- a/syft/format/common/spdxhelpers/to_format_model.go +++ b/syft/format/common/spdxhelpers/to_format_model.go @@ -190,8 +190,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,