High Terraform Network exposure

Terraform opens a security group to 0.0.0.0/0

An aws_security_group (or equivalent) with an ingress block of cidr_blocks = ["0.0.0.0/0"] opens that port to the whole internet the moment it's applied. The same pattern exists for GCP source_ranges and Azure rules.

Why it matters

Infrastructure-as-code makes one risky line reproducible across every environment — the exposure lands everywhere the module is used.

Catching it at the pull request, before apply, is far cheaper than finding the open port in production.

How to check for it

How to fix it

SkyShield checks this automatically

Connect your AWS, Cloudflare, GitHub, GitLab, Hetzner or DigitalOcean account read-only and SkyShield flags this across every account and region, with the fix in plain words — alongside the agent that watches your servers. Start free.

FAQ

Is 0.0.0.0/0 ever fine in Terraform?
Only for a genuinely public port (80/443) behind a load balancer. For SSH, RDP and databases, scope it to known sources.