cmd

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute runs the root command

Types

type Layer added in v0.5.0

type Layer string

Layer is a value of the --include flag. Layers are the CLI's vocabulary, not the pipeline's: "vulns" is what a user types, whereas the pipeline is handed the vulnerabilities service and never learns that a flag was involved. Keeping the two apart is what lets the flag names change without touching the pipeline, and the pipeline serve callers that have no flags at all.

const (
	LayerDeps     Layer = "deps"
	LayerVulns    Layer = "vulns"
	LayerLicenses Layer = "licenses"
	LayerCrypto   Layer = "crypto"
	LayerGeo      Layer = "geo"
)

Supported --include values.

func AllLayers added in v0.5.0

func AllLayers() []Layer

AllLayers is every layer a user may request: the PURL-keyed ones plus declared dependencies.

func PurlLayers added in v0.5.0

func PurlLayers() []Layer

PurlLayers are the layers gathered from a decoration service keyed by PURL, so they can be gathered over any component list — including one parsed from an SBOM file, with no scanned tree behind it.

LayerDeps is not among them: declared dependencies are read from the manifests in the tree that was scanned, which an inventory on its own does not carry.

type Set added in v0.5.0

type Set map[Layer]bool

Set is a set of requested layers.

func ParseLayers added in v0.5.0

func ParseLayers(values []string, accepted []Layer) (Set, error)

ParseLayers validates a list of --include values into a Set, accepting only the layers the calling command can gather.

The accepted set is a parameter rather than the full list of layers the CLI knows, because a command that names a layer as valid and then refuses it has told the user two different things — and the second one arrives only after they tried it.

func (Set) Has added in v0.5.0

func (s Set) Has(l Layer) bool

Has reports whether the layer was requested.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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