Documentation
¶
Overview ¶
Package sbom provides SBOM parsing and diffing for Pacto bundles. It supports SPDX 2.3 and CycloneDX 1.5 JSON formats.
Index ¶
Constants ¶
View Source
const DefaultDir = "sbom"
DefaultDir is the directory inside a bundle where SBOM files are stored.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Change ¶
type Change struct {
Package string `json:"package"`
Type ChangeType `json:"type"`
Field string `json:"field,omitempty"`
OldValue string `json:"oldValue,omitempty"`
NewValue string `json:"newValue,omitempty"`
}
Change represents a single SBOM package change.
type ChangeType ¶
type ChangeType string
ChangeType describes how an SBOM package changed.
const ( PackageAdded ChangeType = "added" PackageRemoved ChangeType = "removed" PackageModified ChangeType = "modified" )
type Document ¶
type Document struct {
Format string `json:"format"` // "spdx" or "cyclonedx"
Packages []Package `json:"packages"`
}
Document represents a parsed SBOM document, independent of format.
type Package ¶
type Package struct {
Name string `json:"name"`
Version string `json:"version"`
License string `json:"license,omitempty"`
Supplier string `json:"supplier,omitempty"`
}
Package represents a normalized software package extracted from an SBOM.
Click to show internal directories.
Click to hide internal directories.