cosign

package
v1.25.6 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package cosign provides functionality for signing and verifying container images using cosign (sigstore's container signing tool).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

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

Signer provides functionality for signing container images using cosign

func NewSigner

func NewSigner(opts *config.KanikoOptions) *Signer

NewSigner creates a new cosign signer instance

func (*Signer) GenerateKeyPair

func (s *Signer) GenerateKeyPair(ctx context.Context, outputDir string) error

GenerateKeyPair generates a new cosign key pair

func (*Signer) GetPublicKey

func (s *Signer) GetPublicKey(_ context.Context) (string, error)

GetPublicKey returns the public key from a key file

func (*Signer) IsImageSigned

func (s *Signer) IsImageSigned(ctx context.Context, imageRef string) (bool, error)

IsImageSigned checks if an image is signed using cosign

func (*Signer) SignImage

func (s *Signer) SignImage(ctx context.Context, imageRef string) error

SignImage signs a container image using cosign

func (*Signer) SignIndex

func (s *Signer) SignIndex(ctx context.Context, indexRef string) error

SignIndex signs a multi-platform image index using cosign

func (*Signer) VerifyImage

func (s *Signer) VerifyImage(ctx context.Context, imageRef string) error

VerifyImage verifies a signed container image using cosign

Jump to

Keyboard shortcuts

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