pkg

package
v0.0.0-...-2c06c43 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnvelopeFromBytes

func EnvelopeFromBytes(payload []byte) (env *dsselib.Envelope, err error)

func FindSigningCertificate

func FindSigningCertificate(ctx context.Context, uuids []string, dssePayload dsselib.Envelope, rClient *client.Rekor) (*x509.Certificate, error)

FindSigningCertificate finds and verifies a matching signing certificate from a list of Rekor entry UUIDs.

func GetRekorEntries

func GetRekorEntries(rClient *client.Rekor, artifactHash string) ([]string, error)

GetRekorEntries finds all entry UUIDs by the digest of the artifact binary.

func VerifyProvenance

func VerifyProvenance(env *dsselib.Envelope, expectedHash string) error

func VerifyWorkflowIdentity

func VerifyWorkflowIdentity(id *WorkflowIdentity, source string) error

VerifyWorkflowIdentity verifies the signing certificate information

Types

type WorkflowIdentity

type WorkflowIdentity struct {
	// The caller repository
	CallerRepository string `json:"caller"`
	// The commit SHA where the workflow was triggered
	CallerHash string `json:"commit"`
	// Current workflow (reuseable workflow) ref
	JobWobWorkflowRef string `json:"job_workflow_ref"`
	// Trigger
	Trigger string `json:"trigger"`
	// Issuer
	Issuer string `json:"issuer"`
}

func GetWorkflowInfoFromCertificate

func GetWorkflowInfoFromCertificate(cert *x509.Certificate) (*WorkflowIdentity, error)

GetWorkflowFromCertificate gets the workflow identity from the Fulcio authenticated content.

Jump to

Keyboard shortcuts

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