cli

package
v0.0.0-...-4c851a9 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package cli implements the countersign command-line interface.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the semantic version (set by -ldflags).
	Version = "dev"

	// Commit is the git commit hash (set by -ldflags).
	Commit = "unknown"

	// Date is the build date (set by -ldflags).
	Date = "unknown"
)

Version information set by build flags.

Functions

func CreateCIConfig

func CreateCIConfig() error

CreateCIConfig creates a CI configuration file.

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func GenerateGitHubAction

func GenerateGitHubAction() string

GenerateGitHubAction generates a GitHub Actions workflow for CI verification.

Types

type BatchResult

type BatchResult struct {
	Package  string                          `json:"package"`
	Version  string                          `json:"version"`
	Verified bool                            `json:"verified"`
	Score    int                             `json:"score"`
	Grade    string                          `json:"grade"`
	Errors   []string                        `json:"errors,omitempty"`
	Warnings []string                        `json:"warnings,omitempty"`
	Result   *attestation.VerificationResult `json:"details,omitempty"`
}

BatchResult holds the result of verifying a single package in batch mode.

type CustomPublisher

type CustomPublisher struct {
	Name       string
	Identity   string
	OIDCIssuer string
}

CustomPublisher is a user-defined trusted publisher.

type Health

type Health struct {
	Status  string `json:"status"`
	Latency string `json:"latency,omitempty"`
	Error   string `json:"error,omitempty"`
}

Health represents the health of a single component.

type HealthStatus

type HealthStatus struct {
	Status     string            `json:"status"`
	Version    string            `json:"version"`
	Components map[string]Health `json:"components"`
	Timestamp  string            `json:"timestamp"`
}

HealthStatus represents the health check result.

type InitConfig

type InitConfig struct {
	DefaultAction     string
	TrustMCP          bool
	TrustAnthropic    bool
	CustomPublishers  []CustomPublisher
	RequireSignature  bool
	RequireProvenance bool
	MinSLSALevel      int
}

InitConfig holds the configuration gathered during init.

type SignResult

type SignResult struct {
	Bundle          []byte
	BundleBase64    string
	Identity        string
	Issuer          string
	RekorLogIndex   int64
	RekorLogID      string
	Timestamp       time.Time
	CertPEM         string
	SignatureBase64 string
}

SignResult holds the result of a signing operation.

Jump to

Keyboard shortcuts

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