Skip to content

omi-agent VM Public IP Exposure & Storage Cost Leak #7326

Closed

Description

@thainguyensunya

Overview

Two related issues in the omi-agent VM lifecycle:

  1. Security — Agent VMs are assigned public internet-facing IPs, exposing port 8080 to the entire internet.
  2. Cost — Stopped VMs continue to incur persistent disk charges indefinitely; idle auto-stop is not sufficient.

Issue 1: Public IP Security Exposure

Root Cause

In desktop/Backend-Rust/src/routes/agent.rs, every agent VM is created with a public NAT IP:

"networkInterfaces": [{
    "network": "global/networks/default",
    "accessConfigs": [{
        "type": "ONE_TO_ONE_NAT",   // assigns a public internet IP
        "name": "External NAT"
    }]
}]

Both the Rust backend and the Python agent-proxy read this external IP from Firestore and connect over the public internet:

# backend/agent-proxy/main.py
vm_uri = f"ws://{vm_ip}:8080/ws?token={vm_token}"
await client.get(f"http://{vm_ip}:8080/health")
await client.post(f"http://{vm_ip}:8080/ping?token=...")

Port 8080 on every agent VM is reachable from the entire internet. The only protection is a bearer token in the WebSocket query string — no network-level isolation exists.

Impact

  • Any actor who discovers or guesses a VM IP can probe port 8080 directly.
  • The omi-agent-vm firewall tag likely permits broad ingress today.
  • If the agent service has any vulnerability, it is directly exploitable with no network barrier.

Issue 2: Stopped VM Storage Cost Leak

Root Cause

When a VM goes idle (~30 min without a keepalive ping), the VM shuts down and the GCE instance transitions to STOPPED. However, the 50 GB pd-balanced boot disk is retained because the instance still exists.

The autoDelete: true flag only deletes the disk when the instance is deleted — stopping the instance does not delete the disk.

// desktop/Backend-Rust/src/routes/agent.rs
"disks": [{
    "boot": true,
    "autoDelete": true,   // only triggers on instance *deletion*, not on stop
    "initializeParams": {
        "diskSizeGb": "50",
        "diskType": "pd-balanced"
    }
}]

A stopped pd-balanced disk costs ~$0.10/GB/month = ~$5/month per idle user VM, accumulating with no upper bound as the user base grows.

Activity

  1. added
    p2
    maintainer
    on May 18, 2026
  2. Git-on-my-level commented on Jul 23, 2026

    @Git-on-my-level
    Member

    Phase-1 progress (partial)

    Opened #10391 — supersedes stale #9261.

    In this PR (after merge + manual publish):

    • Auth-gate VM /health (stops public databaseReady leak)
    • Callers (agent-proxy + desktop) send auth on health
    • Keep public NAT / omi-agent-vm tag
    • Deferred phase-3 firewall IaC checked in but refuse-by-default (do not apply)

    Still open on #7326 after this:

    • Network isolation (peer/proxy path + public DENY / remove NAT) — blocked on PR10c + cross-VPC reachability
    • Terminated-disk / storage cost leak (~$800/mo) — out of scope for phase-1; needs a separate reaper/disk slice

    Do not close #7326 when #10391 merges — only partial.

  3. 9 remaining items

  4. undivisible commented on Jul 26, 2026

    @undivisible
    Collaborator

    #10686 moves the agent startup artifact and runtime to a versioned Python VM image. The public-NAT/network-isolation and disk-reaper work remains tracked here.

  5. Git-on-my-level commented on Sep 29, 2026

    @Git-on-my-level
    Member

    Closing: the agent VM initiative is being retired, so these VM lifecycle issues (public IP exposure, stopped-VM disk cost) no longer apply. If the VM runtime is ever revived, the security hardening described here (private networking, idle disk teardown) should be reapplied from this report.

    by AI on behalf of David — if you need David's attention urgently, please @Git-on-my-level and escalate with need human response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    maintainerp2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions