More Info:
Verifies no container sets securityContext.privileged=true. A privileged container can compromise the node and every other pod scheduled on it.Risk Level
CriticalAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify all privileged pods (run on any machine with kubectl access):
-
For a privileged pod that is controlled by a higher-level object (e.g., Deployment/DaemonSet/StatefulSet), edit the controller (run on any machine with kubectl access). Example for a Deployment:
In the editor, locate each affected container or initContainer and remove or change:If specific kernel capabilities are needed, add only those:
-
For a privileged pod that is not controlled by any owner (standalone Pod), edit or recreate its manifest (run on any machine with kubectl access):
Edit
/tmp/pod-POD_NAME.yamland, for each container or initContainer, remove:or replace with a minimal capabilities block as needed:Then reapply: -
If multiple workloads share the same pattern, update their source manifests or Helm charts (run where your manifests/Helm live) so that future deployments do not reintroduce:
and instead use only required
securityContext.capabilities.addentries. -
Wait for updated workloads to roll out (run on any machine with kubectl access):
-
Verify no remaining privileged containers (run on any machine with kubectl access):
Using kubectl
Using kubectl
On any machine with kubectl access:In the editor, in each affected container (and initContainer) under If specific kernel capabilities are required, replace with only the needed ones, for example:Save and exit; Kubernetes will roll out updated pods automatically.Edit
- Identify all privileged containers (for context before changing anything):
- For each affected pod that is managed by a higher-level controller (Deployment, StatefulSet, DaemonSet, Job, CronJob), edit the controller manifest so that new pods are created without
privileged: true.
spec.template.spec.containers (or initContainers), remove or change:- For pods created directly (not via a controller), export, modify, and re-apply:
/tmp/my-pod-fixed.yaml:- Remove
metadata.creationTimestamp,metadata.resourceVersion,metadata.uid,metadata.selfLink,metadata.managedFields,statussections if present. - Under each affected container/initContainer, remove
securityContext.privileged: trueor replace with a minimalsecurityContext.capabilities.addblock as required.
- Verification (same machine with kubectl access):
Automation
Automation

