Ensure that your Cloud Run services are not configured to allow unrestricted outbound network access in order to prevent security vulnerabilities and minimize cloud costs. To ensure that your service outbound traffic is restricted to internal IP ranges and can't communicate with external networks or the public Internet, set the VpcConnectorEgressSettings parameter to PRIVATE_RANGES_ONLY.
Malicious actors can exploit unrestricted outbound network access to exfiltrate sensitive data, launch attacks such as Man-In-The-Middle (MITM) and Denial-of-Service (DoS) attacks, or incur unexpected charges. Limiting network access to only necessary resources helps mitigate these risks.
Audit
To determine if your Cloud Run services allow unrestricted outbound network access, perform the following operations:
Remediation / Resolution
To ensure that your Cloud Run service outbound traffic is restricted to internal IP ranges and can't communicate with external networks or the public Internet, perform the following operations:
References
- Google Cloud Platform (GCP) Documentation
- Private networking and Cloud Run
- Static outbound IP address
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud run services list
- gcloud run services describe
- gcloud run services update