You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cloud_run_client.py:
- Add vpc_network/vpc_subnet/vpc_egress fields to CloudRunClientConfig
- Configure VPC Direct Egress via run_v2.VpcAccess on job creation
- Include VPC fields in config hash
- Upload large commands to GCS when they exceed env var limits
claude_code_client.py:
- Add vpc_network/vpc_subnet/vpc_egress fields to ClaudeCodeClientConfig
- Pass VPC config through to CloudRunClientConfig
cache_manager.py:
- Fix FileBasedCacheManager self-eviction bug
README.md:
- Document VPC egress firewall setup and configuration
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: safetytooling/infra/cloud_run/README.md
+110-1Lines changed: 110 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,12 +177,115 @@ client = ClaudeCodeClient(
177
177
-**Without this, Claude could take over your entire GCP project** - don't skip this step!
178
178
179
179
**What this doesn't limit:**
180
-
- Outbound network access (Claude could exfiltrate data to external URLs)
180
+
- Outbound network access (see Egress Firewall below)
181
181
- Anthropic API usage (Claude could use your API key for other purposes)
182
182
183
183
For the "yolo Claude" use case, the main risks are data exfiltration and API key abuse.
184
184
Containers are ephemeral (destroyed after job), so there's no persistence risk.
185
185
186
+
## Egress Firewall (Recommended)
187
+
188
+
By default, containers can make outbound requests to any host. To restrict egress (e.g., only allow `api.anthropic.com` and Google APIs), use VPC Direct Egress with Cloud NGFW firewall rules.
189
+
190
+
**How it works:** When `vpc_network` is set, all container traffic routes through a VPC where a Cloud NGFW firewall policy controls access by domain name (FQDN rules). This covers both IPv4 and IPv6.
0 commit comments