Documentation
¶
Overview ¶
Package deb implements a SystemDecomposer that reads the installed-package database used by dpkg-based distributions (Debian, Ubuntu, ...) and by distroless images, which ship the same database split into per-package files.
Index ¶
- type Decomposer
- func (d *Decomposer) DefaultOptions() any
- func (d *Decomposer) Extract(opts *api.DecomposerOptions) (*sbom.NodeList, error)
- func (d *Decomposer) ExtractFromFS(source fs.FS, opts *api.DecomposerOptions) (*sbom.NodeList, error)
- func (d *Decomposer) Requirements(_ *api.DecomposerOptions) []api.Requirement
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decomposer ¶
type Decomposer struct{}
Decomposer reads the dpkg database from a system filesystem and emits a protobom NodeList of the installed packages.
func (*Decomposer) DefaultOptions ¶
func (d *Decomposer) DefaultOptions() any
DefaultOptions returns the driver-level options used when none are set on DecomposerOptions.
func (*Decomposer) Extract ¶
func (d *Decomposer) Extract(opts *api.DecomposerOptions) (*sbom.NodeList, error)
Extract opens opts.WorkDir as the system root and runs the FS-aware extractor against it. This lets the decomposer satisfy api.Decomposer for callers that work with on-disk paths; the SystemPackages unpacker calls ExtractFromFS directly so it can pass in non-OS filesystems too.
func (*Decomposer) ExtractFromFS ¶
func (d *Decomposer) ExtractFromFS(source fs.FS, opts *api.DecomposerOptions) (*sbom.NodeList, error)
ExtractFromFS reads the dpkg database from source and returns the installed packages as a NodeList. Returns (nil, nil) when no dpkg database is present in the filesystem — dpkg is not the only system-package format we support and its absence is not an error.
func (*Decomposer) Requirements ¶
func (d *Decomposer) Requirements(_ *api.DecomposerOptions) []api.Requirement
Requirements returns the decomposer's runtime requirements. The dpkg database is plain text, so there are none.