Check ID:
Provider: GCP
Service:
Severity: CRITICAL
Categories:
Resource type:
compute_firewall_ssh_access_from_the_internet_allowedProvider: GCP
Service:
computeSeverity: CRITICAL
Categories:
internet-exposedResource type:
compute.googleapis.com/FirewallWhat this check verifies
VPC firewall rules allowing Internet-sourced ingress (0.0.0.0/0) to TCP port 22 (SSH) are identified, including rules using protocol all or tcp whose ports or ranges include 22.
Risk
Exposed SSH (22) enables Internet-wide scanning, brute force and credential stuffing. Compromise can yield shell access for data exfiltration, command execution, and lateral movement, undermining confidentiality and integrity, and risking availability through abuse or lockouts.Recommendation
Restrict SSH to trusted sources; avoid0.0.0.0/0. Prefer bastion hosts or IAP TCP forwarding, or use VPN/peering. Enforce least privilege and defense in depth: limit to required CIDRs, use key-based auth, disable PasswordAuthentication, and monitor/alert on access attempts.
Remediation
- CLI
- Terraform
- Dashboard steps
References
- https://cloud.google.com/vpc/docs/using-firewalls
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/gcp/CloudVPC/unrestricted-ssh-access.html
Where this check fires
This check runs on every scheduled scan against your GCP account. Findings appear at Cloud Security → Findings filterable byCheck ID = compute_firewall_ssh_access_from_the_internet_allowed. 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 GCP checks