ci: seal the official Kyverno CLI 1.17.1 over the current runner image (codewire#3821) #34

Merged
noel merged 2 commits from ci/kyverno-leaf into main 2026-11-12 20:05:43 +00:00
Owner

Seals the official Kyverno CLI 1.17.1 over the current runner image (v9, sha256:6aec996c…) in one layer, for Codewire's Policy drift job (codewire#3821). See README.system-hz-kyverno.md.

Why. Policy drift runs on the untrusted small pool. That pool's egress has no GitHub, so the job's download of the release fails on every pull request (codewire runs 45208 and 45211). Widening that egress, or moving the OIDC-capable job to the large pool, was ruled out. Harbor can't serve the file to a credential-free job either. So the CLI goes into the image, as supplychain did.

What.

  • /usr/local/libexec/kyverno-1.17.1: root-owned, 0755, on no PATH. No other job sees a change, and a later version goes beside it.
  • The release's Apache-2.0 LICENSE goes under /usr/local/share/licenses/kyverno-1.17.1/.
  • PATH and every other parent byte are unchanged.

Input. kyverno-inputs.json lists the one archive. Its SHA-256 d0c0f52e…b1d7a3 matches the release's checksums.txt (e3e2c5fc…) and GitHub's asset digest. cosign verify-blob of its keyless signature passes, with the certificate SAN set to https://github.com/kyverno/kyverno/.github/workflows/release.yaml@refs/tags/v1.17.1.

Dry run with infra#2496's forgejo-runner-image (it adds the kyverno_inputs origin), at this branch's head:

  • rc=0, 11 of 11 installed checks;
  • credentials_read: false, registry_written: false;
  • the result is the base plus one layer, manifest sha256:81a17d48… (this head's build only; the merged commit gets its own build);
  • the leaf layer is 52,590,505 bytes compressed. The archive grows from 3,030,533,632 bytes (v9) to 3,083,128,832 (+1.7%), and the unpacked image by about 252 MB.

The installed checks are:

  • the binary's and license's bytes;
  • that kyverno is off PATH, and kyverno version;
  • an offline kyverno apply that admits a compliant Pod (exit 0) and refuses a non-compliant one (exit 1), in a container with no network;
  • supplychain 83fffe1 selection and node --version;
  • Codewire's runner assertion from main;
  • the inherited scanner, Node.js, provider and database bytes.

After merge:

  1. Rebuild from the merged commit, then promote under the standing image approval (noel/infra#2452).
  2. The infra adoption PR, after infra#2496.
  3. ci-runners' recycle.
  4. Codewire's workflow calls the sealed path.
Seals the official Kyverno CLI 1.17.1 over the current runner image (v9, `sha256:6aec996c…`) in one layer, for Codewire's Policy drift job (codewire#3821). See `README.system-hz-kyverno.md`. **Why.** Policy drift runs on the untrusted small pool. That pool's egress has no GitHub, so the job's download of the release fails on every pull request (codewire runs 45208 and 45211). Widening that egress, or moving the OIDC-capable job to the large pool, was ruled out. Harbor can't serve the file to a credential-free job either. So the CLI goes into the image, as supplychain did. **What.** - `/usr/local/libexec/kyverno-1.17.1`: root-owned, `0755`, on no `PATH`. No other job sees a change, and a later version goes beside it. - The release's Apache-2.0 LICENSE goes under `/usr/local/share/licenses/kyverno-1.17.1/`. - `PATH` and every other parent byte are unchanged. **Input.** `kyverno-inputs.json` lists the one archive. Its SHA-256 `d0c0f52e…b1d7a3` matches the release's `checksums.txt` (`e3e2c5fc…`) and GitHub's asset digest. `cosign verify-blob` of its keyless signature passes, with the certificate SAN set to `https://github.com/kyverno/kyverno/.github/workflows/release.yaml@refs/tags/v1.17.1`. **Dry run** with infra#2496's `forgejo-runner-image` (it adds the `kyverno_inputs` origin), at this branch's head: - rc=0, 11 of 11 installed checks; - `credentials_read: false`, `registry_written: false`; - the result is the base plus one layer, manifest `sha256:81a17d48…` (this head's build only; the merged commit gets its own build); - the leaf layer is 52,590,505 bytes compressed. The archive grows from 3,030,533,632 bytes (v9) to 3,083,128,832 (+1.7%), and the unpacked image by about 252 MB. The installed checks are: - the binary's and license's bytes; - that `kyverno` is off `PATH`, and `kyverno version`; - an offline `kyverno apply` that admits a compliant Pod (exit 0) and refuses a non-compliant one (exit 1), in a container with no network; - supplychain 83fffe1 selection and `node --version`; - Codewire's runner assertion from main; - the inherited scanner, Node.js, provider and database bytes. **After merge:** 1. Rebuild from the merged commit, then `promote` under the standing image approval (noel/infra#2452). 2. The infra adoption PR, after infra#2496. 3. ci-runners' recycle. 4. Codewire's workflow calls the sealed path.
ci: seal the official Kyverno CLI 1.17.1 over the current runner image (codewire#3821)
All checks were successful
Supply-chain scan / Supply-chain scan (pull_request_target) Successful in 25s
bc1371cdce
Author
Owner

Reviewed. One change before merge, otherwise approve.

Change: the diff commits __pycache__/verify-installed-system-hz-kyverno.cpython-314.pyc, a bytecode artifact of running the verifier locally. Please drop it. Add __pycache__/ to a .gitignore (the repository has none), or run the verifier with python3 -B.

The rest looks right:

  • The leaf builds with --network=none and a tmpfs /tmp over the v9 digest.
  • It checks the archive's SHA-256 against the pinned value, then the exact tar members (LICENSE kyverno), then the extracted binary's and license's own SHA-256s.
  • It installs root-owned 0755, off PATH, at a versioned path, and asserts nothing named kyverno is on PATH before or after.
  • It re-asserts the inherited Node.js, jq and both supplychain selections.
  • The verify script refuses Docker-socket, service-account-token and registry-auth mounts, and bounds every command.
  • The measured +52.6 MB compressed (+1.7% of the archive) is a fair cost.

After merge and promotion I'll recycle onto v10 with the 05:00Z nightly recycle, unless the orchestrator wants it sooner, and time one pool's preload and boot against v9 for the adoption record.

Reviewed. One change before merge, otherwise approve. **Change:** the diff commits `__pycache__/verify-installed-system-hz-kyverno.cpython-314.pyc`, a bytecode artifact of running the verifier locally. Please drop it. Add `__pycache__/` to a `.gitignore` (the repository has none), or run the verifier with `python3 -B`. **The rest looks right:** - The leaf builds with `--network=none` and a tmpfs `/tmp` over the v9 digest. - It checks the archive's SHA-256 against the pinned value, then the exact tar members (`LICENSE kyverno`), then the extracted binary's and license's own SHA-256s. - It installs root-owned `0755`, off `PATH`, at a versioned path, and asserts nothing named `kyverno` is on `PATH` before or after. - It re-asserts the inherited Node.js, jq and both supplychain selections. - The verify script refuses Docker-socket, service-account-token and registry-auth mounts, and bounds every command. - The measured +52.6 MB compressed (+1.7% of the archive) is a fair cost. After merge and promotion I'll recycle onto v10 with the 05:00Z nightly recycle, unless the orchestrator wants it sooner, and time one pool's preload and boot against v9 for the adoption record.
ci: drop the verifier's compiled cache committed by mistake (codewire#3821)
All checks were successful
Supply-chain scan / Supply-chain scan (pull_request_target) Successful in 33s
9f3462fa7c
noel merged commit 57ee101019 into main 2026-11-12 20:05:43 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
noel/act-node-docker!34
No description provided.