manifest

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 10 Imported by: ? 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 manifest holds the mage targets that build, sign and verify the signed runner manifest the self-healing runner subsystem consumes (docs/arch/self-healing-runner.md).

mage manifest:build    dist/runner-manifest.json from mage/download's pinned table
mage manifest:sign     dist/runner-manifest.json.minisig with RUNNER_MANIFEST_MINISIGN_KEY
mage manifest:verify   the pair against the public key compiled into ephemerd
mage manifest:keygen   a fresh minisign keypair (rotation)

The manifest's version and per-platform SHA-256 values come from ONE place, mage/download/download.go (RunnerVersion, RunnerFloor, pinnedSHA256): the same table `mage download` refuses to embed an archive without. Nothing here re-types a hash.

Index

Constants

View Source
const (
	// EnvOut is the manifest path. Default dist/runner-manifest.json.
	EnvOut = "RUNNER_MANIFEST_OUT"
	// EnvFloor overrides download.RunnerFloor for one build (an emergency
	// floor bump without a code change). Must be <= RunnerVersion.
	EnvFloor = "RUNNER_MANIFEST_FLOOR"
	// EnvChannel is "stable" (default) or "canary".
	EnvChannel = "RUNNER_MANIFEST_CHANNEL"
	// EnvRollback = "true" marks a deliberate downgrade.
	EnvRollback = "RUNNER_MANIFEST_ROLLBACK"
	// EnvPublishedAt pins published_at (RFC 3339) for a reproducible
	// build; default now.
	EnvPublishedAt = "RUNNER_MANIFEST_PUBLISHED_AT"
	// EnvSecretKey is the minisign secret key: the whole .key file or just
	// its base64 line. This is the GitHub Actions secret
	// RUNNER_MANIFEST_MINISIGN_KEY on ephpm/ephemerd.
	EnvSecretKey = "RUNNER_MANIFEST_MINISIGN_KEY"
	// EnvSecretKeyFile is a path to the .key file, for local signing.
	EnvSecretKeyFile = "RUNNER_MANIFEST_MINISIGN_KEY_FILE"
	// EnvPublicKeyFile makes verify use this .pub instead of the embedded
	// key (checking a rotated key before it is compiled in).
	EnvPublicKeyFile = "RUNNER_MANIFEST_PUBLIC_KEY_FILE"
	// EnvKeygenDir is where keygen writes runner-manifest.pub and
	// runner-manifest.key. Default: the current directory. The .key file
	// MUST NOT be committed.
	EnvKeygenDir = "RUNNER_MANIFEST_KEYGEN_DIR"
)

Environment knobs. Every one has a default so `mage manifest:build` with no environment produces the stable manifest for the pinned runner.

Variables

This section is empty.

Functions

func Build

func Build() error

Build writes runner-manifest.json from the pinned runner table.

func Compose

func Compose(floor, channel string, rollback bool, publishedAt string) (*runnerversion.Manifest, error)

Compose builds the manifest value. floor/channel/publishedAt empty = defaults (download.RunnerFloor, stable, now).

func Keygen

func Keygen() error

Keygen writes a fresh minisign keypair: runner-manifest.pub (commit it to pkg/runnerversion/keys/ to rotate the trust root) and runner-manifest.key (store it ONLY as the RUNNER_MANIFEST_MINISIGN_KEY secret; never commit it). Refuses to overwrite existing files.

func Sign

func Sign() error

Sign writes <out>.minisig next to the manifest, signed with the secret key from RUNNER_MANIFEST_MINISIGN_KEY (or _FILE).

func Verify

func Verify() error

Verify checks the manifest + .minisig against the public key compiled into ephemerd (or RUNNER_MANIFEST_PUBLIC_KEY_FILE). This is the CI gate that proves the secret in the repository matches the key nodes trust.

Types

This section is empty.

Jump to

Keyboard shortcuts

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