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 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

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