containeranalysis

package
v2.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const DeploymentType voucher.MetadataType = "deployment"

DeploymentType is a Grafeas specific type which refers to MetadataItems containing deployment data.

View Source
const DiscoveryType voucher.MetadataType = "discovery"

DiscoveryType is a Grafeas specific type which refers to MetadataItems containing metadata discovery status.

View Source
const ImageType voucher.MetadataType = "image"

ImageType is a Grafeas specific type which refers to MetadataItems containing Image information.

View Source
const PackageType voucher.MetadataType = "package"

PackageType is a Grafeas specific type which refers to MetadataItems containing package information.

Variables

This section is empty.

Functions

func OccurrenceToAttestation

func OccurrenceToAttestation(checkName string, occ *grafeas.Occurrence) voucher.SignedAttestation

OccurrenceToAttestation converts an Occurrence to a Attestation

func OccurrenceToBuildDetail

func OccurrenceToBuildDetail(occ *grafeas.Occurrence) (detail repository.BuildDetail)

OccurrenceToBuildDetail converts an Occurrence to a BuildDetail

func OccurrenceToVulnerability

func OccurrenceToVulnerability(occ *grafeas.Occurrence) voucher.Vulnerability

OccurrenceToVulnerability converts an Occurrence to a Vulnerability.

Types

type Client

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

Client implements voucher.MetadataClient, connecting to containeranalysis Grafeas.

func NewClient

func NewClient(ctx context.Context, binauthProject string, keyring signer.AttestationSigner) (*Client, error)

NewClient creates a new containeranalysis Grafeas Client.

func (*Client) AddAttestationToImage

func (g *Client) AddAttestationToImage(ctx context.Context, ref reference.Canonical, attestation voucher.Attestation) (voucher.SignedAttestation, error)

AddAttestationToImage adds a new attestation with the passed Attestation to the image described by ImageData.

func (*Client) CanAttest

func (g *Client) CanAttest() bool

CanAttest returns true if the client can create and sign attestations.

func (*Client) Close

func (g *Client) Close()

Close closes the containeranalysis Grafeas client.

func (*Client) GetAttestations

func (g *Client) GetAttestations(ctx context.Context, ref reference.Canonical) ([]voucher.SignedAttestation, error)

GetAttestations returns all of the attestations associated with an image.

func (*Client) GetBuildDetail

func (g *Client) GetBuildDetail(ctx context.Context, ref reference.Canonical) (repository.BuildDetail, error)

GetBuildDetail gets the BuildDetail for the passed image.

func (*Client) GetVulnerabilities

func (g *Client) GetVulnerabilities(ctx context.Context, ref reference.Canonical) (vulnerabilities []voucher.Vulnerability, err error)

GetVulnerabilities returns the detected vulnerabilities for the Image described by voucher.ImageData.

func (*Client) NewPayloadBody

func (g *Client) NewPayloadBody(ref reference.Canonical) (string, error)

NewPayloadBody returns a payload body appropriate for this MetadataClient.

Jump to

Keyboard shortcuts

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