Verify a pull request
Short answer: Pass a GitHub pull request URL or owner/repo#number to your agent and ask it to verify the PR with airgap. One call to airgap_verify_pr scans the PR text for prompt injection, audits changed dependency manifests, clones the PR head at its pinned commit SHA inside a fresh Linux microVM, runs the build and tests, scrubs secrets from the logs, and destroys the VM.
use airgap to verify acme/api#142verify https://github.com/acme/api/pull/142 with airgap and run cargo testWhy one call beats manual chaining
Without airgap_verify_pr, verifying an external PR on your laptop means checking out an untrusted branch, running npm install or cargo test on your host, and letting PR text sit in your agent's context unscanned. airgap_verify_pr runs all five gates in a single MCP turn with zero local file reads and zero local builds:
- Prompt-injection scan: Redacts the PR title and body, then sends them to GMI MaaS before any compute starts. Malicious instructions stop the run immediately.
- Supply-chain audit: Inspects changed
package.json,requirements.txt, andCargo.tomlfiles locally for lifecycle hooks and alternate package sources. - SHA-pinned remote clone: Launches a disposable GMI AgentBox v2 microVM and shallow-clones the exact PR head commit SHA (so the branch cannot change mid-run).
GITHUB_TOKEN, if configured, stays on your host and is never forwarded as a sandbox environment variable. - Build and test execution: Auto-detects the runtime image (Rust, Node, or Python), builds if needed, runs the test suite, and deletes the sandbox as soon as execution ends.
- Redacted verdict and receipt: Scrubs secrets from stdout and stderr, parses the test summary, and returns
VERIFIEDorFAILEDalongside an unsigned SHA-256 receipt.
Parameters and defaults
| Parameter | Default | What it controls |
|---|---|---|
pr_url | Required unless repo + pr_number set | Full GitHub PR URL, e.g. https://github.com/acme/api/pull/142 |
repo / pr_number | Optional alternative to pr_url | Repository as owner/repo and positive integer PR number |
test_command | Auto-detected | Override the test command run inside the checked-out PR |
build_command / build_first | Auto-detected / false | Run an explicit build step before tests |
image | Auto-detected | Container image override (Rust, Node, or Python by default) |
timeout_secs | max(runtime timeout, 300) | Execution budget from 1 to 1800 seconds |
fail_on_supply_risk | true | Block execution when manifest audit flags high-risk changes |
allow_install_scripts | false | Keep package-manager lifecycle hooks disabled unless explicitly opted in |
Direct MCP tool call
{
"tool": "airgap_verify_pr",
"arguments": {
"pr_url": "https://github.com/acme/api/pull/142",
"fail_on_supply_risk": true,
"allow_install_scripts": false
}
}What VERIFIED actually means
A PR is marked VERIFIED only when the command exits 0, logs are untruncated, no Killed or SIGKILL marker appears, a recognized test summary is parsed, at least one test passes, and zero tests fail. A run with zero tests is never marked verified.
Credentials and caveats: airgap_verify_pr requires both a compute-scoped GMI_AGENTBOX_API_KEY and an inference GMI_MAAS_API_KEY (plus optional GITHUB_TOKEN for private repos or higher GitHub rate limits). Remember that hostile tests can forge stdout or exit codes, and receipts are unsigned SHA-256 integrity records rather than provider-signed attestations. See Blocking malicious install scripts and the full tool reference.