sbom

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = options.Options{
	OS: options.OSInfo{
		ID:      "unknown",
		Name:    "Alpine Linux",
		Version: "Unknown",
	},
	ImageInfo: options.ImageInfo{
		Images: []options.ArchImageInfo{},
	},
	FileName: "sbom",
	Formats:  []string{"spdx", "cyclonedx"},
}

Functions

func ReadPackageIndex added in v0.6.0

func ReadPackageIndex(opts *options.Options, path string) (packages []*repository.Package, err error)

Types

type SBOM

type SBOM struct {
	Generators map[string]generator.Generator

	Options options.Options
	// contains filtered or unexported fields
}

func New

func New() *SBOM

func NewWithWorkDir

func NewWithWorkDir(path string, a types.Architecture) *SBOM

NewWithWorkDir returns a new sbom object with a working dir preset

func (*SBOM) Generate

func (s *SBOM) Generate() ([]string, error)

Generate creates the sboms according to the options set

func (*SBOM) GenerateIndex added in v0.5.0

func (s *SBOM) GenerateIndex() ([]string, error)

Generate creates the sboms according to the options set

func (*SBOM) ReadLayerTarball added in v0.5.0

func (s *SBOM) ReadLayerTarball(path string) error

ReadLayerTarball reads an apko layer tarball and adds its metadata to the SBOM options

func (*SBOM) ReadPackageIndex

func (s *SBOM) ReadPackageIndex() error

ReadPackageIndex parses the package index in the working directory and returns a slice of the installed packages

func (*SBOM) ReadReleaseData

func (s *SBOM) ReadReleaseData() error

func (*SBOM) SetImplementation

func (s *SBOM) SetImplementation(impl sbomImplementation)

Directories

Path Synopsis
generatorfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
idb
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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