sbom

package
v1.70.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SBOMFormatToSyftOutputFormat

func SBOMFormatToSyftOutputFormat(format libcnb.SBOMFormat) string

SBOMFormatToSyftOutputFormat converts a libcnb.SBOMFormat to the syft matching syft output format string

Types

type SBOMScanner

type SBOMScanner interface {
	ScanLayer(layer libcnb.Layer, scanDir string, formats ...libcnb.SBOMFormat) error
	ScanBuild(scanDir string, formats ...libcnb.SBOMFormat) error
	ScanLaunch(scanDir string, formats ...libcnb.SBOMFormat) error
}

type SyftArtifact

type SyftArtifact struct {
	ID        string
	Name      string
	Version   string
	Type      string
	FoundBy   string
	Locations []SyftLocation
	Licenses  []string
	Language  string
	CPEs      []string
	PURL      string
}

func (SyftArtifact) Hash

func (s SyftArtifact) Hash() (string, error)

type SyftCLISBOMScanner

type SyftCLISBOMScanner struct {
	Executor effect.Executor
	Layers   libcnb.Layers
	Logger   bard.Logger
}

func NewSyftCLISBOMScanner

func NewSyftCLISBOMScanner(layers libcnb.Layers, executor effect.Executor, logger bard.Logger) SyftCLISBOMScanner

func (SyftCLISBOMScanner) ScanBuild

func (b SyftCLISBOMScanner) ScanBuild(scanDir string, formats ...libcnb.SBOMFormat) error

ScanBuild will use syft CLI to scan the scanDir and write it's output to the build SBoM file in the given formats

func (SyftCLISBOMScanner) ScanLaunch

func (b SyftCLISBOMScanner) ScanLaunch(scanDir string, formats ...libcnb.SBOMFormat) error

ScanLaunch will use syft CLI to scan the scanDir and write it's output to the launch SBoM file in the given formats

func (SyftCLISBOMScanner) ScanLayer

func (b SyftCLISBOMScanner) ScanLayer(layer libcnb.Layer, scanDir string, formats ...libcnb.SBOMFormat) error

ScanLayer will use syft CLI to scan the scanDir and write it's output to the layer SBoM file in the given formats

type SyftDependency

type SyftDependency struct {
	Artifacts  []SyftArtifact
	Source     SyftSource
	Descriptor SyftDescriptor
	Schema     SyftSchema
}

func NewSyftDependency

func NewSyftDependency(dependencyPath string, artifacts []SyftArtifact) SyftDependency

func (SyftDependency) WriteTo

func (s SyftDependency) WriteTo(path string) error

type SyftDescriptor

type SyftDescriptor struct {
	Name    string
	Version string
}

type SyftLocation

type SyftLocation struct {
	Path string
}

type SyftSchema

type SyftSchema struct {
	Version string
	URL     string
}

type SyftSource

type SyftSource struct {
	Type   string
	Target string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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