71
Vard is a TypeScript-first library for detecting prompt injection attacks in LLM applications.
It provides pattern-based validation in <0.5ms with a Zod-inspired chainable API, making it perfect for high-volume applications that need fast, local security validation without API calls.
The library catches common attack patterns (instruction override, role manipulation, encoding attacks) and is honest about trade-offs (~90% accuracy on known attacks, can't catch semantic attacks).
It's designed for defense-in-depth, working as a first layer before LLM-based detection.
Built with