Skip to content

fix(helm): default to the documented capability set instead of privileged - #666

Merged
pirog-spb merged 1 commit into
edgecomllc:mainfrom
martin-mat:helm-capabilities-default
Oct 13, 2026
Merged

pirog-spb merged 1 commit into
edgecomllc:mainfrom
martin-mat:helm-capabilities-default

Conversation

@martin-mat

Copy link
Copy Markdown
Contributor

Closes #665.

The chart ran the container as privileged: true by default and documented the capability set NET_ADMIN, SYS_ADMIN, SYS_RESOURCE, BPF, PERFMON as an alternative. This makes the capability set the default and privileged: true the documented fallback.

Why: the capability set is what the data plane uses (BPF and PERFMON to load and attach programs, NET_ADMIN for XDP and routes, SYS_RESOURCE for RLIMIT_MEMLOCK, SYS_ADMIN for the bpffs and debugfs mounts in the entrypoint). A privileged container is every capability, no device cgroup, unmasked /proc and /sys, and no seccomp or AppArmor profile. The reasoning in full is in #665.

Where the fallback is needed: environments that deny the entrypoint's mounts even with SYS_ADMIN, listed in the README with the remedy: an AppArmor profile that forbids mount (the runtime's default profile on Ubuntu and Debian; securityContext.appArmorProfile: {type: Unconfined} lifts it on Kubernetes 1.30+), a custom seccomp profile that blocks mount or bpf, or a runtime that rejects BPF and PERFMON on a kernel before 5.8.

Verified on a three-node kind cluster with net.ipv4.ip_forward allowed on the kubelets: the pod starts, the mounts succeed, the UPF serves on :8080 and :9090, and it comes back after scaling and after a node drain.

Trivy: the config scan flags SYS_ADMIN (AVD-KSV-0005, HIGH); the rule joins .trivyignore with its reason next to KSV-0118, whose comment no longer says "privileged". trivy config --config trivy.yaml --ignorefile .trivyignore --severity HIGH,CRITICAL . reports 0 findings; helm lint passes.

Changes: values.yaml (the default and its comment), the chart README.md, NOTES.txt, .trivyignore.

@martin-mat

Copy link
Copy Markdown
Contributor Author

The red scan-fs, scan-image and scan-result checks here come from CVE-2026-78669 in golang.org/x/net, which fails the same scans on main; this PR changes no Go code. #667 fixes it and is green, so once it's merged I'll update this branch and the scans should pass.

@pirog-spb
pirog-spb force-pushed the helm-capabilities-default branch from 257e922 to f5ffddf Compare October 12, 2026 18:35
@martin-mat
martin-mat force-pushed the helm-capabilities-default branch from f5ffddf to 69e4627 Compare October 12, 2026 18:44
…eged (edgecomllc#665)

The chart ran the container as privileged: true by default and documented
the capability set NET_ADMIN, SYS_ADMIN, SYS_RESOURCE, BPF, PERFMON as an
alternative. The capability set is what the data plane uses: BPF and
PERFMON to load and attach programs, NET_ADMIN for XDP and routes,
SYS_RESOURCE for RLIMIT_MEMLOCK, SYS_ADMIN for the bpffs and debugfs
mounts in the entrypoint. A privileged container is every capability, no
device cgroup, unmasked /proc and /sys and no seccomp or AppArmor profile.

The capability set is the default now, with privileged: true as the
documented fallback for the environments that deny the mounts anyway: an
AppArmor profile that forbids mount (the runtime's default on Ubuntu and
Debian, which appArmorProfile Unconfined lifts), a seccomp profile that
blocks mount or bpf, or a runtime that rejects BPF and PERFMON on a kernel
before 5.8. README and NOTES say so. Verified on a three-node kind cluster:
the pod starts, the mounts succeed, the UPF serves, and it survives scaling
and a node drain.

Trivy's config scan flags SYS_ADMIN (KSV-0005); the rule joins .trivyignore
with the reason, next to KSV-0118, whose comment is updated.

Signed-off-by: Martin Matyas <martin.matyas@tieto.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

helm: default to the documented capability set instead of privileged: true

2 participants