Verify an image's signatures against a policy. Default-deny: verification fails unless a signature satisfies the policy.
Signatures are supplied directly (opts[:signatures], a list of cosign signature artifact
images) or fetched from a transport (opts[:transport]) via the Referrers API / the cosign
.sig tag. Each cosign signature layer's payload is checked against the policy's public keys
with native ECDSA (Stevedore.Sign.Sigstore).
Spec: cosign SIGNATURE_SPEC.
Summary
Functions
Verifies subject against policy, returning the signatures that passed.
Types
Functions
@spec image(Stevedore.Image.t() | Stevedore.Digest.t(), policy(), keyword()) :: {:ok, [verified()]} | {:error, Stevedore.Verify.Error.t()}
Verifies subject against policy, returning the signatures that passed.
policy is %{keys: [public_key], require: :any | :all} (:any by default). opts must
carry :signatures (signature artifact images) or :transport (to fetch them).