Skip to content

DLP Patterns Reference

Complete list of built-in DLP detection patterns.

Secret patterns

NameSeverityRegexExample
aws_access_keycriticalAKIA[0-9A-Z]{16}AKIAIOSFODNN7EXAMPLE
aws_secret_keycritical[A-Za-z0-9/+=]{40}40-char base64 string
github_patcriticalghp_[A-Za-z0-9]{36,}ghp_ABCDEFGHabcdefgh1234567890abcdefgh
github_oauthhighgho_[A-Za-z0-9]{36,}gho_ABCDEFGHabcdefgh1234567890abcdefgh
github_app_tokenhighghu_[A-Za-z0-9]{36,}ghu_ABCDEFGHabcdefgh1234567890abcdefgh
anthropic_api_keycriticalsk-ant-api03-[A-Za-z0-9_-]{90,}sk-ant-api03-...
openai_api_keycriticalsk-[A-Za-z0-9]{20,}T3BlbkFJ[A-Za-z0-9]{20,}sk-...T3BlbkFJ...
jwt_tokenhigheyJ...\.eyJ...\....eyJhbGciOiJIUzI1NiJ9.eyJzdWIi...
private_keycritical-----BEGIN ... PRIVATE KEY-----PEM private key header
database_urlhigh(postgres|mysql|mongodb|redis)://...postgres://user:pass@host/db
slack_tokenhighxox[bpras]-[A-Za-z0-9-]{10,}xoxb-1234567890-abcdefghij
stripe_keycritical[rs]k_(live|test)_[A-Za-z0-9]{20,}sk_live_ABCDabcd12345678901234
npm_tokenhighnpm_[A-Za-z0-9]{36,}npm_ABCDEFGHabcdefgh1234567890abcdefgh
sendgrid_keyhighSG\.[A-Za-z0-9_-]{22,}\.[A-Za-z0-9_-]{22,}SG.abc123.def456
generic_api_keymedium(API_KEY|API_SECRET|...)=[value]API_KEY=abc123def456
generic_secret_assignmentmedium(password|secret|token|...)="value"password="mysecret"

PII patterns

NameSeverityRegexExample
ssncritical\d{3}-\d{2}-\d{4}123-45-6789
credit_cardcriticalVisa/MC/Amex/Discover formats4111 1111 1111 1111
emaillow[user]@[domain].[tld]user@example.com
phone_usmediumUS phone number formats(555) 123-4567
ipv4low\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}192.168.1.100

Severity levels

LevelMeaningExamples
lowPotentially sensitive, common in normal textemail, IP address
mediumLikely sensitive, may be intentionalphone numbers, generic assignments
highAlmost certainly sensitiveJWTs, Slack tokens, database URLs
criticalDefinitely sensitive, never belongs in LLM contextAWS keys, private keys, SSNs, credit cards

Custom patterns

You can add custom patterns via the dlp.custom_patterns config:

yaml
dlp:
  custom_patterns:
    - name: internal_key
      pattern: 'grwnd_[a-zA-Z0-9]{32}'
      severity: critical
      action: block

Custom patterns use the custom category and are evaluated alongside built-in patterns.

Released under the Apache-2.0 License.