cmd

package
v3.78.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: AGPL-3.0 Imports: 81 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

func LoadFromMemory

func LoadFromMemory(rootPath string, freshExploits, freshAdvisories, freshVulns bool) error

LoadFromMemory reconstructs the scan pretty output from .vulnetix/sbom.cdx.json. When fresh* flags are true, selective API calls are made to refresh that data.

Types

type CommandManifest added in v3.56.0

type CommandManifest struct {
	Commands map[string]ManifestCommand `json:"commands"`
}

CommandManifest is the serialized shape of the Cobra tree.

func BuildCommandManifest added in v3.56.0

func BuildCommandManifest() CommandManifest

BuildCommandManifest walks the live root command and records every command path with its flags. Persistent flags are attributed to the command that declares them and to every descendant, because that is how a user sees them.

type EcoGroups added in v3.54.0

type EcoGroups struct {
	Configured []EcoStatus
	Available  []EcoStatus
}

type EcoStatus added in v3.54.0

type EcoStatus struct {
	Ecosystem pfw.Ecosystem
	Path      string
}

type GateBreach

type GateBreach struct {
	Gate    string // "malware" | "exploits" | "severity" | "eol"
	Count   int
	Message string // pre-formatted, ready to print
}

GateBreach captures one quality gate's failure details.

type ManifestCommand added in v3.56.0

type ManifestCommand struct {
	Short      string   `json:"short"`
	Flags      []string `json:"flags"`
	Deprecated []string `json:"deprecatedFlags,omitempty"`
	Subs       []string `json:"subcommands,omitempty"`
}

ManifestCommand describes one command path (e.g. "auth login").

type MultiPolicyBreachError

type MultiPolicyBreachError struct {
	Breaches []GateBreach
}

MultiPolicyBreachError is returned when one or more quality gates are breached.

func (*MultiPolicyBreachError) Error

func (e *MultiPolicyBreachError) Error() string

type PolicyBreachError

type PolicyBreachError interface {
	error
	// contains filtered or unexported methods
}

PolicyBreachError is implemented by all quality-gate breach errors. Execute() uses this interface to suppress redundant error printing — the command itself has already printed the breach details.

type SeverityBreachError

type SeverityBreachError struct {
	// contains filtered or unexported fields
}

SeverityBreachError is returned when --severity threshold is breached. It signals main() to exit with code 1 without printing a redundant error message.

func (*SeverityBreachError) Error

func (e *SeverityBreachError) Error() string

Jump to

Keyboard shortcuts

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