converter

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2025 License: Apache-2.0 Imports: 13 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-"
	// SPDXDocumentID is the string identifier used to refer to the SPDX document.
	SPDXDocumentID = "SPDXRef-DOCUMENT"
)

Variables

This section is empty.

Functions

func ToCDX added in v0.1.2

func ToCDX(r *result.ScanResult, c CDXConfig) *cyclonedx.BOM

ToCDX converts the SCALIBR scan results into a CycloneDX document.

func ToPURL

func ToPURL(p *extractor.Package) *purl.PackageURL

ToPURL converts a SCALIBR package structure into a package URL.

func ToSPDX23

func ToSPDX23(r *result.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
	ComponentType    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