Skip to content

airgap v0.2.0: 1-Shot Remote PR Verification & Security Boundary

Latest

Choose a tag to compare

@dhruvil-codes dhruvil-codes released this 22 Nov 13:06
· 16 commits to main since this release

airgap v0.2.0 — 1-Shot Remote PR Verification, Streamable HTTP Hosting & Hardened Security Boundary

airgap is a 100% Rust Model Context Protocol (MCP) server that puts a remote execution boundary between AI coding agents (Claude Code, Cursor, Factory Droid, Windsurf) and your workstation. Untrusted builds, test suites, and pull request checks run inside disposable GMI Cloud AgentBox v2 microVMs (gmi.sandbox.medium: 2 vCPU, 4 GiB RAM, 20 GiB root disk) while secrets are scrubbed locally before logs or untrusted text leave the host.


Highlights in v0.2.0

1-Shot Remote PR Verification (airgap_verify_pr)

  • Single-turn GitHub PR verification: Pass a PR URL (or owner/repo + PR number) with zero local file reads or manual JSON snapshotting.
  • Parallel host security gates: Runs airgap_scan_injection on PR metadata and manifest supply-chain auditing concurrently before provisioning compute.
  • Native in-sandbox shallow checkout: Clones directly inside the microVM (git fetch --depth 1), auto-detects build steps when needed, and executes tests.

Sub-25s Warm Execution via Template Reuse

  • Reuses warm GMI AgentBox deployment templates (airgap-{image}-{instance_type}) with detail-endpoint verification (GET /deployments/{slug}) and in-process mutex deduplication to avoid duplicate cold builds.
  • Cuts real PR verification runs from multi-minute cold image builds down to ~23 seconds on warm templates.

Native Streamable HTTP / SSE Hosting & Multi-Tenant BYOK (airgap serve)

  • Cloud-ready remote MCP server: Run airgap serve --host 0.0.0.0 --port 8080 to expose /mcp (Streamable HTTP / SSE) and /healthz with fail-closed constant-time Bearer auth, Host allowlisting, and RFC 6454 Origin/CORS protection.
  • Multi-tenant isolation: Supports Bring-Your-Own-Key headers (X-GMI-AgentBox-Key, X-GMI-MaaS-Key, X-GMI-API-Key, X-GitHub-Token), strict --require-byok mode, per-tenant concurrency semaphores, per-tenant airgap_configure state, and isolated BYOK template build locks.
  • Ready-to-deploy configs: Ships a multi-stage, non-root Dockerfile (compatible with Glama / NodeFlare stdio hosting by default and HTTP override via serve) plus a scale-to-zero fly.toml and hosting guide.

OpenTUI Terminal Dashboards & Universal Test Parsers

  • Box-drawn status cards (╭─, │, ├─, ╰─) with ANSI stripping, safe output wrapping, and Unicode test pass-rate meters (████████████████████ 60/60).
  • Automatically parses and aggregates multi-suite test summaries across Vitest, Jest, Node built-in (node --test), AVA, Cargo, and Pytest.

Security & Hardening

  • Pre-Checkout TOCTOU Force-Push Protection: Verifies git rev-parse pr-verify matches the audited head_sha before git checkout --detach, hardened with core.hooksPath=/dev/null, core.fsmonitor=false, submodule.recurse=false, and protocol.file.allow=never.
  • Scoped Claude Code Permissions (C-1): airgap setup adds only mcp__airgap__* to permissions.allow without modifying permissions.defaultMode (explicit --claude-bypass-permissions opt-in available). Strips leaked credentials from workspace MCP configs.
  • Fail-Closed PR Manifest Auditing (H-1, M-1): Paginates up to 300 changed files, fails closed above 300 files or 10 manifests, percent-encodes manifest path segments, fails closed on fetch/size/encoding errors, and surfaces actionable GitHub rate-limit errors.
  • Workspace .env Isolation (H-2): Untrusted repository .env files cannot override provider base URLs, container images, compute SKUs, regions, or models; process credentials (GMI_API_KEY, GH_TOKEN) always take precedence.
  • Package-Manager & Script Hardening (H-3, M-2): Enforces --ignore-scripts --ignore-pnpmfile for pnpm and YARN_ENABLE_SCRIPTS=false for Yarn, flags risky hook/config files (.pnpmfile.cjs, .yarnrc.yml, .npmrc, .cargo/config.toml, setup.py, build.rs), rejects NUL bytes in commands, and inserts -- before targeted JS test paths.
  • Immediate Cleanup on Cancelled Calls (H-4): Per-job Tokio CancellationToken drop guards immediately abort execution, delete /tasks/{id}, and release concurrency slots when an MCP caller cancels.

Quick Install

Linux / macOS:

curl -fsSL https://raw.githubusercontent.com/dhruvil-codes/airgap/main/scripts/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/dhruvil-codes/airgap/main/scripts/install.ps1 | iex

From Source (Rust 1.89+):

cargo install --git https://github.com/dhruvil-codes/airgap --locked

Self-Hosted Remote HTTP (Docker / Fly.io):

export AIRGAP_AUTH_KEY="$(openssl rand -hex 32)"
airgap serve --host 0.0.0.0 --port 8080 --require-byok --allowed-hosts mcp.airgap.dev

Verification & Checksums

  • Offline Test Suite: 100 passing unit and integration tests across stdio MCP, Streamable HTTP / multi-tenant BYOK isolation, AgentBox/MaaS mocks, scanners, setup idempotency, doctor, and installers.
  • Quality Gates: cargo fmt --check, cargo clippy --locked --all-targets -- -D warnings, Rust 1.89 MSRV, and cross-platform release builds (Linux x86_64/ARM64, macOS x86_64/ARM64, Windows x86_64/ARM64).
  • All release archives ship with verified .sha256 checksums. See CHANGELOG.md for the complete list of changes.