sbom

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePurl

func GeneratePurl(name, version, os, arch string) string

GeneratePurl returns a package url for the given name and version

func PackageGraphToSBOM

func PackageGraphToSBOM(appNode *sbom.Node, lockFile *hcl2nix.LockFile, graph *gographviz.Graph) *sbom.Document

PackageGraphToSBOM converts the package graph to a SBOM

Types

type Statement

type Statement struct {
	intoto.StatementHeader
	// Predicate can be SPDX or CDX format
	Predicate interface{}
}

Statement is a struct to hold the SBOM in SPDX format

func NewStatement

func NewStatement(appDetails *nixcmd.App) *Statement

NewStatement creates a new SBOM

func (*Statement) ToJSON

func (s *Statement) ToJSON(bom *sbom.Document, format formats.Format) ([]byte, error)

ToJSON returns the statement in JSON format

Jump to

Keyboard shortcuts

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