Skip to content

Guards Overview

open-guardrail ships with 350 built-in guards across 10 categories — the most comprehensive guardrail library available.

Every guard follows the same pattern:

typescript
const guard = guardName({ action: 'block', ...options });
const result = await guard.check(text, context);

Categories

CategoryGuardsDescription
Security41Prompt injection, indirect injection, SQL/XSS/SSRF, token smuggling, semantic firewall, supply chain, model DoS
Privacy3526 PII regions + medical PII, financial PII, data leakage, contact info
Content38Profanity in 13 languages, toxicity, bias (gender/age), hate speech, copyright
Compliance27GDPR, EU AI Act, Korean AI Basic Act, ISMS-P, PIPA, PCI DSS, SOX, FERPA, HIPAA, COPPA
Format17JSON schema, word count, token limit, markdown, date/number format
AI Delegation10Hallucination, reasoning trace leak, persona consistency, confidence score, content watermark
Agent Safety12Agent loop, tool abuse, permission, recursion, RAG poisoning, multi-agent
Detection13Spam, deepfake, propaganda, misinformation, child safety
Operational15Cost guard, rate limit, response quality, API rate guard
Korean / ISMS-P8+Korean PII, profanity, resident ID, credit info, ISMS-P, PIPA, AI Basic Act

Common Options

All guards accept an action parameter:

ActionResult
'block'Pipeline fails, text rejected
'warn'Pipeline passes, but flagged
'mask'Text modified (PII guards only)

Released under the MIT License.