Summary
ImageValidatingPolicy (policies.kyverno.io/v1beta1) never reads the PolicyException.spec.images or spec.allowedValues fields when evaluating exceptions. Any PolicyException whose policyRefs and matchConditions match a resource causes the entire resource to skip image signature verification, regardless of the scope declared in the exception's images/allowedValues field. An administrator who writes an exception intending to exempt one specific image inadvertently exempts every image on the matched resource from verification. This breaks the documented, cross-policy-type contract of PolicyExceptionSpec.Images — ValidatingPolicy, GeneratingPolicy, and MutatingPolicy all treat it as a partial exemption, but ImageValidatingPolicy does not follow the same contract.
Impact
A resource submitter who can cause a PolicyException to match their workload — for example by submitting a resource in a namespace where a broad exception already exists — can deploy images with invalid or absent signatures without triggering any Kyverno image-verification denial. Because the exception evaluator returns early with a full skip as soon as any compiled exception's matchConditions evaluate true, all validations (the actual signature-verification CEL expressions) are bypassed for the entire resource, not just for images listed in spec.images. This affects all ImageValidatingPolicy deployments in Kyverno 1.14.0 through 1.18.x.
Detection
Audit all PolicyException resources in the cluster and identify those whose policyRefs target an ImageValidatingPolicy. For each such exception, confirm whether the spec.images or spec.allowedValues fields are set with a narrower scope than the full resource match. On unpatched versions, these scoped fields are silently ignored, meaning any matched resource bypasses all image verification. Review admission logs for resources that should have been denied by image-verification policies but were allowed through with a matched exception.
Mitigation
Upgrade to Kyverno 1.19.1, which fixes pkg/image/verification/evaluator/compiler.go to read and compile polex.Spec.Images and polex.Spec.AllowedValues from each PolicyException, and updates the evaluation logic in policy.go to apply per-image filtering against those fields before returning an exemption result. Until the upgrade is complete, review all PolicyException resources that reference ImageValidatingPolicy targets and tighten their matchConditions to limit the blast radius — note that this does not fully remediate the bug on unpatched versions, as the images field remains ignored.