Documentation
¶
Overview ¶
Package cli assembles the kubesplaining cobra commands that drive the collect → analyze → report pipeline and its supporting utilities.
Index ¶
- func NewCreateExclusionsCmd() *cobra.Command
- func NewDiffCmd() *cobra.Command
- func NewDownloadCmd(build BuildInfo) *cobra.Command
- func NewReportCmd() *cobra.Command
- func NewRootCmd(build BuildInfo) *cobra.Command
- func NewScanCmd(build BuildInfo) *cobra.Command
- func NewScanResourceCmd() *cobra.Command
- func NewVersionCmd(build BuildInfo) *cobra.Command
- type BuildInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCreateExclusionsCmd ¶
NewCreateExclusionsCmd returns the "create-exclusions-file" subcommand, which emits a starter exclusions YAML from a preset and can pre-populate system namespaces discovered in an existing snapshot.
func NewDiffCmd ¶ added in v1.1.0
NewDiffCmd returns the "diff" subcommand, which compares two findings JSON files emitted by `scan` (or anything that produces the same shape) and prints / writes a delta report classifying each finding as Added, Resolved, or Unchanged. The diff is keyed on Finding.ID, which the analyzer pipeline guarantees is deterministic across runs of the same cluster ("RULE:ns:name").
Output formats:
text : default; summary headline + per-section bullet list
markdown : same content as text but with ## headings and tables
sarif : SARIF 2.1.0 run containing only Added findings, with
level=warning and a properties.delta marker so downstream
tooling can distinguish a delta upload from a full scan
When --output-dir is set the rendered diff is written to <dir>/diff.{txt,md,sarif} instead of stdout. The diff command never re-runs analysis; it only reads the two JSON files it's pointed at.
func NewDownloadCmd ¶
NewDownloadCmd returns the "download" subcommand, which collects a live cluster snapshot and writes it to a JSON file for later offline analysis.
func NewReportCmd ¶
NewReportCmd returns the "report" subcommand, which regenerates HTML/JSON/CSV/SARIF artifacts from a previously produced findings JSON file without re-running analysis.
func NewRootCmd ¶
NewRootCmd builds the top-level kubesplaining command with all subcommands attached.
func NewScanCmd ¶
NewScanCmd returns the "scan" subcommand, which runs the full analyzer pipeline against either a live cluster or a previously collected snapshot and emits reports.
func NewScanResourceCmd ¶
NewScanResourceCmd returns the "scan-resource" subcommand, which analyzes a single Kubernetes manifest file offline without requiring cluster access.
func NewVersionCmd ¶
NewVersionCmd returns a command that prints embedded build information and exits.