Documentation
¶
Overview ¶
Packager bundle provides functionality to work with the sigstore budle format
Index ¶
- type Envelope
- func (e *Envelope) GetCertificate() attestation.Certificate
- func (env *Envelope) GetPredicate() attestation.Predicate
- func (e *Envelope) GetSignatures() []attestation.Signature
- func (e *Envelope) GetStatement() attestation.Statement
- func (e *Envelope) GetStatementOrErr() (attestation.Statement, error)
- func (env *Envelope) GetVerification() attestation.Verification
- func (e *Envelope) MarshalJSON() ([]byte, error)
- func (e *Envelope) UnmarshalJSON(data []byte) error
- func (e *Envelope) Verify(_ ...any) error
- type Parser
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
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 (*Envelope) Verify ¶
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 ¶
FileExtensions returns the file extennsions this parser will look at.
func (*Parser) ParseFile ¶
func (p *Parser) ParseFile(path string) ([]attestation.Envelope, error)
ParseFile parses a sigstore bundle and returns the envelope
func (*Parser) ParseStream ¶
ParseFile parses a file and returns all envelopes in it.