All guidesWalkthroughs

Scrub logs before sharing

Redact API keys, bearer tokens and private key blocks from logs, diffs and environment dumps with airgap_redact_secrets before you share them.

Scrub logs before sharing

Short answer: Call airgap_redact_secrets before pasting terminal logs, stack traces, git diffs, or environment dumps into an issue, chat message, or LLM prompt. It runs completely locally with zero credentials, replaces detected credentials with [REDACTED], and returns the scrubbed text along with a merged match count.

redact secrets from this CI log so I can post it
scrub my .env diff with airgap before showing it

What gets redacted

airgap_redact_secrets combines provider-specific regex rules with high-entropy token detection so both well-known key formats and custom random secrets are caught locally before leaving your machine:

CategoryExamples detectedReplacement
Cloud & AI keysAWS access key IDs, OpenAI / Anthropic / GMI style API keys[REDACTED]
Developer & SaaS tokensGitHub personal/fine-grained tokens (ghp_, github_pat_), Slack tokens & webhooks[REDACTED]
Auth headers & JWTsAuthorization: Bearer tokens, three-segment JWT payloads[REDACTED]
Private key blocksPEM-encoded RSA, EC, and OpenSSH private key blocks[REDACTED]
Assignments & entropyPASSWORD=, SECRET=, TOKEN= assignments and high-entropy random strings[REDACTED]

Direct MCP tool call

{
  "tool": "airgap_redact_secrets",
  "arguments": {
    "raw_text": "GITHUB_TOKEN=ghp_example_placeholder\nBuild passed in 4.2s"
  }
}

Automatic scrubbing vs. manual scrubbing

Every sandbox tool (airgap_sandbox_run, airgap_verify_patch, airgap_verify_pr) already scrubs stdout, stderr, and configured provider keys automatically before returning output. Use airgap_redact_secrets directly whenever you are working with local logs, crash dumps, or commit messages that never went through a sandbox.

Caveat: Regex and entropy detectors can miss unusual secret formats and can occasionally redact harmless high-entropy hashes (like long SHA digests). Always glance over scrubbed output before posting publicly. See Zero credential leakage for how entropy scoring works under the hood.

Keep reading

All 12 guides

Docker vs. remote microVMs

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