Audit finding F6 (2026-11-27-cluster-netsec-audit.md). Runners (all three Deployments): * runner container no longer runs as uid 0 — image uid 1000. The dind socket is now created 0660 root:1000 via `dockerd --group 1000`, which removes the one-shot `chmod 666` race that was the reason for running as root; a scoped fix-data-perms init container re-owns runner.ini + the actions cache. * CI *job* containers are no longer privileged (container.privileged: false) — previously every job container was privileged inside a privileged dind. Pod Security: * enforce baseline on the eight namespaces that have zero baseline violations (customer1, metabase, osint, piedmont, secops, sirius-growth, siriusdevops, cert-manager), warn+audit restricted everywhere else (repo-declared and cluster-owned), so the next privileged/hostPath/hostNetwork pod is visible. * forgejo itself stays warn/audit: the runner dind sidecar cannot lose privileged on these nodes (documented in docs/pod-security.md, with the three measured failure modes: procfs needs SYS_ADMIN, /sys/fs/cgroup is read-only for non-privileged pods, rootless dind blocked by masked /proc + no tun).
23 lines
1.2 KiB
YAML
23 lines
1.2 KiB
YAML
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: forgejo
|
|
# Pod Security: warn/audit only. `enforce: baseline` is deliberately NOT set
|
|
# yet: the three Actions runner Deployments in this namespace carry a
|
|
# docker-in-docker sidecar that cannot lose `privileged: true` on these nodes
|
|
# (see the long note in runner-amd64.yaml — procfs needs CAP_SYS_ADMIN,
|
|
# kubelet mounts /sys/fs/cgroup read-only for non-privileged pods, and
|
|
# rootless dind is blocked by the masked /proc and the absent /dev/net/tun).
|
|
# Baseline would reject those pods at admission, i.e. take CI down rather
|
|
# than harden it. The remaining fix (move the CI capsule to its own
|
|
# explicitly-privileged namespace, or exempt the runner ServiceAccount) is
|
|
# tracked on card t_2bbe34a8.
|
|
#
|
|
# warn/audit at `restricted` means every future pod creation here prints its
|
|
# violations and records them as audit annotations, so the next privileged,
|
|
# hostPath or hostNetwork pod is visible even without enforcement.
|
|
labels:
|
|
pod-security.kubernetes.io/warn: restricted
|
|
pod-security.kubernetes.io/warn-version: latest
|
|
pod-security.kubernetes.io/audit: restricted
|
|
pod-security.kubernetes.io/audit-version: latest
|