sbom

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package sbom provides format-agnostic helpers for reading SBOM files produced by the cdx16 and spdx30 sub-packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadDirectDeps

func ReadDirectDeps(raw []byte) ([]string, error)

ReadDirectDeps sniffs the SBOM format from the JSON payload and returns the deduped, sorted analysis-identifier keys for direct (depth=1) dependencies.

Types

type DirectDep

type DirectDep struct {
	Key      string
	Location *models.LocationInfo
}

DirectDep pairs an analysis-identifier key with optional manifest-source provenance. Location is nil when the SBOM did not record it.

func ReadDirectDepsWithLocations

func ReadDirectDepsWithLocations(raw []byte) ([]DirectDep, error)

ReadDirectDepsWithLocations is the same as ReadDirectDeps but also returns each direct dep's manifest-file provenance when the SBOM carries it.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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