More Info:
Do not generally permit containers with capabilitiesRisk Level
LowAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CIS GKE
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- DPDPA
- Digital Operational Resilience Act (EU)
- Essential 8
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List all pods and identify capability usage (any machine with kubectl access)
Save the output. It shows which containers explicitly add or drop capabilities by namespace.
-
Identify candidate namespaces that do not require Linux capabilities (any machine with kubectl access)
- From step 1 output, list namespaces that:
- Have no entries at all (no pods declaring capabilities), or
- Only have containers that already drop all capabilities (e.g.
drop=["ALL"]) and do not add any.
- For each such namespace, review the workloads and confirm with application owners that they do not need extra Linux capabilities (no low‑level networking, raw sockets, mounting filesystems, etc.).
- From step 1 output, list namespaces that:
-
Confirm no implicit capability dependencies (any machine with kubectl access)
For each candidate namespace from step 2, inspect the deployments/statefulsets/daemonsets to ensure they are not relying on implicit default capabilities:If any application is uncertain, treat it as requiring capabilities and exclude the namespace from enforcement until tested. -
Design and define a Pod Security Policy (or equivalent) that forbids capabilities (any machine with kubectl access)
If your cluster still supports PodSecurityPolicy, create a PSP manifest that requires all capabilities to be dropped and forbids adding any; for example, save as/tmp/psp-drop-all-capabilities.yamland edit appropriately:Apply it and create appropriate RBAC bindings for the service accounts in candidate namespaces:If PSP is not available, use your platform’s equivalent (e.g., Pod Security Admissionrestrictedlevel, Gatekeeper/Kyverno policies) to enforce “no added capabilities and drop ALL” for those namespaces. -
Test workload behavior under the new restriction (any machine with kubectl access)
- Roll out or restart the workloads in each enforced namespace:
- Monitor for failures indicating missing capabilities:
- If any application fails due to capability restrictions, either:
- Adjust policy narrowly to allow only the minimal required capability for that namespace, or
- Remove that namespace from enforcement and document the justified requirement.
- Roll out or restart the workloads in each enforced namespace:
-
Re-verify capability usage to confirm minimization (any machine with kubectl access)
Re-run the evidence command from step 1:Confirm that in the namespaces where you decided capabilities are not required, no containers are admitted with added capabilities and that policies enforce dropping all capabilities. Document any exceptions and their justification.
Using kubectl
Using kubectl
- Under
securityContext.capabilities, you seeadd:entries (e.g.NET_ADMIN,SYS_ADMIN, etc.). - No
drop: ["ALL"]or equivalent is present for containers that do not truly need capabilities.
- Any container showing non-empty
addentries or missingdrop:["ALL"]in a namespace where workloads should not need capabilities.
spec.requiredDropCapabilitiesdoes not includeALL.spec.allowedCapabilitiesis broad (e.g.["*"]) or contains powerful capabilities, and this PSP is bound (via RBAC) to namespaces that should not allow capabilities.
- Namespaces that should be strict have labels like:
pod-security.kubernetes.io/enforce=privilegedorbaseline- or no
pod-security.kubernetes.io/enforcelabel at all.
- Under each container’s
securityContext.capabilities, presence ofaddcapabilities and absence ofdrop: ["ALL"]in workloads that do not need them.
Automation
Automation

