Hardening LLM Apps in TypeScript: 11 Threat Detectors with resk-llm-ts
[Links] NPM: https://www.npmjs.com/package/resk-llm-ts GitHub: https://github.com/Resk-Security/resk-llm-ts Web: https://resk.fr The Problem When you build an AI-powered app in TypeScript, your chatbot
[Links]
- NPM: https://www.npmjs.com/package/resk-llm-ts
- GitHub: https://github.com/Resk-Security/resk-llm-ts
- Web: https://resk.fr
The Problem
When you build an AI-powered app in TypeScript, your chatbot or agent faces a growing list of threats: prompt injection, jailbreak attempts, PII exfiltration, payload smuggling, token manipulation, and malicious tool calls. Most teams either roll their own detection or rely on post-generation regex filters that can be bypassed in seconds.
The Solution
Resk-LLM-TS is an open-source TypeScript security toolkit that integrates into your existing stack as middleware. It detects threats at both request and response boundaries, blocking malicious content before it reaches your model — or your user.
Key Features
- 11 detector types covering injection, jailbreak, exfiltration, payload smuggling, leakage, token manipulation, bad encoding, role escalation, and malicious tool calls
- Express middleware - drop into existing routes in one line
- Hono middleware - fully compatible with the Hono framework
- OpenAI SDK wrapper - works with any provider via the OpenAI-compatible interface
- Full TypeScript - complete type safety, no JS runtime surprises
- MIT licensed - free for any project
Install
npm i resk-llm-ts
CTA
Check the full documentation at resk.fr and star the repo on GitHub.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.