/
Running Containers as Root User Should be Avoided
Running Containers as Root User Should be Avoided
Description:
Containers shouldn't run as root users in your Kubernetes cluster. Running a process as the root user inside a container runs it as root on the host. If there's a compromise, an attacker has root in the container, and any misconfigurations become easier to exploit.
Solution:
1. From the Unhealthy resources tab, select the cluster. Security Center lists the pods running containers missing the 'MustRunAsNonRoot' rule.
2. For these pods, add rule: 'MustRunAsNonRoot' in a runAsUser section of the container's spec.
3. After making your changes, redeploy the pod with the updated rule.
, multiple selections available,
Related content
Privileged Containers Should be Avoided
Privileged Containers Should be Avoided
More like this
Container With Privilege Escalation Should Be Avoided
Container With Privilege Escalation Should Be Avoided
More like this
Immutable (Read-Only) Root Filesystem Should Be Enforced for Containers
Immutable (Read-Only) Root Filesystem Should Be Enforced for Containers
More like this
Least Privileged Linux Capabilities Should Be Enforced for Containers
Least Privileged Linux Capabilities Should Be Enforced for Containers
More like this
Containers Sharing Sensitive Host Namespaces Should Be Avoided
Containers Sharing Sensitive Host Namespaces Should Be Avoided
More like this
Usage of Pod Hostpath Volume Mounts Should Be Restricted to a Known List to Restrict Node Access From Compromised Containers
Usage of Pod Hostpath Volume Mounts Should Be Restricted to a Known List to Restrict Node Access From Compromised Containers
More like this