skip to content

Your Kyverno verifyImages rule gates scan freshness — what can it prove to an auditor about workloads already running?

level: principalimportance: should knowfreq 30%

answer

  1. the auditor asks in the present tense
  2. the gate answers in the past tense
  3. three gaps: before, after, outside
  4. freshness decays with nothing watching
  5. deployment cadence is half the control

basics

~10 s

Only that workloads admitted after the rule went live met the condition at that moment. It says nothing about pods admitted earlier, whether attestations are still fresh, or images no pattern selected.

solid answer

~50 s

An image-verification rule is an admission gate, so its evidence is a record of decisions at object-creation time, not a statement about the current fleet. It supports the claim "every workload admitted since this date carried a verifiable, recent scan attestation when it was created" — and no more, for three reasons: pods admitted before the policy existed were never evaluated and are still running; freshness decays after admission with nothing re-checking it, so a pod admitted six weeks ago passed a fourteen-day test six weeks ago; and images no `imageReferences` pattern selected were never in scope. Closing the gap needs periodic re-admission through scheduled rollouts, an out-of-band check of running images against the same condition, and explicit coverage evidence. The organisational move is to describe the control you actually have rather than claim continuous verification you cannot support.

go deeper

for a junior

Know that an admission rule runs when a workload is created, so it says nothing about pods that were already running before the rule existed.

for a middle

Explain why a freshness condition is point-in-time: it is evaluated once at admission and never revisited, so what it guarantees decays with the age of the deployment.

for a senior

Design the compensating checks — a scheduled out-of-band evaluation of running images, coverage evidence from a catch-all rule, and re-admission through regular rollouts.

for a principal

Own the claim you make externally: state the control in the terms it operates in, name the residual population and the check interval, and assign the deployment-cadence half to a real owner.

## The claim the auditor wants, and the claim you have The auditor's question is about the present tense: *is everything running right now covered?* An admission-time rule answers a different question, in the past tense and per event: *was this object, at the moment it was created, accompanied by evidence that satisfied the condition?* The gap between those two sentences is the entire substance of this problem, and a candidate who states it crisply has already answered most of the question. ## Three specific gaps **1. Workloads that predate the policy.** Admission control evaluates requests. A pod created before the rule existed generated no request afterwards, so it was never evaluated and it is still running. In a cluster with long-lived workloads this is not a small population — a stateful service that has not been redeployed in five months sits entirely outside your evidence. **2. Decay after admission.** A freshness condition is evaluated once. A pod admitted six weeks ago with a two-day-old attestation satisfied a fourteen-day rule at the time; today the same attestation is forty-four days old, and nothing revisits it. The control is genuinely real, but what it enforces is *freshness at deploy time*, and the fleet's actual freshness is a function of how often you deploy. That reframing is the useful one: the true control is "scan freshness at admission" combined with "maximum time between deployments", and only the first half lives in the policy. **3. Images outside the selector.** A rule only evaluates images its `imageReferences` patterns select. Anything outside them was admitted without ever being considered, and produced no failure to notice. Coverage is therefore its own evidence question, separate from pass rates. ## What actually closes each gap - **Re-admission on a schedule.** If workloads are recreated regularly — a periodic rollout, or a policy that nothing runs longer than N days without redeployment — then every pod has been through the gate recently, and "admitted within the last N days" plus "the gate enforces a fourteen-day window" composes into a bound on fleet staleness. This is the honest way to turn a point-in-time gate into a continuous property, and it is an operational commitment, not a policy edit. - **An out-of-band check of what is running.** Enumerate the images actually in use across the cluster and evaluate the same condition against their attestations on a schedule, independently of admission. This directly answers the present-tense question, catches the pods that predate the policy, and is the only thing that detects decay. - **Coverage evidence.** Show that every running image reference matches a rule, typically by keeping a catch-all rule so that "selected by nothing" cannot happen. ## The organisational judgment The temptation, under audit pressure, is to let the auditor believe the gate proves more than it does. It is a bad trade in both directions: it fails the first time somebody looks closely, and internally it stops anyone from funding the periodic check that would make the claim true. The better move is to describe the control in the terms it actually operates in — "images are verified at deployment; workloads are redeployed at least every N days; a scheduled check evaluates what is running against the same condition and raises exceptions" — and to be explicit about the residual: the population admitted before the rule, and the window between checks. Auditors are generally comfortable with a control described accurately with a stated residual risk; they are much less comfortable discovering the residual themselves. That framing also settles internal arguments that would otherwise recur, because it names who owns which half. The platform team owns the gate. Whoever owns deployment cadence owns the decay half, and if a team wants an exception from periodic redeployment, they are asking for an exception from the control, which is a conversation with an owner rather than a policy-file edit. ## What not to claim Be precise about the evidence trail too. The decision record shows requests that were allowed or refused; it is a log of gate outcomes, not an inventory of what is running. Anyone building a compliance dashboard directly from admission outcomes is building a picture of *deployment activity*, and it will look complete while omitting exactly the workloads that have not been touched in months — which are the ones most likely to be stale.

  • Can you get the present-tense answer out of the policy engine itself?
    Not from an admission decision — it is a record of requests, not an inventory. You need something that enumerates the images actually running and evaluates the same condition against their attestations on a schedule. That check is what catches workloads admitted before the rule and attestations that have gone stale since.
  • How does deployment cadence become part of the control?
    A pod re-enters the gate only when it is recreated. If nothing runs longer than N days without a rollout, then every workload has passed the freshness condition within N days, and the fleet's staleness is bounded by the window plus N. Without that commitment the gate binds only new deployments.
  • A team asks to be exempt from periodic redeployment. What are they actually asking for?
    An exemption from half the control, not an operational convenience. Their workloads will keep running against attestations nobody re-evaluates. Treat it as a risk acceptance with a named owner and an expiry, and compensate with a more frequent out-of-band check on those images.
  • What would you say if the auditor asks for evidence covering the full quarter?
    Give the date the rule went to enforce, the decision record from that date forward, the coverage argument showing every image is selected by some rule, and an explicit statement of the residual — workloads admitted before that date and the interval between out-of-band checks. Describing the residual is stronger than implying there is none.

saying these in an interview costs you the question

  • Claims a green admission history proves the fleet is compliant
  • Forgets workloads admitted before the policy existed
  • Assumes freshness is re-evaluated while a pod runs
  • Treats admission decisions as an inventory of running images
  • Ignores images no imageReferences pattern selects

context