Skip to main content

More Info:

Added Linux capabilities expand a containers privileges beyond the default set. Drop all capabilities where applications do not need them.

Risk Level

High

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. Identify pods using capabilities (any machine with kubectl access)
    Also include init containers:
  2. Map capabilities to owning teams and justify need
    For each pod/container from step 1, capture its manifest and share with the owning team/application owner:
    Ask them to confirm which listed capabilities are strictly required and whether the container can run with ALL dropped.
  3. Decide namespace policy: which namespaces can/should forbid capabilities
    Using the information from step 2, classify namespaces:
    • Namespaces where no containers need extra capabilities → candidates to enforce “drop all capabilities”.
    • Namespaces with a few exceptional workloads → decide whether to:
      • Move those workloads to a separate namespace, or
      • Exempt the namespace for now and document the risk.
  4. Design the admission policy to enforce dropping capabilities
    Decide on your enforcement mechanism (example options to prepare for implementation):
    • ValidatingAdmissionPolicy / ValidatingAdmissionWebhook that rejects pods/containers unless:
      • securityContext.capabilities.drop contains "ALL", and
      • securityContext.capabilities.add is unset/empty.
    • Limit the policy’s namespaceSelector or similar scoping so it only applies to namespaces identified in step 3.
  5. Update application manifests to be compliant before enforcing
    For each workload in namespaces you plan to protect, adjust the manifests (local Git/IaC repo, not directly in-cluster) so containers explicitly drop all capabilities, for example:
    Where teams have justified specific capabilities as required, either:
    • Keep those workloads out of the strict namespaces, or
    • Document and prepare explicit policy exceptions in the admission policy design.
  6. Verify resulting posture after policy deployment
    After implementing your chosen admission policy (outside the scope of this manual review), confirm:
    • New pods can only be created in protected namespaces if they drop all capabilities and do not add any.
    • Periodically re-run:
      Review any remaining capabilities and update namespace classification and policies as needed.
Problem indication: Any pod listed here has at least one container or initContainer with capabilities defined; these need review.
Problem indication: Any non-empty CAPS field (e.g. map[add:[NET_ADMIN] drop:[ALL]]) means the pod is explicitly manipulating capabilities and must be reviewed.
What to look for as potential problems in the YAML:
  • securityContext.capabilities.add present and non-empty, for example:
    • add: ["NET_ADMIN"]
    • add: ["SYS_ADMIN", "NET_RAW"]
  • securityContext.capabilities.drop missing, empty, or does not include ALL.
  • Containers with no drop: ["ALL"] in namespaces where applications do not require Linux capabilities.
These locations should be checked:
  • .spec.containers[*].securityContext.capabilities
  • .spec.initContainers[*].securityContext.capabilities
  • .spec.ephemeralContainers[*].securityContext.capabilities (if used)

Problem indication: Any line showing a non-empty add list (e.g. [NET_ADMIN], [SYS_ADMIN NET_RAW]) is a potential risk and should be justified or removed.
Verification indication: For namespaces where you decided all applications can run without Linux capabilities, the CAPS column should be empty or show only drop:[ALL] and no add entries.
How to interpret problematic output
  • Any row in Pods with explicitly ADDED capabilities (potentially high risk) indicates a container that is explicitly requesting extra Linux capabilities. These should be reviewed and justified; in namespaces that should not use capabilities, they are a problem.
  • Any row in Pods with capabilities defined but NOT dropping ALL (review) shows containers that configure capabilities but do not include drop: ["ALL"]. In namespaces that should drop all capabilities, these are non-compliant and should be redesigned or restricted by admission policy.