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:38
Handler returns a CLI-compatible verify handler.
func Parse(args []string) (Options, error)
Source: internal/adapters/cli/verify/verify.go:209
Parse parses verify command arguments.
func RenderSelfCheck(report SelfCheckReport) string
Source: internal/adapters/cli/verify/verify.go:322
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:69
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:296
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:27
Options configures the verify CLI adapter.
type Options struct {
Root string
ReceiptPath string
TrustedKeys string
Target string
JSON bool
CI bool
SelfCheck bool
}Fields
Root stringReceiptPath stringTrustedKeys stringTarget stringJSON boolCI boolSelfCheck bool
type SelfCheckReport
Source: internal/adapters/cli/verify/verify.go:279
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 stringWorkflowInstalled boolWorkflowPath stringTrustedKeysPath stringTrustedKeysStatus stringKeyLifecycle trust.KeyLifecycleSummarySigningKeyPath stringSigningKeyStatus stringSigningKeyMode stringGap stringGap is set when the declared policy implies a CI workflow that is not installed.
