secops(f6): de-privilege CI job containers + runner uid, add Pod Security labels #54
Loading…
Reference in a new issue
No description provided.
Delete branch "secops/f6-runner-deprivilege-psa"
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?
Finding F6 — CI runners, Pod Security
Implements what is technically possible on these nodes; the parts that are not
possible are documented with measured evidence in
docs/pod-security.md.Runners (all three Deployments)
forced root is gone:
dockerd --group 1000creates/var/run/docker.sockas0660 root:1000, and a scopedfix-data-permsinit container re-ownsrunner.ini+/data/cache.container.privileged: falsein the runner ConfigMap). Before: a privileged job container inside a
privileged dind.
privileged: true— see below — with the reasonrecorded inline in every manifest.
Pod Security
enforce: baseline(+ warn/auditrestricted) on the eight namespaces thathad zero baseline violations in a live read (2026-11-27):
customer1,metabase,osint,piedmont,secops,sirius-growth,siriusdevops,cert-manager.warn+audit: restrictedon every other namespace (repo-declared, pluskube-system,kube-public,kube-node-lease,default,cnpg-system,cilium-secrets,logging,flux-systemapplied out-of-band).Why
forgejois notenforce: baselineyetThe dind sidecar cannot lose
privilegedhere. Measured, three independent wall:privileged: false+capabilities.add: [SYS_ADMIN, NET_ADMIN]: dockerd runsand pulls, but no container starts —
mkdir /sys/fs/cgroup/docker: read-only file system(kubelet mounts the cgroup fs read-only for non-privileged pods).docker:27-dind-rootless): daemon up, every container dies onerror mounting "proc" ... operation not permitted— a nested userns may onlymount procfs if a fully-visible procfs exists, and kubelet masks /proc paths.
procMount: Unmasked(the fix for 2) requireshostUsers: false, wherenewuidmapcannot write a subuid map and/dev/net/tuncannot be created.Enforcing baseline on
forgejotoday rejects the runner pods at admission =Actions down. Options (namespace split / PSA SA exemption / sysbox|gVisor) are a
design decision, tracked on the card.
Verification
kubectl kustomize apps/homebuilds (147 objects).