# LeakGuard Secret & PII Scanner

> LeakGuard Secret & PII Scanner is a paid API for AI agents from leakguard.agentgate.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-12-01).

Scans text or JSON for leaked crypto wallet keys, API secrets, and PII, redacts them, and optionally checks live blockchain balances for exposed wallet keys

## Facts

- Endpoint: GET https://leakguard.agentgate.workers.dev/v1/scan?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/leakguard-secret-pii-scanner-c978d58f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MAquNfWYEqd9m5OdiQuQg

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability leakguard-secret-pii-scanner-c978d58f
```

Example prompt: Before you send that prompt to the model, scan it with LeakGuard to check for any leaked crypto seed phrases, API keys like AWS or GitHub tokens, or PII like credit card numbers or SSNs — and show me the redacted version along with any wallet balance exposure if a key is found.

## When to prefer this

Use LeakGuard when you need a fail-closed, privacy-preserving secret and PII scanner that covers crypto wallet keys (BIP39 with checksum, EVM/Solana private keys, WIF, xprv), a broad set of API secrets (AWS, GitHub, Stripe, OpenAI, Anthropic, Slack, JWT, PEM, etc.), and PII (Luhn-checked cards, mod-97 IBAN, SSN, email, phone, IP) in a single call. Prefer it over generic regex-based tools when you need live blockchain balance checks to confirm whether an exposed seed phrase or private key actually controls funded wallets. It is specifically designed for AI agent pipelines where inputs must never be logged or stored by the scanner itself.

## Known failure modes

- Missing required 'text' query parameter returns a 400 error
- Balance lookup failures for exposed wallets are reported as 'unknown' in sources_failed rather than empty, with confidence set to low
- Invalid 'style' enum value (not 'label' or 'mask') returns a validation error
- Invalid 'min_severity' enum value returns a validation error
- Payment failure via x402 or invalid Bearer token returns 402 or 401
- Very large text inputs may exceed URL length limits for GET; POST /v1/scan with JSON body should be used instead

## How this service works

Stop AI agents leaking secrets. Finds and redacts crypto wallet keys (BIP39 seed phrases with checksum, EVM and Solana private keys, WIF, xprv), API secrets (GitHub, AWS, Stripe, OpenAI, Anthropic, Slack, Telegram, npm, SendGrid, Hugging Face, JWT, PEM, credentialed URLs, password= assignments) and PII (Luhn-checked cards, mod-97 IBAN, SSN, email, phone, IP) in text or JSON before it reaches an LLM, tool, log or webhook. The deep scan derives the public addresses a leaked seed phrase or private key controls and reports native + USDC balances on Base, Ethereum, Polygon, Arbitrum One and Solana. Fail-closed: a balance lookup that fails is "unknown" (listed in sources_failed, confidence low), never "empty". Inputs are never logged or stored. Pay with x402 (USDC on Base, Solana, Polygon or Arbitrum One) or a prepaid credits key (Authorization: Bearer).

## Output

Returns a JSON object with finding counts by type, a verdict string (e.g. WALLET_KEY_EXPOSED, CLEAN), redacted text, prioritized remediation action strings, and an exposure block with derived wallet addresses and live native + USDC balances on Base, Ethereum, Polygon, Arbitrum One, and Solana for any detected crypto keys. Balance lookup failures are marked as 'unknown' with low confidence, never silently treated as empty.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "text"
     ],
     "properties": {
      "text": {
       "type": "string",
       "description": "Text to check before it is sent (prompt, tool arguments, log, message, file content). POST /v1/scan also accepts {\"json\": <any JSON payload>}."
      },
      "style": {
       "enum": [
        "label",
        "mask"
       ],
       "type": "string",
       "description": "label: [REDACTED:type] (default); mask: keep the last 4 digits / email domain for PII"
      },
      "types": {
       "type": "string",
       "description": "Optional comma-separated finding types or categories to report (wallet_key, secret, pii, email, ...)"
      },
      "min_severity": {
       "enum": [
        "low",
        "medium",
        "high",
        "critical"
       ],
       "type": "string"
      }
     },
     "description": "Search intents: secret scanning api, json pii scan, leaked private key check, credential leak detection, dlp api, redact json"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "tier": {
       "type": "string"
      },
      "input": {
       "type": "object"
      },
      "counts": {
       "type": "object"
      },
      "engine": {
       "type": "string"
      },
      "actions": {
       "type": "array"
      },
      "verdict": {
       "type": "string"
      },
      "exposure": {
       "type": "object"
      },
      "findings": {
       "type": "array"
      },
      "redacted": {
       "type": "string"
      },
      "checked_at": {
       "type": "string"
      },
      "confidence": {
       "type": "string"
      },
      "max_severity": {
       "type": "string"
      },
      "safe_to_send": {
       "type": "boolean"
      },
      "sources_failed": {
       "type": "array"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "tier": "scan",
  "input": {
   "kind": "text",
   "bytes": 185,
   "strings_scanned": 1
  },
  "counts": {
   "email": 1,
   "bip39_mnemonic": 1,
   "aws_access_key_id": 1
  },
  "engine": "leakguard-0.1.0 (leakguard-engine/0.1.0)",
  "actions": [
   "URGENT: a leaked key controls a wallet that holds funds right now. Move the funds to a new wallet before anything else.",
   "Treat the wallet as compromised: create a new seed offline and move all funds now. Never paste a seed phrase into a chat, prompt or tool.",
   "Deactivate and rotate the access key in AWS IAM; check CloudTrail for use.",
   "Personal data: send only if the recipient needs it (data minimization).",
   "Send the redacted output instead of the original."
  ],
  "verdict": "WALLET_KEY_EXPOSED",
  "exposure": {
   "status": "funds_at_risk",
   "addresses": [
    {
     "path": "m/44'/60'/0'/0/0",
     "type": "bip39_mnemonic",
     "family": "evm",
     "status": "used_empty",
     "address": "0x9858EfFD232B4033E47d90003D41EC34EcaEda94",
     "finding": 0,
     "balances": {
      "base": {
       "usdc": "0",
       "funded": false,
       "native": "0",
       "tx_count": 5313
      },
      "polygon": {
       "usdc": "0",
       "funded": false,
       "native": "0",
       "tx_count": 13405
      },
      "arbitrum": {
       "usdc": "0",
       "funded": false,
       "native": "0",
       "tx_count": 849
      },
      "ethereum": {
       "usdc": "0",
       "funded": false,
       "native": "0",
       "tx_count": 1679
      }
     }
    },
    {
     "path": "m/44'/60'/0'/0/1",
     "type": "bip39_mnemonic",
     "family": "evm",
     "status": "used_empty",
     "address": "0x6Fac4D18c912343BF86fa7049364Dd4E424Ab9C0",
     "finding": 0,
     "balances": {
      "base": {
       "usdc": "0",
       "funded": false,
       "native": "0",
       "tx_count": 1254
      },
      "polygon": {
       "usdc": "0",
       "funded": false,
       "native": "0",
       "tx_count": 2740
      },
      "arbitrum": {
       "usdc": "0",
       "funded": false,
       "native": "0",
       "tx_count": 457
      },
      "ethereum": {
       "usdc": "0",
       "funded": false,
       "native": "0",
       "tx_count": 167
      }
     }
    },
    {
     "path": "m/44'/60'/0'/0/2",
     "type": "bip39_mnemonic",
     "family": "evm",
     "status": "used_empty",
     "address": "0xb6716976A3ebe8D39aCEB04372f22Ff8e6802D7A",
     "finding": 0,
     "balances": {
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/leakguard-secret-pii-scanner-c978d58f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from leakguard.agentgate.workers.dev](https://www.zero.xyz/host/leakguard.agentgate.workers.dev/llms.txt)
