You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Migrate disallow-latest-tag to ValidatingPolicy #5115
Part of the Kyverno 1.20 migration (#4996): disallow-latest-tag is still a ClusterPolicy, which Kyverno 1.20 removes. It is one of the four policies on that list with no Kyverno CLI test, so nothing pins its behaviour across a rewrite today.
The policy keeps what runs reproducible: every container image must carry a tag, and the mutable :latest tag is refused. It runs in Audit, on Pod creation, outside the infrastructure namespaces that run third-party system charts.
Smallest useful change
Add a Kyverno CLI test that pins today's behaviour and see it pass against the ClusterPolicy: a tagged image passes, a tagless image fails, :latest fails (for containers, init containers and ephemeral containers), a tag-plus-digest reference passes, and a Pod in an excluded namespace is skipped.
Rewrite the policy as a ValidatingPolicy with the same Audit action, Pod CREATE scope, background evaluation and namespace exclusions, and delete the ClusterPolicy in the same change.
Record the policy by name in the failure-action baseline.
Acceptance criteria
The new CLI test passes against the ClusterPolicy before the rewrite, and passes unchanged in its expected results against the new kind.
The failure-action baseline records disallow-latest-tag as Audit.
kyverno test ./tests and the fixture-evaluation check pass in CI.
After deploy, the new policy reports ready and no ClusterPolicy named disallow-latest-tag remains.
Priority High, Effort Low (one policy, one test, one deploy). Service class Risk reduction, inherited from #4996.
Correction to step 1 of this issue: the CLI test that pins this policy already exists (#5066), so that step was done before this issue was filed. The draft #5116 reuses it, collapses its per-rule expectations into per-policy ones, and adds debug-container fixtures.
Post-deploy check (read-only, production, 2026-10-20 ~11:40Z): ValidatingPolicy/disallow-latest-tag is READY=true, ClusterPolicy/disallow-latest-tag no longer exists, and its PolicyReport results are being written (345 current pass, 0 fail). The last acceptance criterion holds.
Activity
chore: agent-claim #5115 nonce=298816cd0967cfc5541dde01c3613643
devantler commentedon Oct 20, 2026
Correction to step 1 of this issue: the CLI test that pins this policy already exists (#5066), so that step was done before this issue was filed. The draft #5116 reuses it, collapses its per-rule expectations into per-policy ones, and adds debug-container fixtures.
fix(kyverno): do not read a registry port as an image tag
devantler commentedon Oct 20, 2026
Post-deploy check (read-only, production, 2026-10-20 ~11:40Z):
ValidatingPolicy/disallow-latest-tagisREADY=true,ClusterPolicy/disallow-latest-tagno longer exists, and its PolicyReport results are being written (345 currentpass, 0fail). The last acceptance criterion holds.