Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsFixAvailable ¶
func IsFixAvailable(pis []*vulnerability.PackageIssue) bool
Types ¶
type RawAttestation ¶
type RawAttestation struct { SignatureType SignatureType Signature RawSignature SerializedPayload []byte }
RawAttestation represents an unauthenticated attestation, stripped of any information specific to the wire format. RawAttestation may only be trusted after successfully verifying its Signature. Each RawAttestation contains one signature.
RawAttestations are parsed from either PgpSignedAttestation or GenericSignedAttestation Occurrences. PgpSignedAttestation has one signature, and is parsed into one RawAttestation. GenericSignedAttestation has multiple signatures, and is parsed into multiple RawAttestations.
func GetRawAttestationsFromOccurrence ¶
func GetRawAttestationsFromOccurrence(occ *grafeas.Occurrence) ([]RawAttestation, error)
func MakeRawAttestation ¶
func MakeRawAttestation(sigType SignatureType, sig, id, payload string) RawAttestation
For testing purposes. Should not be used as part of metadata external API.
type RawSignature ¶
RawSignature contains the signature content and an ID for the public key that can verify the signature. The ID does not by itself verify the signature. It is merely a key lookup hint.
type ReadOnlyClient ¶
type ReadOnlyClient interface { // Vulnerabilities returns package vulnerabilities for a given image. Vulnerabilities(containerImage string) ([]Vulnerability, error) //Attestations get Attestation Occurrences for given image. Attestations(containerImage string, aa *kritisv1beta1.AttestationAuthority) ([]RawAttestation, error) // Close closes client connections Close() }
Read-only interface to access Occurrences and Notes using Grafeas API.
type ReadWriteClient ¶
type ReadWriteClient interface { // Vulnerabilities returns package vulnerabilities for a given image. Vulnerabilities(containerImage string) ([]Vulnerability, error) // CreateAttestationOccurrence creates an Attestation occurrence for a given image, secret, and project. CreateAttestationOccurrence(noteName string, containerImage string, pgpSigningKey *secrets.PGPSigningSecret, proj string) (*grafeasv1beta1.Occurrence, error) //AttestationNote fetches an Attestation note for an Attestation Authority. AttestationNote(aa *kritisv1beta1.AttestationAuthority) (*grafeasv1beta1.Note, error) // Create Attestation Note for an Attestation Authority. CreateAttestationNote(aa *kritisv1beta1.AttestationAuthority) (*grafeasv1beta1.Note, error) //Attestations get Attestation Occurrences for given image. Attestations(containerImage string, aa *kritisv1beta1.AttestationAuthority) ([]RawAttestation, error) // Close closes client connections Close() }
Read/write interface to access Occurrences and Notes using Grafeas API.
type SignatureType ¶
type SignatureType int
const ( UnknownSignatureType SignatureType = iota PgpSignatureType GenericSignatureType )
func (SignatureType) String ¶
func (st SignatureType) String() string
type Vulnerability ¶
func GetVulnerabilityFromOccurrence ¶
func GetVulnerabilityFromOccurrence(occ *grafeas.Occurrence) *Vulnerability