core

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: 15 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
	Group      string
	Version    string
	PackageURL *purl.PackageURL
	Licenses   []string
	Hashes     []digest.Digest
	Supplier   string
	Properties []Property

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

type CycloneDX

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

func NewCycloneDX

func NewCycloneDX(version string) *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(p *purl.PackageURL) string

func (*CycloneDX) Properties

func (c *CycloneDX) Properties(properties []Property) []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 Property added in v0.43.0

type Property struct {
	Name      string
	Value     string
	Namespace string
}

Jump to

Keyboard shortcuts

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