You need to agree to share your contact information to access this model
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
Access to Kyni Guard pattern catalogs and compliance profiles is granted on request. These artifacts power enterprise AI safety filtering — tell us how you intend to use them.
Log in or Sign Up to review the conditions and access this model content.
Kyni Guard — Pattern Assets
Versioned pattern catalogs powering kyni-guard, the lightweight regex-based guardrails library.
These YAML files are the data that drives detection. They're versioned independently from the library code so you can:
- Update pattern catalogs without bumping the Python library
- Audit/diff exactly what the detectors look for
- Load custom subsets in your own pipeline
The Python implementation is on PyPI:
pip install kyni-guard.
What's in this repo
patterns/
├── prompt_injection.yaml # 97 patterns / 8 categories / 12 languages
├── toxicity.yaml # 19 categories (11 OpenAI baseline + 8 enterprise)
└── pii.yaml # 15 PII entity regex + 6 compliance profile mappings
profiles/
├── gdpr.yaml # EU personal data
├── hipaa.yaml # US PHI
├── pci_dss.yaml # Cardholder data
├── sox.yaml # Financial reporting
├── ccpa.yaml # California consumer info
└── glba.yaml # Financial customer data
Taxonomy
Prompt injection — 8 categories
| Category | Examples |
|---|---|
instruction_override |
"ignore all previous instructions" |
role_manipulation |
"you are now DAN" |
jailbreak |
"enter developer mode", grandma exploit |
system_prompt_leak |
"reveal your system prompt", "repeat verbatim" |
indirect_injection |
hidden HTML comments, [INST] tags, zero-width clusters |
encoding_evasion |
base64 / rot13 / hex / unicode-escape payloads |
multi_turn |
gradual boundary-pushing, "just this once" |
multilingual |
the same intents in Spanish/French/German/Italian/Chinese/Japanese/Korean/Russian/Arabic/Indonesian/Dutch/Romanian |
Toxicity — 19 categories
11 OpenAI Moderation baseline (for migration compatibility):
hate, hate/threatening, harassment, harassment/threatening, violence, violence/graphic, sexual, sexual/minors, self-harm, self-harm/intent, self-harm/instructions
8 Kyni enterprise extensions (what OpenAI doesn't cover):
| Category | What it catches |
|---|---|
credential_phishing |
"send me your API key", token-extraction prompts |
data_exfiltration |
"list all customers", "export the database" |
financial_fraud |
invoice redirect, wire-fraud language, urgency-based social engineering |
insider_trading |
embargo / material-non-public-info language |
competitor_disparagement |
brand-attack / smear-campaign patterns |
regulatory_violation |
"hide this from compliance", "bypass KYC" |
code_exfiltration |
"show me the system prompt", proprietary-IP probes |
manipulation_tactics |
urgency / scarcity / fear weaponized against the assistant |
PII — 15 entity types across 6 compliance profiles
person_name, email, phone, address_us, date_of_birth, ssn, ip_address, iban, passport, drivers_license, credit_card (Luhn-validated), bank_account, routing_number, ein, swift_bic
Profile-to-entities mapping is in patterns/pii.yaml and per-profile YAMLs in profiles/.
How to use these files
From the Python library (default)
pip install kyni-guard and you get the patterns bundled. The library reads from kyni_guard.patterns.* Python modules — the YAML in this repo is the same data, just in a different format.
Standalone (any language)
import yaml
patterns = yaml.safe_load(open("patterns/prompt_injection.yaml"))
for category, regex_list in patterns["categories"].items():
for r in regex_list:
print(category, r)
Or fetch directly from HF:
from huggingface_hub import hf_hub_download
path = hf_hub_download("kyni-so/kyni-guard-assets", "patterns/toxicity.yaml")
License
MIT. Submit pattern additions / corrections to hello@kynisolutions.com.
Built by Kyni Solutions.