Summary
Sandbox pods are granted SYS_ADMIN, NET_ADMIN, SYS_PTRACE, and SYSLOG capabilities at crates/openshell-server/src/sandbox/mod.rs (lines 918–928), whilst running as runAsUser: 0 (line 742).
SYS_ADMIN is the most permissive Linux capability — it enables mount, umount, pivot_root, clone with namespace flags, BPF loading, and more. Combined with running as root, this is a significant container escape vector.
SYS_PTRACE allows attaching to any process in the same PID namespace, reading their memory, and injecting code.
Impact
- Severity: High
- A compromised sandbox supervisor process has root + SYS_ADMIN inside the container, enabling kernel-level operations that could lead to container escape.
Proposed Fix
- Move network namespace setup to a short-lived init container or privileged sidecar with minimal scope
- Drop capabilities after setup is complete (the supervisor only needs them during initialisation)
- Add
securityContext.allowPrivilegeEscalation: false to the sandbox pod spec
- Add a pod-level seccomp profile
- Investigate whether user namespaces could map root inside the container to an unprivileged host user
The gateway pod already demonstrates good practice: runAsNonRoot: true, runAsUser: 1000, allowPrivilegeEscalation: false, drops ALL capabilities (deploy/helm/openshell/values.yaml:28-34).
Summary
Sandbox pods are granted
SYS_ADMIN,NET_ADMIN,SYS_PTRACE, andSYSLOGcapabilities atcrates/openshell-server/src/sandbox/mod.rs(lines 918–928), whilst running asrunAsUser: 0(line 742).SYS_ADMINis the most permissive Linux capability — it enablesmount,umount,pivot_root,clonewith namespace flags, BPF loading, and more. Combined with running as root, this is a significant container escape vector.SYS_PTRACEallows attaching to any process in the same PID namespace, reading their memory, and injecting code.Impact
Proposed Fix
securityContext.allowPrivilegeEscalation: falseto the sandbox pod specThe gateway pod already demonstrates good practice:
runAsNonRoot: true,runAsUser: 1000,allowPrivilegeEscalation: false, drops ALL capabilities (deploy/helm/openshell/values.yaml:28-34).