cd /news/large-language-models/resk-llm-ts-open-source-typescript-s… · home topics large-language-models article
[ARTICLE · art-53817] src=dev.to ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

resk-llm-ts: Open Source TypeScript Security Toolkit for LLM Applications

Resk Security has released resk-llm-ts, an open-source TypeScript security toolkit for LLM applications. The toolkit includes 11 threat detectors for prompt injection, jailbreak, PII leaks, and data exfiltration, and can be used as Express or Hono middleware or as an OpenAI-compatible wrapper.

read1 min views1 publishedJul 10, 2026

Links:

If you are building LLM-powered applications in Node.js or TypeScript, you have probably thought about security. Prompt injection, jailbreak attempts, PII leaks, and data exfiltration are real threats that traditional input sanitization does not catch at the LLM layer.

Most security toolkits are Python-only. TypeScript developers deserve the same protection.

resk-llm-ts is an open source TypeScript security toolkit with 11 threat detectors. It works as Express middleware, Hono middleware, or as an OpenAI-compatible wrapper.

npm install resk-llm-ts
js
import { LLMSecurity } from "resk-llm-ts";

const security = new LLMSecurity({
  enabledDetectors: ["injection", "jailbreak", "pii", "exfiltration"],
  mode: "block", // or "log"
});

// Use as middleware with Express
app.post("/api/chat", security.middleware(), async (req, res) => {
  // req.body has been scanned - threats are blocked or logged
  const response = await openai.chat.completions.create({
    model: "gpt-4",
    messages: req.body.messages,
  });
  res.json(response);
});

Or use the OpenAI-compatible wrapper:

import { SecureOpenAI } from "resk-llm-ts";

const client = new SecureOpenAI({
  apiKey: process.env.OPENAI_API_KEY,
  detectors: ["injection", "jailbreak"],
});

const response = await client.chat.completions.create({
  model: "gpt-4",
  messages: [{ role: "user", content: userInput }],
});
Detector Purpose
injection Prompt injection detection
jailbreak Jailbreak pattern recognition
pii PII and sensitive data scanning
exfiltration Data exfiltration prevention
code-injection Code injection detection
toxic-content Toxic content filtering
political Political content detection
adversarial Adversarial suffix detection
encoded-payload Base64/hex encoded threat detection
role-play Role-play manipulation detection
system-prompt System prompt leak prevention

Security for LLM applications should not be an afterthought. Add it as middleware and ship with confidence.

Check it out on GitHub: https://github.com/Resk-Security/resk-llm-ts

Install: https://npmjs.com/package/resk-llm-ts

Learn more: https://resk.fr

── more in #large-language-models 4 stories · sorted by recency
── more on @resk security 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/resk-llm-ts-open-sou…] indexed:0 read:1min 2026-07-10 ·