Skip to content

Build a patched Kyverno migration runtime #5542

Closed
Closed

Description

@devantler

🤖 Generated by the Agentic Engineer

Problem and impact

The migration lifecycle repair needs reviewed maintenance tooling with current security fixes. The public Kyverno v1.19.2 CLI image is built with Go 1.26.9, which predates the Go 1.26.10 certificate-verification fix. Reusing it for a new maintenance rollout would leave that prerequisite unresolved.

Public source evidence

The published reg.kyverno.io/kyverno/kyverno-cli:v1.19.2 image and the v1.19.2 release source establish the baseline. Inspection of its Linux executable identifies Go 1.26.9; the Go vulnerability record identifies the patched compiler version. Detailed assessment and runtime observations remain private.

Required outcome

  • Build a narrowly scoped migration runtime from the exact released migration implementation, preserving the hook's command arguments, resource handling, runtime identity and permissions.
  • Use a reviewed patched compiler and compatible dependency repairs. Analyze source and compiled-binary findings; preserve all validation gates and retain evidence for affected packages proven absent.
  • Exercise the real Linux executable and released migration tests, with positive and refusal controls for its supported command boundary.
  • Publish an immutable image with source provenance, SBOM and the exact protected-workflow signature; independently verify its digest and executable before adoption.
  • Keep runtime verification policy, protected adoption, successful migration cleanup and an attributable fresh posture scan as separate acceptance in Clean up successful Kyverno migration jobs after upgrades #5491.

This is a prerequisite for #5491 and part of #2043.

Activity

  1. moved this to 📥 Backlog in 🌊 Project Boardon Oct 28, 2026
  2. self-assigned this
    on Oct 28, 2026
  3. moved this from 📥 Backlog to 🏃🏻‍♂️ In Progress in 🌊 Project Boardon Oct 28, 2026
  4. added a commit that references this issue on Oct 28, 2026
  5. devantler commented on Oct 29, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    #5544 merged and its native publisher succeeded. The signed image is ghcr.io/devantler-tech/platform-kyverno-migrate@sha256:fecf0fecdd90cfd5475868d02df325984d93600ff8813c2e1c0410aae8010a4d; independent signature verification passed for the exact main-workflow identity. Its packaged executable uses the reviewed patched compiler and the intended migration-only entrypoint.

    Blocker: executable release identity is incomplete. The published main-module version is a pseudo-version rather than the reviewed release tag, and symbols are stripped. The binary scan returns no symbol finding but retains module findings; that is not complete security acceptance. Bind and verify the real release tag and retain executable audit precision before accepting this candidate. #5491 remains blocked on verified tooling and the separate verification-policy activation; no image adoption or lifecycle cleanup has been requested here.

  6. added 2 commits that reference this issue on Oct 31, 2026
  7. devantler commented on Oct 31, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    #5626 corrects the producer, and its no-publish verify job passed. The build now stamps the executable with v1.19.2 on an unmodified source tree and keeps its symbols, and it fails unless it can read both back.

    With symbols kept, the scan runs at symbol level and reports three whole-module Go records for Kyverno v1.19.2. These exact IDs were already adjudicated in the repository allow-list, tracked on #5154; any other advisory now fails the build. Adoption stays out of scope until a signed candidate is published and accepted. The same correction applies to the held images in #5527 and #5522 once this merges.

  8. devantler commented on Oct 31, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    #5626 merged and its publisher succeeded. The signed candidate is ghcr.io/devantler-tech/platform-kyverno-migrate@sha256:ee142d6feae09ff8970286261a17ce6f6e9eb0c848a601db31c78933a189ef42. A separate signature check from the agent host passed for the exact main-workflow identity.

    In the build, the executable reports v1.19.2 from an unmodified tree, keeps its symbols, passes a symbol-level scan with only the three adjudicated records from #5154, and runs its version and migrate help commands and the refusal check.

    Still open: reading that executable back from the published image, outside the build. The agent host has no image tool for that. No image was adopted and no workload changed; adoption stays with #5491.

  9. devantler commented on Oct 31, 2026

    @devantler
    ContributorAuthor

    🤖 Generated by the Agentic Engineer

    The published image's executable is now read back outside the build, which was the last open check here. I pulled ghcr.io/devantler-tech/platform-kyverno-migrate@sha256:ee142d6feae09ff8970286261a17ce6f6e9eb0c848a601db31c78933a189ef42 from the registry and extracted the linux/amd64 executable. It was inspected, not run; the build runs it.

    Check on the published executable Result
    Compiler go1.26.10
    Release identity mod github.com/kyverno/kyverno v1.19.2, vcs.modified=false
    Immutable version string v1.19.2-migration.1-eed5caab082e10a1ee7c02ac636b66f257c4cfb3, matching the image's revision label and the merged #5626 commit its publisher built
    Symbols kept, including main.main
    Binary scan symbol level, with exactly GO-2025-3615 GO-2026-5337 GO-2026-5594, the records adjudicated in #5154
    Image configuration user 65534:65534, entrypoint /ko-app/kubectl-kyverno

    The executable's SHA-256 is e15339c16861d983f627cfdf25b5019dde7c5ec80ffa5e8b3f1bb9e2f538436f. The signature was verified in the comment above.

    This completes the runtime. No image was adopted and no workload changed: adoption, migration cleanup and the fresh posture scan stay with #5491.

  10. moved this from 🏃🏻‍♂️ In Progress to ✅ Done in 🌊 Project Boardon Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Fields

No fields configured for Security.

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions