spdx

package
v1.12.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Version : current implemented version (2.3)
	Version = "SPDX-2.3"
	// DataLicense : 6.2 Data license field Table 3 https://spdx.github.io/spdx-spec/v2.3/document-creation-information/
	DataLicense = "CC0-1.0"
	// Ref : SPDX Ref Prefix
	Ref = "SPDXRef-"
	// Doc : Document Prefix
	Doc = "DOCUMENT"
	// NoAssertion : NO ASSERTION (For licenses)
	NoAssertion = "NOASSERTION"
	// None : NONE
	None = "NONE"
)

Variables

View Source
var (
	Creators = []spdxcommon.Creator{
		{
			Creator:     "carbonetes",
			CreatorType: "Organization",
		},
		{
			Creator:     "diggity-" + version.FromBuild().Version,
			CreatorType: "Tool",
		},
	}
)

Functions

func CheckLicense

func CheckLicense(id string) string

func DownloadLocation

func DownloadLocation(c types.Component) string

Get the component's download location from the metadata if it exists

func ExternalRefs

func ExternalRefs(c types.Component) (refs []*spdx23.PackageExternalReference)

Add references based on component purl and cpes

func FormatAuthor

func FormatAuthor(authorString string) string

func FormatNamespace

func FormatNamespace(input string) string

func FormatPath

func FormatPath(path string) string

func Homepage

func Homepage(c types.Component) string

Get the component's homepage from the metadata if it exists

func LicensesDeclared

func LicensesDeclared(c types.Component) string

Check if license is in SPDX License List

func Originator

func Originator(p types.Component) (string, string)

Get the component's author or maintainer from the metadata if it exists

func SourceInfo

func SourceInfo(c types.Component) string

Determine where the component was parsed from and return the source information string

func ToSPDX23

func ToSPDX23(sbom types.SBOM, input string) *spdx23.Document

Convert diggity sbom format to spdx 2.3 document

func ToSPDX23Package

func ToSPDX23Package(c types.Component) *spdx23.Package

func ToSPDX23Packages

func ToSPDX23Packages(components []types.Component) (packages []*spdx23.Package)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL