Ensure that your Google Cloud functions are not configured to allow unrestricted outbound network access in order to prevent security vulnerabilities and minimize cloud costs. To ensure that your function's 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 Google Cloud functions allow unrestricted outbound network access, perform the following operations:
Remediation / Resolution
To ensure that your Google Cloud function's 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
- Configure network settings
- Private networking and Cloud Run
- Static outbound IP address
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud functions list
- gcloud functions describe
- gcloud functions deploy