Container's or Pod's UID could clash with host's UID Affecting Deployment service in Kubernetes
Is your enviroment affected by this misconfiguration?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsFrameworks
CIS-Controls
CSA-CCM
- Snyk ID SNYK-CC-K8S-11
- credit Snyk Research Team
Description
UID of the container processes could clash with host's UIDs and lead to unintentional authorization bypass
How to fix?
Set securityContext.runAsUser
value to greater or equal than 10'000. SecurityContext can be set on both pod
and container
level. If both are set, then the container level takes precedence
References
- https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container
- https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod
- https://kubernetes.io/blog/2016/08/security-best-practices-kubernetes-deployment/