cli

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 146 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitSuccess    = apicontract.ExitSuccess
	ExitError      = apicontract.ExitError
	ExitUsageError = apicontract.ExitUsageError
	ExitFuzzMatch  = apicontract.ExitFuzzMatch
	ExitFailOnGate = apicontract.ExitFailOnGate
	ExitIncomplete = apicontract.ExitIncomplete
)

Process exit codes. The table itself lives in pkg/apicontract, shared with the REST API's error vocabulary; these names keep pkg/cli's call sites short.

`1` used to mean both "the scan crashed" and "the scan worked and found a high-severity finding" — opposite outcomes that a CI job or an agent has to react to differently, and could not tell apart. Splitting them is the whole change; the rest of the table is written down so a consumer can rely on it.

0  success
1  error
2  usage error (bad flag, bad combination)
3  fuzz --fail-on-match matched
4  --fail-on <severity> gate tripped
5  incomplete: the work ran but did not finish (timed_out, budget_exhausted, partial)

--soft-fail still forces 0 everywhere, unchanged: a caller that has opted out of exit-code gating opted out of all of it.

View Source
const AgentSchemaVersion = apicontract.SchemaVersion

AgentSchemaVersion is the contract version of every -j/--json envelope. A consumer gates on it; it is bumped on any breaking field change.

Its absence was the real problem. A driver could not write one parser, because different commands (and different vigolium versions) named the same thing differently — the row array was `data` or `records` or `traffic` or `results` or `http_records` depending on where you asked, and drift was discovered as a parse failure in production rather than as a version check at startup. There is now one shape, one canonical name per field, and a number to check.

View Source
const DiscoveryAuthors = "@j3ssie"

DiscoveryAuthors credits the discovery and spidering phases.

Variables

View Source
var (
	Name               = "vigolium"
	Description        = "High-fidelity vulnerability scanner that combines speed, modularity, and precision"
	Author             = "@j3ssie"
	InitialContributor = "@theblackturtle"
	Version            = "v0.5.3"
	Commit             = ""
	BuildTime          = ""
)

Functions

func Execute

func Execute()

func FormatExamples

func FormatExamples(examples ...string) string

FormatExamples builds a colored example block for cobra commands. Lines starting with "#" are rendered as gray comments. All other lines are rendered as cyan commands.

func GetBanner

func GetBanner() string

func GetDiscoveryBanner

func GetDiscoveryBanner() string

GetDiscoveryBanner returns the banner crediting the discovery/spidering co-author alongside the default author.

func GetOliumBanner

func GetOliumBanner() string

GetOliumBanner returns the startup banner for the olium agent CLI. Uses a cooler palette (cyan body + magenta eye) to distinguish it from the scanner banner at a glance.

func MachineContractCommands added in v0.5.3

func MachineContractCommands() map[string]string

MachineContractCommands returns every runnable command path (without the root name; "" is the root) and the kind of -j output it declares: read, mutation, scan, stream or interactive.

It is the machine_kinds.go table, which TestMachineContractCobraTree keeps equal to the runnable command tree. Exported for the runtime smoke matrix (test/e2e/machine_contract_e2e_test.go), which must cover every leaf and cannot reach the cobra tree from outside the package.

Types

type Liveness added in v0.5.3

type Liveness struct {
	// LastWriteAt is the newest write across every signal; zero when there is
	// none.
	LastWriteAt time.Time
	// Sources names the signals that were present, newest-first is not implied.
	Sources []string
	// Stale: no signal has advanced within livenessStaleAfter, or the writing
	// process is confirmed gone. Only meaningful for a session whose status is
	// still "running".
	Stale bool
	// ProcessGone is set when the runner's PID could be checked — it ran on this
	// host — and says whether that process has exited. Nil when it could not be
	// checked (another host, or no PID recorded).
	ProcessGone *bool
}

Liveness is what every reader that asks "is this session still running?" gets: the newest write any signal shows, which signals contributed, and the verdict.

type ResolvedInput

type ResolvedInput struct {
	Target    string // resolved target URL
	InputData string // raw input data (may be empty)
}

ResolvedInput holds the result of resolving raw input and target from CLI flags/stdin.

Source Files

Directories

Path Synopsis
Package configcmd implements the `vigolium config` command group.
Package configcmd implements the `vigolium config` command group.
internal
clicommon
Package clicommon holds shared, leaf-level helpers used across the vigolium CLI command tree: the database-connection cache, project resolution, the --watch loop, logger flushing, and display formatting.
Package clicommon holds shared, leaf-level helpers used across the vigolium CLI command tree: the database-connection cache, project resolution, the --watch loop, logger flushing, and display formatting.
Package tui provides a reusable list picker for CLI list subcommands.
Package tui provides a reusable list picker for CLI list subcommands.

Jump to

Keyboard shortcuts

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