Skip to content

nysquared-support-ux/guard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

@ny-squared/guard

Try PromptSentry Dashboard | Security Benchmark | Documentation

Unified LLM Security SDK — One-liner protection for OpenAI / Anthropic / Gemini

npm version npm downloads License: Apache 2.0 GitHub Action

Features

  • 孱・・One-liner protection 窶・guard.wrap(new OpenAI()) intercepts every LLM call
  • 剥 OWASP Top 10 LLM scanning 窶・Prompt injection, jailbreaks, PII leakage, toxic content
  • 笞。 OSS mode 窶・Rule-based detection, no API key required, no network calls (Apache 2.0)
  • 、・Pro mode 窶・ML-enhanced cloud detection (~95% accuracy)
  • 迫 Multi-provider 窶・OpenAI, Anthropic, Google Gemini, and more

Installation

npm install @ny-squared/guard

Quick Start

import { guard } from '@ny-squared/guard';
import OpenAI from 'openai';

// Wrap your LLM client 窶・that's it!
const client = guard.wrap(new OpenAI());

const response = await client.chat.completions.create({
  model: 'gpt-4',
  messages: [{ role: 'user', content: 'Hello!' }],
});

Why zero dependencies?

Supply chain is exactly what you're protecting against. No transitive vulnerabilities. Ever.

Benchmarks

Input type Latency (M1 Mac)
Short prompt 2ms
Long prompt (4KB) 5ms
Batch (100 items) 180ms

vs. alternatives

Feature @ny-squared/guard [others]
Zero dependencies 笨・ 笶・
Local-first OSS 笨・ 笶・
Risk score 0-100 笨・ 笶・

Links

About

Unified LLM Security SDK — guard.wrap() intercepts eery LLM call. OSS mode (Apache 2.0) + Pro mode (~95%accuracy). Scans OWASP Top 10 LLM threats.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors