Documentation
¶
Index ¶
- func NoopUploader(ctx context.Context, att oci.Signature, location string) (string, error)
- func OCIUploader(ctx context.Context, att oci.Signature, location string) (string, error)
- func RekorUploader(ctx context.Context, att oci.Signature, location string) (string, error)
- type AttestationSigner
- type AttestationUploader
- type Generator
- type Predicate
- type PrivateKeyLoader
- type Signer
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NoopUploader ¶
func OCIUploader ¶
Built-in uploaders
Types ¶
type AttestationSigner ¶
type AttestationUploader ¶
type AttestationUploader func(ctx context.Context, att oci.Signature, location string) (string, error)
AttestationUploader is a function that uploads an attestation and returns a result string or error This allows pluggable upload logic (OCI, Rekor, None, or custom)
type Generator ¶
type Generator struct{}
Generator handles VSA predicate generation
func NewGenerator ¶
func NewGenerator() *Generator
NewGenerator creates a new VSA predicate generator
func (*Generator) GeneratePredicate ¶
func (g *Generator) GeneratePredicate(ctx context.Context, report applicationsnapshot.Report, comp applicationsnapshot.Component) (*Predicate, error)
GeneratePredicate creates a Predicate for a validated image/component.
type Predicate ¶
type Predicate struct {
ImageRef string `json:"imageRef"`
ValidationResult string `json:"validationResult"`
Timestamp string `json:"timestamp"`
Verifier string `json:"verifier"`
PolicySource string `json:"policySource"`
Component map[string]interface{} `json:"component"`
RuleResults []evaluator.Result `json:"ruleResults"`
}
Predicate represents a Verification Summary Attestation (VSA) predicate.
type PrivateKeyLoader ¶
type PrivateKeyLoader func(key []byte, pass []byte) (signature.SignerVerifier, error)
type Signer ¶
type Signer struct {
FS afero.Fs // for reading the VSA file
KeyLoader PrivateKeyLoader // injected loader
SignFunc AttestationSigner // injected cosign API
}
func NewSigner ¶
func NewSigner(fs afero.Fs, loader PrivateKeyLoader, signer AttestationSigner) *Signer
Click to show internal directories.
Click to hide internal directories.