cyclonedx

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: Apache-2.0 Imports: 19 Imported by: 4

Documentation

Index

Constants

View Source
const (
	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")
)
View Source
var (
	ErrPURLEmpty = errors.New("purl empty error")
)

Functions

func DecodeJSON added in v0.41.0

func DecodeJSON(r io.Reader) (*cdx.BOM, error)

Types

type BOM added in v0.42.0

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

func (*BOM) UnmarshalJSON added in v0.42.0

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

type Marshaler

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

func NewMarshaler

func NewMarshaler(version string) *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) MarshalReport added in v0.42.0

func (e *Marshaler) MarshalReport(r types.Report) (*core.Component, error)

type Package added in v0.42.0

type Package struct {
	ftypes.Package
	Type            ftypes.TargetType
	Metadata        types.Metadata
	Vulnerabilities []types.DetectedVulnerability
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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