LeakSnitchInstall free

API Key Disclosure detection

A publicly auditable detection pattern in the LeakSnitch engine. Category: Password and Credential Disclosures. Severity: Critical.

Short answer

LeakSnitch detects api key disclosure with a base score of 94 (Critical severity). The pattern below is fully public, so any security team can verify exactly what gets flagged before rollout.

regex / gipattern v1
(?:here(?:'s| is)|this is|please use|use (?:this|the)|my|the|don'?t share(?:\s+this)?(?:\s+but)?)\s+(?:api\s*key|apikey)\s*(?:is|:|=|-)?\s*["']?(sk-ant-[a-zA-Z0-9\-_]{20,}|sk-[a-zA-Z0-9\-_]{8,}|hf_[A-Za-z0-9]{20,}|xox[baprs]-[A-Za-z0-9\-]+|AIza[0-9A-Za-z\-_]{20,}|[A-Za-z0-9_\-]{16,})

Base score

94 / 100

Severity

Critical

Category

Password and Credential Disclosures

Why it matters

Catches conversational leaks such as here is my API key, where a person hands a credential to an AI without thinking.

In the LeakSnitch engine this pattern is one of 58 public rules combined with context signals, entropy analysis, and checksum validators. A single match never blocks by itself; the full context aware scoring decides whether api key disclosure in a prompt is a real leak or a false positive.

Frequently asked questions

Why is the api key disclosure pattern public?

LeakSnitch's competitive advantage is the context aware engine, not hidden regexes. Publishing every pattern lets security teams audit, test, and trust the detection before it ships to their organization.

Can I test this api key disclosure pattern?

Yes. Paste sample text into the free LeakSnitch scanner in your browser and watch the exact detection in action, including severity and scoring.

Does LeakSnitch use other signals for api key disclosure?

This public pattern is the format based layer. The engine adds context signals, disclosure phrasing, entropy fallback, and checksum validation to confirm high confidence before blocking.

Related patterns

Stop AI leaks on the device, not in the cloud.

Install LeakSnitch in under 30 seconds and protect every prompt sent to ChatGPT, Claude, Gemini, and 25+ AI tools. Free for individuals.