Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sbom: set supplier in addition to originator #1184

Merged
merged 1 commit into from
Apr 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion pkg/sbom/implementation.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func generateAPKPackage(spec *Spec) (pkg, error) {
return pkg{}, errors.New("unable to generate package, name not specified")
}

supplier := "Organization: " + cases.Title(language.English).String(spec.Namespace)
newPackage := pkg{
id: stringToIdentifier(fmt.Sprintf("%s-%s", spec.PackageName, spec.PackageVersion)),
FilesAnalyzed: false,
Expand All @@ -92,7 +93,8 @@ func generateAPKPackage(spec *Spec) (pkg, error) {
Copyright: spec.Copyright,
Namespace: spec.Namespace,
Arch: spec.Arch,
Originator: "Organization: " + cases.Title(language.English).String(spec.Namespace),
Originator: supplier,
Supplier: supplier,
}

if spec.License != "" {
Expand All @@ -118,6 +120,7 @@ func addPackage(doc *spdx.Document, p *pkg) {
Checksums: []spdx.Checksum{},
ExternalRefs: []spdx.ExternalRef{},
Originator: p.Originator,
Supplier: p.Supplier,
}

algos := []string{}
Expand Down
Loading