cmd

package
v3.2.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: AGPL-3.0 Imports: 49 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 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 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