Why it matters
Pod Security baseline forbids custom SELinux users and roles and any type other than the container types, because each can lift the policy that confines the container.
How to fix it
Remove `seLinuxOptions.user` and `.role`, and use a container_t type.
What TrustIvan reads
Read through the Kubernetes API with the read-only role TrustIvan's install creates.
Benchmark controls
- CIS Kubernetes Benchmark 1.9.0, control
5.7.3: A security context is applied to pods and containers. Also checked for this control: Container explicitly disables AppArmor, Container mounts /proc unmasked, Container root filesystem is writable, Workload sets an unsafe sysctl - NSA/CISA Kubernetes Hardening Guidance 1.2, control
pod.hardened-runtime: Container environments are hardened (seccomp, AppArmor, SELinux). Also checked for this control: Container explicitly disables AppArmor, Container explicitly disables seccomp, Workload sets an unsafe sysctl
Control numbers are the published ones; the titles are TrustIvan's own short descriptions. The benchmarks belong to their publishers, who do not endorse TrustIvan.
Related checks
- Container reads a Secret through environment variables
KubernetesSeverity: Low
k8s.container.secret-in-env - Container mounts /proc unmasked
KubernetesSeverity: High
k8s.container.unmasked-proc - Container has no seccomp profile
KubernetesSeverity: Low
k8s.container.seccomp-unset - Container image comes from an untrusted registry
KubernetesSeverity: Medium
k8s.container.untrusted-registry - Container explicitly disables seccomp
KubernetesSeverity: Medium
k8s.container.seccomp-unconfined - Container runs as a Windows HostProcess
KubernetesSeverity: High
k8s.container.windows-host-process
Terms: KSPM (Kubernetes security posture management), Kubernetes RBAC, NSA/CISA Kubernetes Hardening Guidance, CIS Benchmarks
All Kubernetes posture checks · The whole catalogue · How this works in TrustIvan · Documentation