From 52dba005b80d7e0bb8a89c20fada4f4be0411ef1 Mon Sep 17 00:00:00 2001 From: Christopher Angelo Phillips <32073428+spiffcs@users.noreply.github.com> Date: Tue, 12 Dec 2023 12:11:17 -0500 Subject: [PATCH] feat: update constructor to include expression (#24) Signed-off-by: Christopher Phillips --- .grant.yaml | 1 + grant/case.go | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.grant.yaml b/.grant.yaml index 83576d8..a13013c 100644 --- a/.grant.yaml +++ b/.grant.yaml @@ -12,6 +12,7 @@ rules: - "alpine-baselayout" # We don't link against this package so we don't care about its license - "base-files" - "netbase" + - "libssl3" - pattern: "*BSD*" name: "bsd-denied" mode: "deny" diff --git a/grant/case.go b/grant/case.go index cff6faa..b2b888d 100644 --- a/grant/case.go +++ b/grant/case.go @@ -273,10 +273,12 @@ func grantLicenseFromClassifierResults(r results.LicenseTypes) []License { spdxLicense, err := spdxlicense.GetLicenseByID(license.Name) if err != nil { licenses = append(licenses, License{ - Name: license.Name, + LicenseID: license.Name, + Name: license.Name, }) } else { licenses = append(licenses, License{ + SPDXExpression: spdxLicense.LicenseID, Reference: spdxLicense.Reference, IsDeprecatedLicenseID: spdxLicense.IsDeprecatedLicenseID, DetailsURL: spdxLicense.DetailsURL,