---
title: "Verify a pull request · airgap"
description: "Verify a GitHub pull request with one airgap_verify_pr call: injection scan, manifest audit, SHA-pinned clone, build and tests in a disposable microVM."
url: https://www.useairgap.dev/guides/verify-pr
---

[All guides](https://www.useairgap.dev/guides)

# Verify a pull request

Verify a GitHub pull request with one airgap_verify_pr call: injection scan, manifest audit, SHA-pinned clone, build and tests in a disposable microVM.

## 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#142`

> `verify https://github.com/acme/api/pull/142 with airgap and run cargo test`

### Why 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:

1. **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.
2. **Supply-chain audit:** Inspects changed `package.json`, `requirements.txt`, and `Cargo.toml` files locally for lifecycle hooks and alternate package sources.
3. **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.
4. **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.
5. **Redacted verdict and receipt:** Scrubs secrets from stdout and stderr, parses the test summary, and returns `VERIFIED` or `FAILED` alongside 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](https://www.useairgap.dev/guides/supply-chain-hardening) and [the full tool reference](https://www.useairgap.dev/docs#tools).

## Keep reading

[All 12 guides](https://www.useairgap.dev/guides)

### [Test a local patch](https://www.useairgap.dev/guides/verify-patch)

Send clean base files and a diff. Your working tree stays put.

### [Run tests or a one-off command](https://www.useairgap.dev/guides/run)

The image is picked from your files. The VM is deleted after.
