pkg

package
v0.0.0-...-c181241 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: Apache-2.0 Imports: 28 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, env dsselib.Envelope, artifactHash string) ([]string, error)

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

func VerifyWorkflowIdentity

func VerifyWorkflowIdentity(id *WorkflowIdentity) error

VerifyWorkflowIdentity verifies the signing certificate information

Types

type Workflow

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

func WorkflowFromBytes

func WorkflowFromBytes(content []byte) (*Workflow, error)

func (*Workflow) Validate

func (w *Workflow) Validate() error

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