Documentation
¶
Overview ¶
Package cmd defines Leakwatch CLI commands. This package is a thin wiring layer; it must not contain business logic.
Package cmd defines Leakwatch CLI commands. This package is a thin wiring layer; it must not contain business logic.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute() int
Execute runs the root command and returns the process exit code:
0 clean, completed scan with no findings 1 findings were reported (FindingsExitError) 2 a generic error (bad flags, config parse failure, scan failure) 3 the scan was interrupted before completing (InterruptedExitError)
func SetVersionInfo ¶
func SetVersionInfo(version, commit, date string)
SetVersionInfo sets build information (called from main.go).
Types ¶
type FindingsExitError ¶
type FindingsExitError struct {
Count int
}
FindingsExitError indicates that secrets were found (exit code 1).
func (*FindingsExitError) Error ¶
func (e *FindingsExitError) Error() string
type InterruptedExitError ¶ added in v1.7.0
type InterruptedExitError struct{}
InterruptedExitError indicates the scan was interrupted (SIGINT/SIGTERM) before completing, so its partial results must not be trusted as a clean pass. It maps to exit code 3, distinct from findings (1) and generic errors (2), so a CI pipeline can never observe a clean exit 0 for a scan that did not finish.
func (*InterruptedExitError) Error ¶ added in v1.7.0
func (e *InterruptedExitError) Error() string