Repository navigation
Commit 9b4e863
committed
fix(helm): default to the documented capability set instead of privileged (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 <[email protected]>1 parent a84239a commit 9b4e863
4 files changed
Lines changed: 31 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
29 | 30 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
231 | 235 | | |
232 | | - | |
| 236 | + | |
| 237 | + | |
233 | 238 | | |
234 | 239 | | |
235 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| |||
0 commit comments