Internal

internal/adapters/cli/verify

github.com/nilstate/scafld/v2/internal/adapters/cli/verify

import "github.com/nilstate/scafld/v2/internal/adapters/cli/verify"

Functions

func Handler() func(context.Context, []string, io.Writer, io.Writer) int

Source: internal/adapters/cli/verify/verify.go:45

Handler returns a CLI-compatible verify handler.

func Parse(args []string) (Options, error)

Source: internal/adapters/cli/verify/verify.go:325

Parse parses verify command arguments.

func RenderSelfCheck(report SelfCheckReport) string

Source: internal/adapters/cli/verify/verify.go:456

RenderSelfCheck renders a SelfCheckReport for humans. It states plainly what scafld can and cannot confirm and never claims a merge gate is enforced.

func Run(ctx context.Context, opts Options) (appverify.Result, error)

Source: internal/adapters/cli/verify/verify.go:80

Run loads the receipt and trusted keys, composes ports, and verifies.

func SelfCheck(ctx context.Context, root string) (SelfCheckReport, error)

Source: internal/adapters/cli/verify/verify.go:430

SelfCheck reports, without contacting any network or service, the local verify wiring: the configured verify.policy and whether the CI workflow file is present. It reads reporting metadata only and never touches a receipt.

Types

type Options

Source: internal/adapters/cli/verify/verify.go:31

Options configures the verify CLI adapter.

type Options struct {
	Root           string
	ReceiptPath    string
	TrustedKeys    string
	Target         string
	MaterialRef    string
	AcceptanceRoot string
	MaterialOnly   bool
	JSON           bool
	CI             bool
	SelfCheck      bool
}
Fields
  • Root string
  • ReceiptPath string
  • TrustedKeys string
  • Target string
  • MaterialRef string
  • AcceptanceRoot string
  • MaterialOnly bool
  • JSON bool
  • CI bool
  • SelfCheck bool

type SelfCheckReport

Source: internal/adapters/cli/verify/verify.go:413

SelfCheckReport is the offline wiring state scafld can confirm locally. It never asserts that any merge gate is active: requiring the verify check is a GitHub branch-protection setting scafld cannot read or set.

type SelfCheckReport struct {
	Policy            string
	WorkflowInstalled bool
	WorkflowPath      string
	TrustedKeysPath   string
	TrustedKeysStatus string
	KeyLifecycle      trust.KeyLifecycleSummary
	SigningKeyPath    string
	SigningKeyStatus  string
	SigningKeyMode    string
	// Gap is set when the declared policy implies a CI workflow that is not installed.
	Gap string
}
Fields
  • Policy string
  • WorkflowInstalled bool
  • WorkflowPath string
  • TrustedKeysPath string
  • TrustedKeysStatus string
  • KeyLifecycle trust.KeyLifecycleSummary
  • SigningKeyPath string
  • SigningKeyStatus string
  • SigningKeyMode string
  • Gap string

    Gap is set when the declared policy implies a CI workflow that is not installed.