How Shield's Detection Works
Regex Pattern Matching
Fast, precise detection of known formats — emails, SSNs, credit cards, API key prefixes. Catches structured data instantly with near-zero false positives.
Entropy Analysis
Measures the randomness of text segments using Shannon entropy. High-entropy strings (tokens, keys, encoded data) are flagged even when they don't match any known pattern — catching custom API keys and novel credential formats that regex would miss.
Layered Defense
Shield runs both regex AND entropy analysis simultaneously, then cross-validates. A string that matches a regex pattern but has low entropy (like a placeholder) is deprioritized. A string that fails regex but has very high entropy gets escalated.
Local-Only Processing
All detection happens on your machine — before the prompt ever leaves your device. Shield redacts sensitive content, sends the sanitized prompt to the LLM provider, then rehydrates the response on the way back. No data leaves unredacted.