root

package
v0.29.2 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GitHubActionsIssuer = "https://token.actions.githubusercontent.com"
	GoogleOIDCIssuer    = "https://accounts.google.com"
	GitHubOAuthIssuer   = "https://github.com/login/oauth"
	GitLabIssuer        = "https://gitlab.com"
)

known OIDC issuers for auto-detection

Variables

View Source
var GithubTrustedRoot []byte
View Source
var PublicSigstoreTrustedRoot []byte

Functions

func FetchTrustedRoot

func FetchTrustedRoot() ([]byte, error)

fetches gh trusted root

func GetGitHubTrustedRoot

func GetGitHubTrustedRoot() []byte

returns embedded github trusted root

func GetPublicTrustedRoot

func GetPublicTrustedRoot() []byte

returns embedded public sigstore trusted root

func GetTrustedRoot

func GetTrustedRoot() ([]byte, error)

returns the GitHub trusted root with fallback mechanism. first attempts to fetch the latest root dynamically, and falls back to the embedded root if the dynamic fetch fails.

Types

type TrustedRootSource

type TrustedRootSource string

trusted root source selection

const (
	TrustedRootSourceGitHub TrustedRootSource = "github"
	TrustedRootSourcePublic TrustedRootSource = "public"
	TrustedRootSourceAuto   TrustedRootSource = "auto"
)

func DetectTrustedRootFromCert

func DetectTrustedRootFromCert(certPEM []byte) (TrustedRootSource, error)

detects trusted root from certificate's OIDC issuer

func SelectTrustedRoot

func SelectTrustedRoot(source TrustedRootSource, certPEM []byte) ([]byte, TrustedRootSource, error)

selects trusted root based on source and optional certificate

Jump to

Keyboard shortcuts

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