preflight

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ClassAllowlist         = "allowlist"
	ClassProgramNotOnPath  = "program_not_on_path"
	ClassPathMissing       = "path_missing"
	ClassPathNotWritable   = "path_not_writable"
	ClassCredentialAbsent  = "credential_absent" //nolint:gosec // class identifier, not a credential
	ClassNetworkUndeclared = "network_undeclared"
	ClassDocMissing        = "doc_missing"
	ClassOpenQuestions     = "open_questions"
)

Variables

This section is empty.

Functions

func EmitTelemetry

func EmitTelemetry(root string, report Report)

Types

type Batch

type Batch struct {
	Findings []Finding `json:"findings"`
	Dispatch bool      `json:"dispatch"`
}

func AssembleBatch

func AssembleBatch(report Report) Batch

type Environment

type Environment struct {
	Root            string
	Path            []string
	Credentials     map[string]bool
	WritablePaths   map[string]bool
	NetworkDeclared bool
	RequiredNetwork bool
}

Environment is the resolved, presence-only view used by pre-flight. Path contains bare executable names, Credentials contains presence flags, and WritablePaths allows callers/tests to provide a deterministic write result.

func ResolveEnvironment

func ResolveEnvironment(root string, mission runstate.MissionSnapshot) Environment

type Finding

type Finding struct {
	Class  string `json:"class"`
	Target string `json:"target,omitempty"`
	Detail string `json:"detail,omitempty"`
}

func (Finding) String

func (finding Finding) String() string

type Report

type Report struct {
	Verdict  string    `json:"verdict"`
	Findings []Finding `json:"findings"`
}

func Check

func Check(mission runstate.MissionSnapshot, env Environment) Report

Jump to

Keyboard shortcuts

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