test: run every job on default without root, add a security check and BuildKit #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "nonroot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Kubernetes executor runs no job as root (ADR 0018). The runner change is https://gitlab.com/digilab.overheid.nl/platform/flux/core/-/merge_requests/1180. Merge this pull request after that change is on digikluster.
What changes
00-security-context.ymlis new. It checks the uid, the capabilities, no-new-privileges, seccomp, the service account token and the network path to the Kubernetes API.05aand05b(kaniko) move to the labelvmand start by hand. kaniko needs uid 0.05d-image-buildkit.ymlis new. It tries rootless BuildKit instead of kaniko. The label is an input.04and06setPGDATA: /tmp/pgdata. The defaultPGDATAbelongs to uid 999.07,11and12install no packages. They use images that have the tools, and put crane in/tmp/bin.default.Results on the current runner (root), 2026-10-26
00.00fails withuid=0(root), as expected.05dondefaultfails:max_user_namespaces needs to be set to non-zero, thenfork/exec /proc/self/exe: operation not permitted.Run all workflows on this branch again after the runner change.
00must then pass.Results after platform/flux/core!1180, 2026-10-26, on the organisation runner
digikluster-k8s-forgejo:00: passes.uid=1000 gid=1000,CapPrm,CapEffandCapBndare 0,NoNewPrivs: 1,Seccomp: 2, no token, the Kubernetes API and169.254.169.254are blocked.01to04,05c,06to12: all pass. The PostgreSQL service of06starts as uid 1000 withPGDATA: /tmp/pgdata.05dondefault: fails as expected.user.max_user_namespaces: 0, thenfork/exec /proc/self/exe: operation not permitted.This pull request can merge.