bundle

package
v0.3.17 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Overview

Packager bundle provides functionality to work with the sigstore budle format

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Envelope

type Envelope struct {
	sigstore.Bundle
	Signatures []attestation.Signature
	Statement  attestation.Statement
}

func (*Envelope) GetCertificate

func (e *Envelope) GetCertificate() attestation.Certificate

func (*Envelope) GetPredicate

func (env *Envelope) GetPredicate() attestation.Predicate

func (*Envelope) GetSignatures

func (e *Envelope) GetSignatures() []attestation.Signature

GetSignatures returns the signatures of the DSSE envelope wrapped in the bundle. They are extracted lazily on first call.

func (*Envelope) GetStatement

func (e *Envelope) GetStatement() attestation.Statement

func (*Envelope) GetStatementOrErr

func (e *Envelope) GetStatementOrErr() (attestation.Statement, error)

func (*Envelope) GetVerification

func (env *Envelope) GetVerification() attestation.Verification

GetVerifications returns the signtature verifications stored in the predicate (via the statement)

func (*Envelope) MarshalJSON added in v0.1.2

func (e *Envelope) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface by wrapping the protojson package. This allows the bundles to be marshaled correctly with the JSON module.

func (*Envelope) UnmarshalJSON

func (e *Envelope) UnmarshalJSON(data []byte) error

func (*Envelope) Verify

func (e *Envelope) Verify(_ ...any) error

Verify checks the bundle signatures against the sigstore or SPIFFE trust material configured in the signer library and records the conclusion in the predicate's verification data. Every conclusion is recorded, not only success: an unsigned envelope, a bundle no configured verifier can check, and a bundle whose signatures do not verify all leave a Verification whose status says so. An error is returned only when no conclusion could be reached.

Signer identities are not matched here; the policy checks them at evaluation time against the identities recorded in the verification. If the bundle already carries a successful verification, the signatures are not verified again.

type Parser

type Parser struct{}

func (*Parser) FileExtensions

func (p *Parser) FileExtensions() []string

FileExtensions returns the file extennsions this parser will look at.

func (*Parser) Parse

func (p *Parser) Parse(data []byte) ([]attestation.Envelope, error)

func (*Parser) ParseFile

func (p *Parser) ParseFile(path string) ([]attestation.Envelope, error)

ParseFile parses a sigstore bundle and returns the envelope

func (*Parser) ParseStream

func (p *Parser) ParseStream(r io.Reader) ([]attestation.Envelope, error)

ParseFile parses a file and returns all envelopes in it.

Jump to

Keyboard shortcuts

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