cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 28 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGateFailed = errors.New("readiness gate failed: findings at or above --fail-on threshold")

ErrGateFailed signals findings at or above the --fail-on threshold. main maps it to exit code 2 — distinct from exit 1 (operational error), so CI can tell "scan worked, cluster not ready" from "scan broke".

Functions

func ExitCode

func ExitCode(err error) int

ExitCode maps an Execute error to the process exit code.

func Root

func Root() *cobra.Command

func WriteJSON

func WriteJSON(w io.Writer, r engine.Report) error

WriteJSON renders the report as canonical two-space-indented JSON with a trailing newline. This is the machine-readable contract; field names come from the engine.Report struct tags and must stay stable. A `teams` field (per-team scores, teamless bucket keyed "unattributed") is added at presentation time when any finding exists — it is computed here, never stored in the engine report.

func WriteSARIF

func WriteSARIF(w io.Writer, r engine.Report) error

WriteSARIF renders the report as SARIF 2.1.0 (shared writer in internal/sarif), stamped with the CLI build version.

func WriteTable

func WriteTable(w io.Writer, r engine.Report)

WriteTable renders a human-readable plain-text report. No ANSI escape codes are emitted (NO_COLOR-safe by construction). Findings arrive pre-sorted from the engine (severity desc, category, title); we only group them under severity headers.

Types

This section is empty.

Jump to

Keyboard shortcuts

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