sbomutil

package
v0.0.0-...-4aaa17f Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SBOMCreator

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

func NewSBOMCreator

func NewSBOMCreator(ctx context.Context, gcsClient *storage.Client, files *fs.Files) *SBOMCreator

NewSBOMCreator creates a new SBOMCreator.

func (*SBOMCreator) GenerateSBOM

func (s *SBOMCreator) GenerateSBOM(sourceImage, actualOutputImage *config.Image) error

GenerateSBOM uses the parsed input to generate an SPDX SBOM.

func (*SBOMCreator) ParseSBOMInput

func (s *SBOMCreator) ParseSBOMInput(sbomInputPath string) error

ParseSBOMInput parses the user input and saves the result in the SBOMCreator.

func (*SBOMCreator) UploadSBOMToGCS

func (s *SBOMCreator) UploadSBOMToGCS(outputGCSPath string) error

UploadSBOMToGCS uploads the generated SBOM to GCS in JSON format.

type SBOMInput

type SBOMInput struct {
	OutputImageName         string                  `json:"outputImageName,omitempty"`
	OutputImageVersion      string                  `json:"outputImageVersion,omitempty"`
	Creators                []string                `json:"creators"`
	Supplier                string                  `json:"supplier,omitempty"`
	SPDXPackages            []*spdx2_2.Package      `json:"SPDXPackages,omitempty"`
	SBOMPackages            []*SBOMPackage          `json:"SBOMPackages,omitempty"`
	ExtractedLicensingInfos []*spdx2_2.OtherLicense `json:"hasExtractedLicensingInfos,omitempty"`
}

type SBOMPackage

type SBOMPackage struct {
	Name          string                        `json:"name"`
	SpdxDocument  string                        `json:"spdxDocument"`
	Algorithm     spdx_common.ChecksumAlgorithm `json:"algorithm"`
	ChecksumValue string                        `json:"checksumValue"`
}

Jump to

Keyboard shortcuts

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