core

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func IsTrivySBOM

func IsTrivySBOM(c *cdx.BOM) bool

func LookupProperty

func LookupProperty(properties *[]cdx.Property, key string) string

func UnmarshalProperties

func UnmarshalProperties(properties *[]cdx.Property) map[string]string

Types

type Component

type Component struct {
	Type       cdx.ComponentType
	Name       string
	Version    string
	PackageURL *purl.PackageURL
	Licenses   []string
	Hashes     []digest.Digest
	Supplier   string
	Properties map[string]string

	Components      []*Component
	Vulnerabilities []types.DetectedVulnerability
}

type CycloneDX

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

func NewCycloneDX

func NewCycloneDX(version string, opts ...Option) *CycloneDX

func (*CycloneDX) BOMRef

func (c *CycloneDX) BOMRef(component *Component) string

func (*CycloneDX) Components

func (c *CycloneDX) Components(uniq map[string]*cdx.Component) *[]cdx.Component

func (*CycloneDX) Dependencies

func (c *CycloneDX) Dependencies(uniq map[string]*[]string) *[]cdx.Dependency

func (*CycloneDX) Hashes

func (c *CycloneDX) Hashes(hashes []digest.Digest) *[]cdx.Hash

func (*CycloneDX) Licenses

func (c *CycloneDX) Licenses(licenses []string) *cdx.Licenses

func (*CycloneDX) Marshal

func (c *CycloneDX) Marshal(root *Component) *cdx.BOM

func (*CycloneDX) MarshalComponent

func (c *CycloneDX) MarshalComponent(component *Component, components map[string]*cdx.Component,
	deps map[string]*[]string, vulns map[string]*cdx.Vulnerability) *cdx.Component

func (*CycloneDX) Metadata

func (c *CycloneDX) Metadata() *cdx.Metadata

func (*CycloneDX) PackageURL

func (c *CycloneDX) PackageURL(purl *purl.PackageURL) string

func (*CycloneDX) Properties

func (c *CycloneDX) Properties(props map[string]string) []cdx.Property

func (*CycloneDX) Supplier

func (c *CycloneDX) Supplier(supplier string) *cdx.OrganizationalEntity

func (*CycloneDX) Vulnerabilities

func (c *CycloneDX) Vulnerabilities(uniq map[string]*cdx.Vulnerability) *[]cdx.Vulnerability

type NewUUID

type NewUUID func() uuid.UUID

type Option

type Option func(dx *CycloneDX)

func WithClock

func WithClock(clock clock.Clock) Option

func WithNewUUID

func WithNewUUID(newUUID NewUUID) Option

Jump to

Keyboard shortcuts

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