containeranalysis

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: Apache-2.0 Imports: 14 Imported by: 8

Documentation

Index

Constants

View Source
const (
	PkgVulnerability     = "PACKAGE_VULNERABILITY"
	AttestationAuthority = "ATTESTATION_AUTHORITY"
)

Container Analysis Library Specific Constants.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

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

Cache struct defines Cache for container analysis client.

func NewCache

func NewCache() (*Cache, error)

NewCache Create a new Cache for container analysis client.

func (Cache) AttestationNote

func (c Cache) AttestationNote(aa *kritisv1beta1.AttestationAuthority) (*grafeas.Note, error)

AttestationNote returns a note if it exists for given AttestationAuthority

func (Cache) Attestations

func (c Cache) Attestations(image string) ([]metadata.PGPAttestation, error)

Attestations gets AttesationAuthority Occurrences for a specified image from cache or from client.

func (Cache) CreateAttestationNote

func (c Cache) CreateAttestationNote(aa *kritisv1beta1.AttestationAuthority) (*grafeas.Note, error)

CreateAttestationNote creates an attestation note from AttestationAuthority

func (Cache) CreateAttestationOccurence

func (c Cache) CreateAttestationOccurence(n *grafeas.Note, image string, p *secrets.PGPSigningSecret) (*grafeas.Occurrence, error)

CreateAttestationOccurence creates an Attestation occurrence for a given image and secret.

func (Cache) Vulnerabilities

func (c Cache) Vulnerabilities(image string) ([]metadata.Vulnerability, error)

Vulnerabilities gets Package Vulnerabilities Occurrences for a specified image.

type Client

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

Client struct implements Fetcher Interface.

func New

func New() (*Client, error)

func (Client) AttestationNote

func (c Client) AttestationNote(aa *kritisv1beta1.AttestationAuthority) (*grafeas.Note, error)

AttestationNote returns a note if it exists for given AttestationAuthority

func (Client) Attestations

func (c Client) Attestations(containerImage string) ([]metadata.PGPAttestation, error)

Attestations gets AttesationAuthority Occurrences for a specified image.

func (Client) CreateAttestationNote

func (c Client) CreateAttestationNote(aa *kritisv1beta1.AttestationAuthority) (*grafeas.Note, error)

CreateAttestationNote creates an attestation note from AttestationAuthority

func (Client) CreateAttestationOccurence

func (c Client) CreateAttestationOccurence(note *grafeas.Note,
	containerImage string,
	pgpSigningKey *secrets.PGPSigningSecret) (*grafeas.Occurrence, error)

CreateAttestationOccurence creates an Attestation occurrence for a given image and secret.

func (Client) DeleteAttestationNote

func (c Client) DeleteAttestationNote(aa *kritisv1beta1.AttestationAuthority) error

DeleteAttestationNote deletes a note for given AttestationAuthority

func (Client) DeleteOccurrence

func (c Client) DeleteOccurrence(ID string) error

DeleteOccurrence deletes an occurrence with given ID

func (Client) Vulnerabilities

func (c Client) Vulnerabilities(containerImage string) ([]metadata.Vulnerability, error)

Vulnerabilities gets Package Vulnerabilities Occurrences for a specified image.

Jump to

Keyboard shortcuts

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