Why it matters
A container's user is fixed by its spec; switching user at runtime is an attempt to gain privileges the workload was not given.
How to fix it
Remove sudo and su from the runtime image and set allowPrivilegeEscalation: false. If it was not expected, investigate the workload.
What TrustIvan reads
The Falco rule "TrustIvan Sudo or su run in container" (MITRE ATT&CK privilege_escalation, T1548.003), installed on every node by the trustivan-runtime Helm chart. Only where the chart is installed. Every rule validated with falco -V and fired against Falco 0.45.2 under Docker; the chart installed and three rules fired in a single-node k3d cluster.
References
Related checks
- Setuid or setgid bit set in a container
Kubernetes runtimeSeverity: High
runtime.setuid-bit
Terms: Runtime threat detection, KSPM (Kubernetes security posture management), Code to cloud
All runtime detection checks · The whole catalogue · How this works in TrustIvan · Documentation