Skip to main content

More Info:

Ensure that the Container Network Interface files have permissions of 644 or more restrictive.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS Kubernetes

Triage and Remediation

Remediation

Manual Steps

  1. On every control plane node, identify the directory where CNI configuration files are stored (from the kubelet flag, if present):
    If this prints nothing, use the default /etc/cni/net.d (or your known CNI conf directory).
  2. On every control plane node, set permissions on all CNI configuration files in the CNI conf directory to 644:
  3. On every control plane node, set permissions on all CNI state/network files under /var/lib/cni/networks to 644:
  4. (Optional hardening) On every control plane node, restrict directory execute/search permissions so only root can traverse:
  5. Verification on every control plane node:
    Confirm that all reported permissions are 644 or a more restrictive value (e.g., 640, 600).
kubectl cannot modify file permissions on the node filesystem, including /var/lib/cni/networks or any CNI configuration directories. To remediate this finding, you must change permissions directly on every control plane node’s host OS; see the Manual Steps section for the required SSH-based commands.

Additional Reading: