converter

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2024 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Overview

Package converter provides utility functions for converting SCALIBR's scan results to standardized inventory formats.

Index

Constants

View Source
const (
	// NoAssertion indicates that we don't claim anything about the value of a given field.
	NoAssertion = "NOASSERTION"
	// SPDXRefPrefix is the prefix used in reference IDs in the SPDX document.
	SPDXRefPrefix = "SPDXRef-"
)

Variables

This section is empty.

Functions

func ToCDX added in v0.1.2

ToCDX converts the SCALIBR scan results into a CycloneDX document.

func ToCPEs

func ToCPEs(i *extractor.Inventory) ([]string, error)

ToCPEs converts a SCALIBR inventory structure into CPEs, if they're present in the inventory.

func ToPURL

func ToPURL(i *extractor.Inventory) (*purl.PackageURL, error)

ToPURL converts a SCALIBR inventory structure into a package URL.

func ToSPDX23

func ToSPDX23(r *scalibr.ScanResult, c SPDXConfig) *v2_3.Document

ToSPDX23 converts the SCALIBR scan results into an SPDX v2.3 document.

Types

type CDXConfig added in v0.1.2

type CDXConfig struct {
	ComponentName    string
	ComponentVersion string
	Authors          []string
}

CDXConfig describes custom settings that should be applied to the generated CDX file.

type SPDXConfig

type SPDXConfig struct {
	DocumentName      string
	DocumentNamespace string
	Creators          []common.Creator
}

SPDXConfig describes custom settings that should be applied to the generated SPDX file.

Jump to

Keyboard shortcuts

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