state

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const SnapshotVersion = "v1"

Variables

This section is empty.

Functions

func ResolvePath

func ResolvePath(explicit string) string

func Save

func Save(path string, snapshot Snapshot) error

Types

type ScoreView added in v1.1.2

type ScoreView struct {
	Findings        []source.Finding
	PostureScore    *score.Result
	Identities      []manifest.IdentityRecord
	TransitionCount int
	AttackPaths     []riskattack.ScoredPath
	TopAttackPaths  []riskattack.ScoredPath
	HasRiskReport   bool
}

func LoadScoreView added in v1.1.2

func LoadScoreView(path string) (ScoreView, error)

LoadScoreView validates the stored scan snapshot shape needed by the score command without fully materializing large unused report sections on the cached-score path.

type Snapshot

type Snapshot struct {
	Version      string                    `json:"version"`
	Target       source.Target             `json:"target"`
	Targets      []source.Target           `json:"targets,omitempty"`
	Findings     []source.Finding          `json:"findings"`
	Inventory    *agginventory.Inventory   `json:"inventory,omitempty"`
	RiskReport   *risk.Report              `json:"risk_report,omitempty"`
	Profile      *profileeval.Result       `json:"profile,omitempty"`
	PostureScore *score.Result             `json:"posture_score,omitempty"`
	Identities   []manifest.IdentityRecord `json:"identities,omitempty"`
	Transitions  []lifecycle.Transition    `json:"lifecycle_transitions,omitempty"`
}

Snapshot stores deterministic scan material for diff mode.

func Load

func Load(path string) (Snapshot, error)

func LoadRaw added in v1.1.1

func LoadRaw(path string) (Snapshot, error)

Jump to

Keyboard shortcuts

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