Skip to main content

More Info:

Verifies each application namespace has a default-deny ingress NetworkPolicy. Without one, every pod is reachable from every other pod.

Risk Level

High

Address

Security

Compliance Standards

  • Cloudanix Best Practice

Triage and Remediation

Remediation

Manual Steps

  1. Identify non-system namespaces that lack a default-deny NetworkPolicy (run on any machine with kubectl access):
  2. For each non-compliant application namespace (replace YOUR_NAMESPACE), create a default-deny ingress NetworkPolicy manifest (run on any machine with kubectl access):
  3. Apply the default-deny ingress NetworkPolicy to the target namespace (run on any machine with kubectl access):
  4. (Optional but recommended) For each application namespace, create additional NetworkPolicies that explicitly allow only the required ingress flows for your workloads (run on any machine with kubectl access). Example skeleton to edit before applying:
  5. Repeat steps 2–4 for each non-compliant application namespace you need to protect.
  6. Verify that every non-system namespace now has at least one default-deny ingress NetworkPolicy (run on any machine with kubectl access):
    Confirm there are no lines with is_compliant=false.
Run these steps from any machine with kubectl access.
If you prefer to apply to a specific namespace only, for example production:
Verification (same automated check logic):