spdx

package
v0.53.0 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: Apache-2.0 Imports: 26 Imported by: 3

Documentation

Index

Constants

View Source
const (
	DocumentSPDXIdentifier = "DOCUMENT"
	DocumentNamespace      = "http://aquasecurity.github.io/trivy"
	CreatorOrganization    = "aquasecurity"
	CreatorTool            = "trivy"
)
View Source
const (
	CategoryPackageManager = "PACKAGE-MANAGER"
	RefTypePurl            = "purl"

	// Package Purpose fields
	PackagePurposeOS          = "OPERATING-SYSTEM"
	PackagePurposeContainer   = "CONTAINER"
	PackagePurposeSource      = "SOURCE"
	PackagePurposeApplication = "APPLICATION"
	PackagePurposeLibrary     = "LIBRARY"

	PackageSupplierNoAssertion  = "NOASSERTION"
	PackageSupplierOrganization = "Organization"

	RelationShipContains  = common.TypeRelationshipContains
	RelationShipDescribe  = common.TypeRelationshipDescribe
	RelationShipDependsOn = common.TypeRelationshipDependsOn

	ElementOperatingSystem = "OperatingSystem"
	ElementApplication     = "Application"
	ElementPackage         = "Package"
	ElementFile            = "File"
)

Variables

View Source
var (
	SourcePackagePrefix = "built package from"
	SourceFilePrefix    = "package found in"
)

Functions

func NormalizeLicense added in v0.50.0

func NormalizeLicense(licenses []string) string

func WithHasher

func WithHasher(hasher Hash) marshalOption

Types

type Hash

type Hash func(v any, format hashstructure.Format, opts *hashstructure.HashOptions) (uint64, error)

type Marshaler

type Marshaler struct {
	// contains filtered or unexported fields
}

func NewMarshaler

func NewMarshaler(version string, opts ...marshalOption) *Marshaler

func (*Marshaler) Marshal

func (m *Marshaler) Marshal(ctx context.Context, bom *core.BOM) (*spdx.Document, error)

func (*Marshaler) MarshalReport added in v0.50.0

func (m *Marshaler) MarshalReport(ctx context.Context, report types.Report) (*spdx.Document, error)

type SPDX

type SPDX struct {
	*core.BOM
	// contains filtered or unexported fields
}

func (*SPDX) UnmarshalJSON

func (s *SPDX) UnmarshalJSON(b []byte) error

type TVDecoder

type TVDecoder struct {
	// contains filtered or unexported fields
}

func NewTVDecoder

func NewTVDecoder(r io.Reader) *TVDecoder

func (*TVDecoder) Decode

func (tv *TVDecoder) Decode(v any) error

Jump to

Keyboard shortcuts

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