analyze

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 8 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

Overview

Package analyze turns captured evidence into findings. Findings are signals to investigate, each linked to the objects and log lines behind it. Rules based on absence only run once the relevant collection is complete.

Index

Constants

View Source
const (
	Critical = "critical"
	Warning  = "warning"
	Info     = "info"
)

Severities.

Variables

This section is empty.

Functions

func DocsFor

func DocsFor(f Finding) string

DocsFor returns the docs page for a finding, or "". A policy that was not accepted gets the debugging page of the product that owns its API group.

func DocsLinks() []string

DocsLinks is every docs page a finding can carry, for the link tests.

Types

type Finding

type Finding struct {
	ID          string   `json:"id"`
	Rule        string   `json:"rule"`
	Severity    string   `json:"severity"`
	Title       string   `json:"title"`
	Detail      string   `json:"detail"`
	Cluster     string   `json:"cluster"`
	Object      *Ref     `json:"object,omitempty"`
	Evidence    []string `json:"evidence,omitempty"`
	LogQuery    string   `json:"logQuery,omitempty"`
	NextStep    string   `json:"nextStep,omitempty"`
	Docs        string   `json:"docs,omitempty"` // product documentation for the next step
	Count       int      `json:"count,omitempty"`
	Provisional bool     `json:"provisional"`
}

Finding is one analyzer result.

func Run

func Run(ws *store.Workspace) []Finding

Run evaluates every rule against the workspace.

type Ref

type Ref struct {
	Cluster   string `json:"cluster"`
	Group     string `json:"group"`
	Resource  string `json:"resource"`
	Kind      string `json:"kind"`
	Namespace string `json:"namespace"`
	Name      string `json:"name"`
}

Ref points at a captured object.

Jump to

Keyboard shortcuts

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