ReasonGate is an open-source, self-hostable Python library that provides a multi-layered defense-in-depth system to detect prompt injections, jailbreaks, and data leaks in large language model applications.
Key Points
- Uses a rule-based pipeline to normalize obfuscated text, such as leetspeak or base64, before scanning for known malicious patterns.
- Implements an "action gate" that prevents sensitive tool calls if the destination data originates from untrusted or poisoned sources.
- Features zero dependencies and performs no network calls, allowing for secure deployment on isolated or classified internal networks.
- Provides machine-readable audit records for every decision, including risk scores and evidence logs for SIEM integration.
- Achieves 75.6% recall on obfuscated known attacks, while an optional embedding-based add-on handles novel, naturally-phrased injection attempts.