cyclonedx

package
v0.0.0-...-c5f19f0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Namespace = "aquasecurity:trivy:"

	PropertySchemaVersion = "SchemaVersion"
	PropertyType          = "Type"
	PropertyClass         = "Class"

	// Image properties
	PropertySize       = "Size"
	PropertyImageID    = "ImageID"
	PropertyRepoDigest = "RepoDigest"
	PropertyDiffID     = "DiffID"
	PropertyRepoTag    = "RepoTag"

	// Package properties
	PropertyPkgID           = "PkgID"
	PropertyPkgType         = "PkgType"
	PropertySrcName         = "SrcName"
	PropertySrcVersion      = "SrcVersion"
	PropertySrcRelease      = "SrcRelease"
	PropertySrcEpoch        = "SrcEpoch"
	PropertyModularitylabel = "Modularitylabel"
	PropertyFilePath        = "FilePath"
	PropertyLayerDigest     = "LayerDigest"
	PropertyLayerDiffID     = "LayerDiffID"
)

Variables

View Source
var (
	ErrInvalidBOMLink = xerrors.New("invalid bomLink format error")
)

Functions

func WithClock

func WithClock(clock clock.Clock) marshalOption

func WithNewUUID

func WithNewUUID(newUUID newUUID) marshalOption

Types

type CycloneDX

type CycloneDX struct {
	*types.SBOM
	// contains filtered or unexported fields
}

func (*CycloneDX) UnmarshalJSON

func (c *CycloneDX) UnmarshalJSON(b []byte) error

type Marshaler

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

func NewMarshaler

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

func (*Marshaler) Marshal

func (e *Marshaler) Marshal(report types.Report) (*cdx.BOM, error)

Marshal converts the Trivy report to the CycloneDX format

func (*Marshaler) MarshalVulnerabilities

func (e *Marshaler) MarshalVulnerabilities(report types.Report) (*cdx.BOM, error)

MarshalVulnerabilities converts the Trivy report to the CycloneDX format only with vulnerabilities. The output refers to another CycloneDX SBOM.

Jump to

Keyboard shortcuts

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