fix(agent): provision agent VMs without public NAT#9261
Draft
Git-on-my-level wants to merge 3 commits into
Draft
fix(agent): provision agent VMs without public NAT#9261Git-on-my-level wants to merge 3 commits into
Git-on-my-level wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5ad7e46dc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
4 issues found across 6 files
Confidence score: 2/5
- In
desktop/macos/Backend-Rust/src/routes/agent.rs, removingaccessConfigsmeanscreate_gce_vmcan no longer produce an external IP while itsResult<String>contract and downstream consumers still treat it as reachable over public network; merging as-is is likely to break agent provisioning/reachability flows — either restore external IP assignment or change the return contract and all callers before merging. AGENTS.mddescribesagent-vm-firewallas denying only publictcp:8080, butbackend/charts/agent-vm-firewall/firewall-rule.yamlusessourceRanges: [0.0.0.0/0]on a DENY ingress rule, which effectively blocks that port from everywhere and can cut off intended internal access paths — align the rule or documentation to the intended policy and verify expected traffic still works.backend/scripts/agent-vm-reachability-check.shrelies on Pythonassertfor firewall contract checks, andbackend/scripts/apply-agent-vm-firewall.shvalidates onlyDENYwhile not enforcing full contract fields (like ingress/public source ranges), so CI/deploy validation can silently pass unsafe or incorrect rules in some environments — replaceassertwith explicit runtime checks and enforce all security-critical fields before merging.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Remove ONE_TO_ONE_NAT accessConfigs from GCE insert payload so new agent VMs are private-network only. Add Rust contract test guarding the provision JSON shape. Verification: cd desktop/macos/Backend-Rust && cargo test provision Related #7326 Co-authored-by: Cursor <cursoragent@cursor.com>
Add GCP firewall IaC for tag omi-agent-vm that denies public tcp:8080, with apply/reachability scripts and hermetic contract tests. Extend the Rust provision JSON contract to assert omi-agent-vm tagging and no public IP fields in the insert payload. Verification: cd desktop/macos/Backend-Rust && cargo test provision cd backend && python3 -m pytest tests/unit/test_agent_vm_firewall_contract.py -v backend/scripts/agent-vm-reachability-check.sh Closes #7326 Related #6611 Co-authored-by: Cursor <cursoragent@cursor.com>
f5ad7e4 to
d77624e
Compare
Collaborator
Author
|
Monitor follow-up for PR #9261:
Verification passed:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge order & dependencies
Summary
accessConfigs/ONE_TO_ONE_NATfrom GCE agent VM provisioning inagent.rs.omi-agent-vmand Rust contract test ensuring provision JSON has no public NAT.Related: #6611
Optional follow-up (PR10c): route desktop upload/sync through agent-proxy in a separate PR if scope grows; not required for this change.
Test plan
Merge with a regular merge (no squash).
Closes #7326
Made with Cursor