ctl

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const IntotoPayloadType = "application/vnd.in-toto+json"

Variables

This section is empty.

Functions

This section is empty.

Types

type Implementation

type Implementation interface {
	ApplySingleVEX(*sarif.Report, *vex.VEX) (*sarif.Report, error)
	SortDocuments([]*vex.VEX) []*vex.VEX
	OpenVexData(Options, []string) ([]*vex.VEX, error)
	Sort(docs []*vex.VEX) []*vex.VEX
	AttestationBytes(*attestation.Attestation) ([]byte, error)
	Attach(context.Context, *attestation.Attestation, string) error
	SourceType(uri string) (string, error)
	ReadImageAttestations(context.Context, Options, string) ([]*vex.VEX, error)
}

type Options

type Options struct {
	Products []string // List of products to match in CSAF docs
	Format   string   // Firmat of the vex documents
	Sign     bool     // When true, attestations will be signed before attaching
}

type VexCtl

type VexCtl struct {
	Options Options
	// contains filtered or unexported fields
}

func New

func New() *VexCtl

func (*VexCtl) Apply

func (vexctl *VexCtl) Apply(r *sarif.Report, vexDocs []*vex.VEX) (finalReport *sarif.Report, err error)

Apply takes a sarif report and applies one or more vex documents

func (*VexCtl) ApplyFiles

func (vexctl *VexCtl) ApplyFiles(r *sarif.Report, files []string) (*sarif.Report, error)

ApplyFiles takes a list of paths to vex files and applies them to a report

func (*VexCtl) Attach

func (vexctl *VexCtl) Attach(ctx context.Context, att *attestation.Attestation, imageRefs []string) (err error)

Attach attaches an attestation to a list of images

func (*VexCtl) Attest

func (vexctl *VexCtl) Attest(vexDataPath string, imageRefs []string) (*attestation.Attestation, error)

Generate an attestation from a VEX

func (*VexCtl) VexFromURI

func (vexctl *VexCtl) VexFromURI(ctx context.Context, uri string) (vexData *vex.VEX, err error)

VexFromURI return a vex doc from a path, image ref or URI

Jump to

Keyboard shortcuts

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