More Info:
Verifies each application namespace has a default-deny ingress NetworkPolicy. Without one, every pod is reachable from every other pod.Risk Level
HighAddress
SecurityCompliance Standards
- Cloudanix Best Practice
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
List non-system namespaces that are not compliant (run on any machine with kubectl access):
-
For each non-compliant application namespace (replace
APPLICATION_NAMESPACEwith the actual name), create a default-deny ingress NetworkPolicy manifest file (run on any machine with kubectl access): -
Apply the default-deny NetworkPolicy to that namespace (run on any machine with kubectl access):
-
(Optional but recommended) For each application, create additional NetworkPolicies in its namespace to allow only required ingress flows (run on any machine with kubectl access). For example, create a file:
- Repeat steps 2–4 for each non-system, non-compliant namespace reported in step 1.
-
Verify that all non-system namespaces now have at least one default-deny ingress NetworkPolicy (run on any machine with kubectl access):
Confirm that there are no lines with
is_compliant=false.
Using kubectl
Using kubectl
On any machine with kubectl access:Assume this prints (example):Apply it:Repeat for each namespace that needs the policy, changing only the
- Identify non-compliant namespaces (replace the jq path if needed, but this is the same logic as the audit):
- Create a default-deny ingress NetworkPolicy manifest for each non-compliant namespace.
team-a:namespace: field and filename:- Verification (same logic as the audit, run from any machine with kubectl):
Automation
Automation

