securitystatus

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package securitystatus is the one-way channel from the security-maintenance coordinator to the serving application: a small public file the coordinator writes and the server only reads. The file is readable by every local user on a host and by everyone who can read the namespace's ConfigMaps in a cluster. It carries no credentials or operation records. It does carry what an instance administrator needs to act: the exact command in Action, whose confirmation value is a manifest digest or a recovery incarnation, which only proves that the person ran it knowingly, and Detail, the failure text after Redact.

Index

Constants

View Source
const (
	Format = "hikyo.security-maintenance-status/v1"
	// MaxBytes bounds what the server reads from a file it does not own.
	MaxBytes = 64 << 10
)

Variables

This section is empty.

Functions

func Detail

func Detail(text string, max int) string

Detail is failure text fit for the public file: scrubbed, then cut to max bytes at a character boundary.

func Redact

func Redact(text string) string

Redact removes values from diagnostic text and keeps the reasons. Docker Compose echoes a malformed environment value in double quotes and other tools quote refused input, so failure text can carry secrets. shortcut: an unquoted, unlabeled short value still passes; upgrade if a tool prints one.

Types

type Public

type Public struct {
	Format            string    `json:"format"`
	Mode              string    `json:"mode,omitempty"`
	Channel           string    `json:"channel,omitempty"`
	Enrolled          bool      `json:"enrolled"`
	Phase             string    `json:"phase"`
	Reason            string    `json:"reason,omitempty"`
	ProtectionGap     bool      `json:"protection_gap"`
	Applicable        []string  `json:"applicable"`
	Coverage          []string  `json:"coverage"`
	CoveredComponents []string  `json:"covered_components"`
	CoverageThrough   string    `json:"coverage_through,omitempty"`
	CatalogSequence   uint64    `json:"catalog_sequence"`
	LastAttempt       time.Time `json:"last_attempt,omitzero"`
	LastVerified      time.Time `json:"last_verified,omitzero"`
	KnownUntil        time.Time `json:"known_until,omitzero"`
	RunningVersion    string    `json:"running_version,omitempty"`
	TargetVersion     string    `json:"target_version,omitempty"`
	Action            string    `json:"action,omitempty"`
	Detail            string    `json:"detail,omitempty"`
}

Public is the whole file. Every field is display data for administrators.

type Report

type Report struct {
	Reported   bool
	Unreadable bool
	Status     Public
}

Report is what the server can honestly say: nothing configured or written yet, a file it cannot trust, or the coordinator's last published status.

func Load

func Load(path string) Report

Load never guesses: any failure other than an absent file is Unreadable.

Jump to

Keyboard shortcuts

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