attest

package
v0.3.21 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package attest verifies Sigstore bundles for pinned artifact digests.

Index

Constants

View Source
const (
	// BundleMediaTypePrefix matches modern Sigstore bundle artifact media types,
	// including version parameters and versioned subtype spellings.
	BundleMediaTypePrefix = "application/vnd.dev.sigstore.bundle"

	// DefaultIssuer is GitHub Actions' OIDC token issuer.
	DefaultIssuer = "https://token.actions.githubusercontent.com"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Verifier)

Option configures a Verifier.

func WithTrustedMaterial

func WithTrustedMaterial(material root.TrustedMaterial) Option

WithTrustedMaterial supplies trusted Sigstore material. A nil value keeps the lazily fetched public-good trust root.

type Verifier

type Verifier struct {
	// contains filtered or unexported fields
}

Verifier verifies Sigstore bundles against a trusted root. The public-good root is fetched lazily so markers that do not opt in cause no TUF traffic.

func New

func New(opts ...Option) *Verifier

New returns a Sigstore bundle verifier.

func (*Verifier) Verify

func (v *Verifier) Verify(
	ctx context.Context,
	bundles [][]byte,
	digest, identity, issuer string,
) (bool, error)

Verify reports whether any bundle cryptographically verifies for digest and matches the certificate identity policy. Malformed and nonmatching bundles are skipped; trust-root setup failures are returned as infrastructure errors.

Jump to

Keyboard shortcuts

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