envelope

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 14 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

Functions

func FromSignedArtifact added in v0.3.6

func FromSignedArtifact(artifact signer.SignedArtifact) (attestation.Envelope, error)

FromSignedArtifact returns an attestation.Envelope from a SignedArtifact object as returned from the signer. It serializes the artifact to its canonical JSON form and parses it through the matching collector parser.

Types

type Format

type Format string
const (
	FormatDSSE     Format = "dsse"
	FormatBare     Format = "bare"
	FormatJSONL    Format = "jsonl"
	FormatBundleV3 Format = "application/vnd.dev.sigstore.bundle.v0.3+json"
)

type JsonlParser

type JsonlParser struct{}

JsonlParser is a virtual parser that splits the jsonl files into the contained JSON structs and calls the configured envelope parsers for each instance.

func NewJSONL

func NewJSONL() *JsonlParser

func (*JsonlParser) FileExtensions

func (jlp *JsonlParser) FileExtensions() []string

FileExtensions returns the file extennsions this parser will look at.

func (*JsonlParser) Parse

func (jlp *JsonlParser) Parse(data []byte) ([]attestation.Envelope, error)

func (*JsonlParser) ParseFile

func (jlp *JsonlParser) ParseFile(path string) ([]attestation.Envelope, error)

ParseFile takes a path and returns the attestations in the file

func (*JsonlParser) ParseStream

func (jlp *JsonlParser) ParseStream(jsonlStream io.Reader) ([]attestation.Envelope, error)

ParseFile parses a file and returns all envelopes in it.

type ParserList

type ParserList map[Format]attestation.EnvelopeParser

ParserList wraps a map listing the loaded parsers to expose convenience methods

func (*ParserList) Parse

func (list *ParserList) Parse(r io.Reader) ([]attestation.Envelope, error)

Parse takes a reader and parses

func (*ParserList) ParseFiles added in v0.2.2

func (list *ParserList) ParseFiles(paths []string) ([]attestation.Envelope, error)

ParseFiles takes a list of paths and parses envelopes directly from them. Each entry may be either a file or a directory; directory entries are expanded one level deep into their non-directory contents (matching the --attestation-dir convention used by cosign and similar CLIs). Nested subdirectories are NOT traversed — preventing accidental crawls of a project tree when the caller pointed at the wrong path.

Directories

Path Synopsis
Package bare implenta a parser to make non-signed attestations compatible with the ampel policy engine.
Package bare implenta a parser to make non-signed attestations compatible with the ampel policy engine.
Packager bundle provides functionality to work with the sigstore budle format
Packager bundle provides functionality to work with the sigstore budle format

Jump to

Keyboard shortcuts

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