sbom

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: May 24, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package sbom generates Software Bill of Materials in CycloneDX and SPDX formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatCycloneDX

func FormatCycloneDX(w io.Writer, result *Result) error

func FormatSPDX

func FormatSPDX(w io.Writer, result *Result) error

Types

type Component

type Component struct {
	Name      string
	Version   string
	Ecosystem string
	PURL      string
}

Component represents a single package in the SBOM.

type Result

type Result struct {
	Tool       string
	Version    string
	Timestamp  time.Time
	Components []Component
}

Result holds the SBOM data.

func Generate

func Generate(ctx context.Context, paths []string, toolVersion string) (*Result, error)

Generate extracts all packages from the given paths and returns an SBOM result.

Jump to

Keyboard shortcuts

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