cyclonedx

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: 24 Imported by: 4

Documentation

Index

Constants

View Source
const (
	ToolVendor = "aquasecurity"
	ToolName   = "trivy"
	Namespace  = ToolVendor + ":" + ToolName + ":"
)

Variables

View Source
var (
	ErrUnsupportedType = errors.New("unsupported type")
)

Functions

func DecodeJSON added in v0.41.0

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

func IsTrivySBOM added in v0.50.0

func IsTrivySBOM(c *cdx.BOM) bool

Types

type BOM added in v0.42.0

type BOM struct {
	*core.BOM
}

func (*BOM) UnmarshalJSON added in v0.42.0

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

type Marshaler

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

func NewMarshaler

func NewMarshaler(version string) Marshaler

func (*Marshaler) Hashes added in v0.50.0

func (*Marshaler) Hashes(files []core.File) *[]cdx.Hash

func (*Marshaler) Licenses added in v0.50.0

func (*Marshaler) Licenses(licenses []string) *cdx.Licenses

func (*Marshaler) Marshal

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

Marshal converts the Trivy component to the CycloneDX format

func (*Marshaler) MarshalComponent added in v0.50.0

func (m *Marshaler) MarshalComponent(component *core.Component) (*cdx.Component, error)

func (*Marshaler) MarshalReport added in v0.42.0

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

MarshalReport converts the Trivy report to the CycloneDX format

func (*Marshaler) MarshalRoot added in v0.50.0

func (m *Marshaler) MarshalRoot() (*cdx.Component, error)

func (*Marshaler) Metadata added in v0.50.0

func (m *Marshaler) Metadata(ctx context.Context) *cdx.Metadata

func (*Marshaler) PackageURL added in v0.50.0

func (*Marshaler) PackageURL(p *packageurl.PackageURL) string

func (*Marshaler) Properties added in v0.50.0

func (*Marshaler) Properties(properties []core.Property) *[]cdx.Property

func (*Marshaler) Supplier added in v0.50.0

func (*Marshaler) Supplier(supplier string) *cdx.OrganizationalEntity

Jump to

Keyboard shortcuts

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