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 itscrub my .env diff with airgap before showing itWhat 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:
| Category | Examples detected | Replacement |
|---|---|---|
| Cloud & AI keys | AWS access key IDs, OpenAI / Anthropic / GMI style API keys | [REDACTED] |
| Developer & SaaS tokens | GitHub personal/fine-grained tokens (ghp_, github_pat_), Slack tokens & webhooks | [REDACTED] |
| Auth headers & JWTs | Authorization: Bearer tokens, three-segment JWT payloads | [REDACTED] |
| Private key blocks | PEM-encoded RSA, EC, and OpenSSH private key blocks | [REDACTED] |
| Assignments & entropy | PASSWORD=, 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.