Skip to main content

More Info:

Verifies that Container Network Interface configuration files have permissions of 600 or more restrictive to prevent tampering with pod networking.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, identify the CNI config directory used by kubelet (fallbacks to /etc/cni/net.d if not set):
  2. On every control plane node, set permissions on all CNI config files in the directory (replace /etc/cni/net.d if your path is different):
  3. On every control plane node, ensure ownership is appropriate (commonly root:root; adjust if your environment requires different ownership):
  4. On every control plane node, if you are using per-network state under /var/lib/cni/networks, optionally restrict those files as well (if present):
  5. On every control plane node, verify that all CNI configuration and network state files now have permissions 600:
    Confirm the output shows only permissions=600.
kubectl cannot modify Container Network Interface file permissions because they are host-level files under /etc/cni/net.d (and other CNI paths) on each control plane node. To remediate this finding, adjust permissions directly on those nodes as described in the Manual Steps section.
Run this script on every control plane node (directly or via your automation tool).