sbom

package
v1.225.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package sbom builds provenance and software-bill-of-material graphs from Atmos lock files and supported dependency adapters.

Index

Constants

View Source
const (
	FormatCycloneDXJSON = "cyclonedx-json"
	FormatSPDXJSON      = "spdx-json"
	ModeProvenance      = "provenance"
	ModeNTIA            = "ntia"
	// ScopeTerraform selects Terraform provider and module evidence (the CLI's default scope).
	ScopeTerraform = "terraform"
	// ScopeDependencies selects toolchain and version-track lock evidence instead of Terraform.
	ScopeDependencies = "dependencies"
)

Variables

This section is empty.

Functions

func Render

func Render(graph *Graph, format string) ([]byte, error)

Render serializes graph to a supported JSON SBOM format.

Types

type Component

type Component struct {
	ID         string
	Name       string
	Version    string
	Type       string
	PURL       string
	Source     string
	SHA256     string
	Supplier   string
	Properties map[string]string
}

Component is a normalized node shared by all adapters and renderers.

type Coverage

type Coverage struct {
	Adapter string
	Status  string // complete, incomplete, unavailable
	Detail  string
}

Coverage records whether an adapter had sufficient stable evidence for the selected scope. An unavailable adapter is visible in provenance output and prevents NTIA-mode output.

type Graph

type Graph struct {
	Subject       Subject
	Components    []Component
	Relationships []Relationship
	Coverage      []Coverage
}

func BuildWithOptions

func BuildWithOptions(ctx context.Context, config *schema.AtmosConfiguration, options Options) (*Graph, error)

type Options

type Options struct {
	IncludeFiles bool
	Scope        string
	Mode         string
	Subject      Subject
}

Options controls graph construction and compliance validation.

type Relationship

type Relationship struct {
	From string
	To   string
	Type string
}

type Subject

type Subject struct {
	Name     string
	Version  string
	Supplier string
}

Subject identifies the software or infrastructure configuration described by a graph. NTIA output requires every field; provenance output may omit it.

Jump to

Keyboard shortcuts

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