Skip to content

Commit

Permalink
Merge pull request #1127 from xnox/custom-license
Browse files Browse the repository at this point in the history
spdx: allow specifying custom license
  • Loading branch information
xnox committed May 16, 2024
2 parents ca58d0b + 4387c0f commit 5d04bae
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/sbom/generator/spdx/spdx.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022, 2023 Chainguard, Inc.
// Copyright 2022-2024 Chainguard, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -459,6 +459,7 @@ type Document struct {
Packages []Package `json:"packages"`
Relationships []Relationship `json:"relationships"`
ExternalDocumentRefs []ExternalDocumentRef `json:"externalDocumentRefs,omitempty"`
LicensingInfos []LicensingInfo `json:"hasExtractedLicensingInfos,omitempty"`
}

type ExternalDocumentRef struct {
Expand All @@ -467,6 +468,12 @@ type ExternalDocumentRef struct {
SPDXDocument string `json:"spdxDocument"`
}

// Can also contain name, comment, seeAlso
type LicensingInfo struct {
LicenseID string `json:"licenseId"`
ExtractedText string `json:"extractedText"`
}

type CreationInfo struct {
Created string `json:"created"` // Date
Creators []string `json:"creators"`
Expand Down

0 comments on commit 5d04bae

Please sign in to comment.