signer

package
v0.0.0-...-8e01d1d Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Validate  vulnzsigningpolicy.ValidateFunc
	PgpKey    *secrets.PgpKey
	Authority v1beta1.AttestationAuthority
	Project   string
}

A signer config that includes necessary data and handler for signing.

type ImageVulnerabilities

type ImageVulnerabilities struct {
	ImageRef        string
	Vulnerabilities []metadata.Vulnerability
}

ImageVulnerabilities is an input for running vulnerability policy validation.

type Signer

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

A signer is used for creating attestations for an image.

func New

func New(client metadata.ReadWriteClient, c *Config) Signer

Creating a new signer object.

func (Signer) ValidateAndSign

func (s Signer) ValidateAndSign(imageVulnz ImageVulnerabilities, vps v1beta1.VulnzSigningPolicy) error

ValidateAndSign validates image from vulnz signing policy and then creates attestation for the passing image. Returns an error if image does not pass or creating an attestation fails.

Jump to

Keyboard shortcuts

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