sbom

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SupportedPrimaryPurpose

func SupportedPrimaryPurpose(f string) []string

func SupportedSBOMFileFormats

func SupportedSBOMFileFormats(f string) []string

func SupportedSBOMSpecVersions

func SupportedSBOMSpecVersions(f string) []string

func SupportedSBOMSpecs

func SupportedSBOMSpecs() []string

Types

type Author

type Author interface {
	Name() string
	Type() string
}

type Checksum

type Checksum interface {
	Algo() string
	Content() string
}

type Component

type Component interface {
	ID() string
	SupplierName() string
	Name() string
	Version() string

	Cpes() []cpe.CPE
	Purls() []purl.PURL

	Licenses() []License
	Checksums() []Checksum

	PrimaryPurpose() string
	RequiredFields() bool
}

type Document

type Document interface {
	Spec() Spec
	Components() []Component
	Relations() []Relation
	Authors() []Author
	Tools() []Tool
	Logs() []string
}

func NewSBOMDocument

func NewSBOMDocument(ctx context.Context, f io.ReadSeeker) (Document, error)

type FileFormat

type FileFormat string
const (
	FileFormatJSON     FileFormat = "json"
	FileFormatRDF      FileFormat = "rdf"
	FileFormatYAML     FileFormat = "yaml"
	FileFormatTagValue FileFormat = "tag-value"
	FileFormatXML      FileFormat = "xml"
	FileFormatUnknown  FileFormat = "unknown"
)

type License

type License interface {
	Short() string
	Name() string
	Deprecated() bool
	ValidSpdxLicense() bool
}

type Relation

type Relation interface {
	From() string
	To() string
}

type SBOMSpecFormat

type SBOMSpecFormat string
const (
	SBOMSpecSPDX    SBOMSpecFormat = "spdx"
	SBOMSpecCDX     SBOMSpecFormat = "cyclonedx"
	SBOMSpecUnknown SBOMSpecFormat = "unknown"
)

type Spec

type Spec interface {
	Version() string
	FileFormat() string
	Parsable() bool
	Name() string
	RequiredFields() bool
	CreationTimestamp() string
	Licenses() []License
	Namespace() string
}

type Tool

type Tool interface {
	Name() string
	Version() string
}

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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