Skip to main content

More Info:

Do not generally permit containers with capabilities

Risk Level

Low

Address

Security

Compliance 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

Manual Steps

  1. 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.
  2. 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.).
  3. 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.
  4. 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.yaml and 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 Admission restricted level, Gatekeeper/Kyverno policies) to enforce “no added capabilities and drop ALL” for those namespaces.
  5. 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.
  6. 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.
Review which namespaces are expected to run security-sensitive workloads. For each namespace you care about, run:
Problem indication:
  • Under securityContext.capabilities, you see add: entries (e.g. NET_ADMIN, SYS_ADMIN, etc.).
  • No drop: ["ALL"] or equivalent is present for containers that do not truly need capabilities.
For a more targeted view, list all pods in a namespace that define capabilities:
Problem indication:
  • Any container showing non-empty add entries or missing drop:["ALL"] in a namespace where workloads should not need capabilities.
To see what policies (if any) might be constraining capabilities, inspect PodSecurityPolicy (if used) or newer controls (Pod Security Standards via labels):
Problem indication in PSP:
  • spec.requiredDropCapabilities does not include ALL.
  • spec.allowedCapabilities is broad (e.g. ["*"]) or contains powerful capabilities, and this PSP is bound (via RBAC) to namespaces that should not allow capabilities.
If using Pod Security Standards (admission via namespace labels):
Problem indication:
  • Namespaces that should be strict have labels like:
    • pod-security.kubernetes.io/enforce=privileged or baseline
    • or no pod-security.kubernetes.io/enforce label at all.
For individual workloads that may override namespace defaults, inspect their specs:
Problem indication:
  • Under each container’s securityContext.capabilities, presence of add capabilities and absence of drop: ["ALL"] in workloads that do not need them.
Verification after any policy changes (manual, via manifests or admission config):
You must then decide, based on application requirements, which capabilities (if any) are actually needed and where policies should enforce dropping all capabilities. Kubectl cannot make that decision automatically.

Additional Reading: