More Info:
Verifies every container drops ALL capabilities and adds back only what it needs. Excess capabilities expand the attack surface of a compromised container.Risk Level
HighAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify noncompliant pods and their owning workloads (run on any machine with kubectl access):
-
For each listed pod, edit the owning workload manifest (Deployment, StatefulSet, DaemonSet, Job, CronJob, or the Pod itself) to drop all capabilities (run on any machine with kubectl access). Example for a Deployment:
Under each
spec.template.spec.containers[](andinitContainers[]if present), add or modify: -
If the pod is not controlled by a higher-level workload (no ownerReferences), edit the Pod spec directly and reapply it as a new manifest (pods cannot be updated in place for some fields). Export the pod spec, clean it, and save as a manifest (run on any machine with kubectl access):
Edit
/tmp/<pod-name>.yaml:- Remove
status:section. - Remove fields under
metadata:such asuid,resourceVersion,managedFields,creationTimestamp, andownerReferences. - Under each container and initContainer, ensure:
- Remove
-
Apply the updated standalone Pod manifest (run on any machine with kubectl access):
-
Confirm updated workloads have rolled out successfully (run on any machine with kubectl access), for example for a Deployment:
-
Verify compliance across the cluster (run on any machine with kubectl access):
Ensure that the output is either a single line
is_compliant=trueor that every listed container hasis_compliant=true.
Using kubectl
Using kubectl
On any machine with kubectl access:
-
Identify the non‑compliant Pod and its controller
If the Pod is owned by a controller (Deployment, StatefulSet, DaemonSet, Job, CronJob, etc.), you must edit the controller, not the Pod, or the change will be overwritten.
-
Edit the Pod spec (ephemeral / stand‑alone Pod only)
For a Pod not managed by a controller:Under each container (and initContainer if present), add: -
Edit the owning controller (preferred, declarative)
Deployment example:
Add the same block under every container and initContainer:For other controllers, replace
deploymentwithstatefulset,daemonset,job, orcronjoband edit.spec.template.specsimilarly. If you manage manifests declaratively, update your YAML files with the samesecurityContext.capabilities.drop: ["ALL"]blocks and apply: -
Verification
Re‑run the benchmark audit command from any machine with kubectl access:
Confirm that all listed containers now show
capabilitiesDrop=ALLandis_compliant=true(or that the output is justis_compliant=true).
Automation
Automation

