---
title: "Run a security review · airgap"
description: "Run a defensive, static six-phase security review of a repository with airgap_audit_repo, using a microVM and GMI MaaS."
url: https://www.useairgap.dev/guides/audit
---

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

# Run a security review

Run a defensive, static six-phase security review of a repository with airgap_audit_repo, using a microVM and GMI MaaS.

## Run a security review

**Short answer:** `airgap_audit_repo` runs a defensive, static security review of a repository snapshot across six structured phases using a disposable GMI AgentBox microVM and GMI MaaS. Every reported finding must quote an exact file path and line from your snapshot; unmatched quotes are automatically downgraded to rejected hypotheses.

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

> `run a defensive security review on src/auth and src/api with airgap`

### The six defensive phases

1. **Reconnaissance:** Builds a fixed, non-executing file and stack inventory inside the sandbox.
2. **Control inventory:** Maps existing authentication, authorization, input validation, and boundary checks.
3. **Candidate identification:** Flags potential vulnerability candidates grounded in the source files.
4. **Skeptical verification:** Cross-checks each candidate against the actual code and verifies exact file/line quotes against the uploaded snapshot.
5. **Consolidation:** Deduplicates findings, separates verified quotes from rejected hypotheses, and assigns severity.
6. **Reporting:** Returns a Markdown report, structured findings, rejected hypotheses, and an unsigned SHA-256 receipt directly over MCP (never writes a local `REPORT.md`).

### Direct MCP tool call

```
{
  "tool": "airgap_audit_repo",
  "arguments": {
    "files": {
      "src/server.ts": "// pass the source files you want reviewed",
      "src/auth.ts": "// up to 2000 files / 8 MiB snapshot; inference envelope <= 2 MiB"
    }
  }
}
```

### Safety boundaries and limits

| Property | Behavior |
| --- | --- |
| Exploitation | Never runs generated exploits, never generates attack scripts, never probes external targets |
| Pre-upload scrubbing | Audit source is heuristically scrubbed for secrets before upload and inference |
| Quote verification | confirmed_vulnerabilities means the exact file/line quote matched — not runtime exploitability |
| Credentials required | Both GMI_AGENTBOX_API_KEY and GMI_MAAS_API_KEY |
| Size budget | Snapshot up to 2000 files / 8 MiB; serialized inference envelope must fit 2 MiB |

For large repositories, pass only the security-critical directories (auth, API handlers, parsers, file I/O) so the serialized inference envelope stays under 2 MiB. Read the [security model](https://github.com/dhruvil-codes/airgap/blob/main/docs/security-model.md) for the complete threat model and residual risks.

## Keep reading

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

### [Docker vs. remote microVMs](https://www.useairgap.dev/guides/docker-vs-microvm)

Why a local container is not a security boundary for agents.

### [Stopping prompt injection RCE](https://www.useairgap.dev/guides/prompt-injection-rce)

Break the lethal trifecta before untrusted text can run.
