Check ID:
Provider: Kubernetes
Service:
Severity: HIGH
Categories:
Resource type:
core_minimize_admission_hostport_containersProvider: Kubernetes
Service:
coreSeverity: HIGH
Categories:
internet-exposed, trust-boundariesResource type:
PodWhat this check verifies
Kubernetes Pods are inspected for any container declaringports[].hostPort. The finding highlights workloads that bind container ports directly to the node’s network stack via HostPorts.
Risk
Using HostPorts exposes Pods on node IPs outside centralized Service/Ingress controls. Attackers can directly probe and access workloads (confidentiality/integrity). Port conflicts or saturation on nodes can disrupt traffic (availability). Network segmentation and some policies may be less effective.Recommendation
AvoidhostPort; publish services via ClusterIP with Ingress/LoadBalancer. Enforce admission policies to deny hostPort by default, permitting only a narrowly justified allowlist. Apply least privilege network rules, segment nodes, and monitor for unexpected host port bindings as defense in depth.
Remediation
- Terraform
- Dashboard steps
References
Where this check fires
This check runs on every scheduled scan against your Kubernetes account. Findings appear at Cloud Security → Findings filterable byCheck ID = core_minimize_admission_hostport_containers. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to Kubernetes checks