Kubernetes check
Namespace has no NetworkPolicy
Trigger condition
A successful networking.k8s.io/v1 NetworkPolicy list confirms zero NetworkPolicy objects exist in an audited namespace. Every policy object counts toward presence, including a maximally permissive one (e.g. podSelector: {}, policyTypes: [Ingress], ingress: [{}] -- a single empty rule matching every source and port, the canonical 'allow all ingress' policy; an empty podSelector selects every Pod in the namespace, while an empty rules list for a direction the policy applies to instead allows no traffic at all for that direction); a policy in one namespace never credits another. Applies identically to empty and system namespaces within the audit scope. If listing NetworkPolicies returns 403, this check is skipped entirely for that audit run rather than flagging every audited namespace as unprotected -- a successfully collected empty list is treated as a genuine 'no NetworkPolicy exists' and evaluated normally.
Evidence
States the namespace's name and that it has no NetworkPolicy objects.
Impact
This finding measures NetworkPolicy presence only -- it does not evaluate whether any configured policy is appropriately restrictive, or whether live traffic is actually isolated. Kubernetes NetworkPolicy isolation is direction-specific (ingress and egress are each opt-in independently) and takes effect only when the cluster's network plugin supports enforcement; without one, even a well-configured policy has no actual effect.
Recommendation
Confirm the cluster's network plugin supports NetworkPolicy enforcement, identify this namespace's actual required traffic flows, and prepare explicit allowances for that traffic -- including access to the cluster DNS service where selected Pods rely on it, since a default-deny egress policy can otherwise block DNS resolution for them. Roll out the default-deny baseline in stages, validating connectivity after each stage, rather than all at once. See the Kubernetes NetworkPolicy documentation: https://kubernetes.io/docs/concepts/services-networking/network-policies/
Important limitations
This check only evaluates whether at least one NetworkPolicy object exists in a namespace -- it never inspects any policy's own podSelector, ingress/egress rules, or policy types, so a policy that does not actually isolate any relevant traffic still satisfies this check. It does not establish that the cluster's network plugin enforces NetworkPolicy at all. If NetworkPolicy data could not be collected at all (e.g. a 403), this check is skipped entirely for that audit run rather than reporting every audited namespace as unprotected.