youraitools-api / tree / public/aiax/sections/leakguard.json ยท raw (this view has old GitHub links rewritten for the mirror; raw is byte-exact)
{
 "aiax_version": "0.1",
 "section_id": "leakguard",
 "purpose": "LeakGuard: Find and redact leaked secrets before an AI agent sends text to an LLM, tool or webhook: crypto seed phrases (BIP39 checksum), EVM/Solana private keys, WIF, xprv, API keys (GitHub, AWS, Stripe, OpenAI, Anthropic, Slack...), JWT, PEM, cards, IBAN, SSN, email, phone. Verdict, findings and redacted text.",
 "inputs": {
  "type": "object",
  "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": {
    "type": "string",
    "enum": [
     "label",
     "mask"
    ],
    "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": {
    "type": "string",
    "enum": [
     "low",
     "medium",
     "high",
     "critical"
    ]
   }
  },
  "required": [
   "text"
  ]
 },
 "outputs": {
  "type": "object",
  "properties": {
   "verdict": {
    "type": "string"
   },
   "safe_to_send": {
    "type": "boolean"
   },
   "max_severity": {
    "type": "string"
   },
   "counts": {
    "type": "object",
    "properties": {
     "bip39_mnemonic": {
      "type": "integer"
     },
     "aws_access_key_id": {
      "type": "integer"
     },
     "email": {
      "type": "integer"
     }
    }
   },
   "findings": {
    "type": "array",
    "items": {
     "type": "object",
     "properties": {
      "type": {
       "type": "string"
      },
      "category": {
       "type": "string"
      },
      "severity": {
       "type": "string"
      },
      "confidence": {
       "type": "number"
      },
      "validator": {
       "type": "string"
      },
      "start": {
       "type": "integer"
      },
      "end": {
       "type": "integer"
      },
      "preview": {
       "type": "string"
      },
      "remediation": {
       "type": "string"
      }
     }
    }
   },
   "redacted": {
    "type": "string"
   },
   "engine": {
    "type": "string"
   },
   "confidence": {
    "type": "string"
   },
   "sources_failed": {
    "type": "array",
    "items": {}
   },
   "input": {
    "type": "object",
    "properties": {
     "kind": {
      "type": "string"
     },
     "bytes": {
      "type": "integer"
     }
    }
   },
   "checked_at": {
    "type": "string"
   },
   "tier": {
    "type": "string"
   }
  }
 },
 "pricing": {
  "model": "per_call",
  "amount": "0.005",
  "currency": "USDC",
  "rail": "x402"
 },
 "examples": [
  {
   "description": "GET /leakguard/v1/lite, paid over x402 (USDC on Base); an unpaid call answers 402 with the terms.",
   "request": {
    "method": "GET",
    "url": "https://api.youraitools.co/leakguard/v1/lite",
    "query": {
     "text": "agent log: restored wallet from seed abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about; aws key AKIAIOSFODNN7EXAMPLE; contact ops@example.com"
    }
   },
   "response": {
    "verdict": "WALLET_KEY_EXPOSED",
    "safe_to_send": false,
    "max_severity": "critical",
    "counts": {
     "bip39_mnemonic": 1,
     "aws_access_key_id": 1,
     "email": 1
    },
    "findings": [
     {
      "type": "bip39_mnemonic",
      "category": "wallet_key",
      "severity": "critical",
      "confidence": 0.99,
      "validator": "bip39 checksum ok (12 words)",
      "start": 37,
      "end": 130,
      "preview": "[REDACTED:bip39_mnemonic]",
      "remediation": "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."
     },
     {
      "type": "aws_access_key_id",
      "category": "secret",
      "severity": "high",
      "confidence": 0.9,
      "start": 140,
      "end": 160,
      "preview": "[REDACTED:aws_access_key_id]",
      "remediation": "Deactivate and rotate the access key in AWS IAM; check CloudTrail for use."
     },
     {
      "type": "email",
      "category": "pii",
      "severity": "medium",
      "confidence": 0.9,
      "start": 170,
      "end": 185,
      "preview": "o***@example.com",
      "remediation": "Personal data: send only if the recipient needs it (data minimization)."
     }
    ],
    "redacted": "agent log: restored wallet from seed [REDACTED:bip39_mnemonic]; aws key [REDACTED:aws_access_key_id]; contact [REDACTED:email]",
    "engine": "leakguard-0.1.0 (leakguard-engine/0.1.0)",
    "confidence": "high",
    "sources_failed": [],
    "input": {
     "kind": "text",
     "bytes": 185
    },
    "checked_at": "2026-10-22T19:07:15.225Z",
    "tier": "lite"
   }
  }
 ],
 "pact_mandate_template": null,
 "extensions": {
  "youraitools": {
   "endpoint": "https://api.youraitools.co/leakguard/v1/lite",
   "network": "eip155:8453",
   "x402_versions": [
    2,
    1
   ],
   "mcp": "https://api.youraitools.co/leakguard/mcp",
   "openapi": "https://api.youraitools.co/leakguard/openapi.json"
  }
 }
}

agentgate-source: code mirror on Cloudflare Pages. All repos