---
title: "Guides · airgap"
description: "Step-by-step airgap guides: verify a GitHub PR, test a local patch, run tests in a sandbox, scan issue text, audit manifests and scrub logs."
url: https://www.useairgap.dev/guides
---

# Ask in plain words.

Short walkthroughs for the jobs airgap does most: verify a PR, test a patch, run tests, audit a manifest and scrub logs before you share them.

## Before you start

Every guide assumes airgap is installed and registered with your client. If `airgap doctor` prints no failures, you are ready.

```
airgap setup --claude --yes
airgap doctor
```

You talk to your agent in plain words. The routing rules that setup writes tell it which airgap tool to call, so you never have to name one.

## Verify a pull request

Give your agent the repository and PR number, or the full PR URL.

> `use airgap to verify acme/api#142`

The agent calls `airgap_verify_pr` once. That single call:

1. Scans the PR title, body and diff for prompt injection before any compute starts.
2. Audits changed manifests for install hooks, git URLs and risky packages.
3. Clones the PR head at its pinned commit SHA inside a fresh microVM.
4. Installs, builds and runs the test suite, then deletes the VM.
5. Returns a verdict with secrets in the logs replaced by `[REDACTED]`.

A PR is VERIFIED only when the run exits 0, a test summary is recognized, at least one test passes and none fail. A run with zero tests is never verified.

## Test a local patch

For changes that are not on GitHub yet, ask the agent to verify the diff. It sends the clean base files and the unified diff; airgap applies the patch inside the microVM and runs the tests there.

> `use airgap to verify this patch before I commit it`

airgap never reads your working tree on its own. Only the files the agent passes in the call leave your machine.

## Run tests or a one-off command

For anything else (a test run, a build, reproducing a bug, scraping a page), the agent uses `airgap_sandbox_run` and uploads only the files the command needs.

> `use airgap and run the tests`

> `reproduce issue 88 in a sandbox`

| Repo root contains | Default image |
| --- | --- |
| `Cargo.toml` | `rust:1-bookworm` |
| `package.json` | `node:20-bookworm` |
| anything else | `python:3.12-bookworm` |

Commands time out after 120 s by default and can run up to 1800 s. The first run for an image builds a template, so it is slower than the runs after it.

## Act on untrusted issue text

Issue bodies and comments can carry hidden instructions. Ask the agent to check the text first; it calls `airgap_scan_injection` before it acts on anything in it.

> `fix the bug in issue 204, but scan it with airgap first`

## Audit a dependency manifest

Before installing from a `package.json`, `Cargo.toml` or `requirements.txt` you did not write, ask for a supply audit. It runs locally and needs no keys.

> `use airgap to audit this package.json before we install`

By default `fail_on_supply_risk` is true and `allow_install_scripts` is false, so manifests with lifecycle hooks are refused unless you change those settings.

## Scrub logs before sharing

Before pasting logs, diffs or environment dumps into an issue or chat, ask the agent to redact them. `airgap_redact_secrets` runs locally and replaces API keys, bearer tokens and private key blocks with `[REDACTED]`.

> `redact secrets from this CI log so I can post it`

## Run a security review

`airgap_audit_repo` performs a defensive, static security review of a repository in six phases, using the microVM and GMI MaaS. It does not exploit anything.

> `use airgap to do a security audit of this repo`

Read the [security model](https://github.com/dhruvil-codes/airgap/blob/main/docs/security-model.md) for what this boundary does and does not protect against.
