Documentation
¶
Overview ¶
Package sbom implements the unpacker that reads dependency data from a software bill of materials.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Subject ¶
type Subject struct {
// Reader is the SBOM document stream.
Reader io.ReadSeeker
// Path is the path to an SBOM document on disk. It is opened lazily by the
// unpacker when Reader is not set.
Path string
}
Subject is the DecomposableSubject consumed by the SBOM unpacker. It wraps a software bill of materials in any of the formats protobom understands. Either Reader or Path must be set; when both are set Reader takes precedence.
func (*Subject) DecomposableType ¶
DecomposableType identifies this subject as an SBOM, routing it to the SBOM unpacker through the registry.
type Unpacker ¶
type Unpacker struct{}
Unpacker reads dependency data out of an existing SBOM document. It has no decomposers: the SBOM format itself is the subject matter, parsed directly.
func (*Unpacker) Extract ¶
func (u *Unpacker) Extract(_ context.Context, subject api.DecomposableSubject) ([]*protosbom.NodeList, error)
Extract parses the SBOM in the subject and returns its node list.
func (*Unpacker) RegisterDecomposer ¶
func (u *Unpacker) RegisterDecomposer(api.Decomposer)
RegisterDecomposer is a no-op: the SBOM unpacker has no decomposers.
func (*Unpacker) UnregisterDecomposer ¶
func (u *Unpacker) UnregisterDecomposer(api.Decomposer)
UnregisterDecomposer is a no-op: the SBOM unpacker has no decomposers.