Features
- Multi-format support: PDF, DOCX, XLSX, PPTX, images (PNG, JPEG, TIFF)
- PII detection: Email, credit cards, phone numbers, national IDs, and more
- Jailbreak detection: Detect prompt injection and jailbreak attempts in document content
- OCR support: Extract text from images and scanned documents
- Configurable blocking: Choose which PII entities trigger blocking and set jailbreak thresholds
Configuration
Settings
| Parameter | Type | Description | Default |
|---|---|---|---|
mode | string | enforce (block) or observe (log only) | enforce |
max_file_size | integer | Maximum file size in bytes | 52428800 (50MB) |
PII Configuration
| Parameter | Type | Description | Default |
|---|---|---|---|
pii.entities | array | List of PII entity types to detect and block | [] |
Firewall Configuration (Jailbreak Detection)
| Parameter | Type | Description | Default |
|---|---|---|---|
firewall.enabled | boolean | Enable jailbreak detection | false |
firewall.threshold | float | Jailbreak score threshold (0.0-1.0) | 0.7 |
firewall.credentials.base_url | string | NeuralTrust API base URL | - |
firewall.credentials.token | string | NeuralTrust API token | - |
OCR Configuration
| Parameter | Type | Description | Default |
|---|---|---|---|
ocr.enabled | boolean | Enable OCR for images | false |
ocr.languages | array | OCR language codes | ["en"] |
Supported PII Entities
| Entity | Description |
|---|---|
email | Email addresses |
credit_card | Credit card numbers |
iban | International Bank Account Numbers |
phone_number | Phone numbers |
spanish_dni | Spanish National ID |
spanish_nie | Spanish Foreigner ID |
ssn | Social Security Numbers |
passport | Passport numbers |
Modes
Enforce Mode
Whenmode is set to enforce, the plugin will:
- Block requests containing files with detected PII (if PII entities are configured)
- Block requests with jailbreak scores above the threshold (if firewall is enabled)
- Return a
403 Forbiddenresponse with details about detected threats
Observe Mode
Whenmode is set to observe, the plugin will:
- Log detected PII and jailbreak attempts without blocking the request
- Allow the request to proceed
- Record findings in observability data
Example Responses
PII Detected (Blocked)
Jailbreak Detected (Blocked)
Combined Detection (Blocked)
Use Cases
- Data Loss Prevention: Prevent sensitive data from being sent to AI models
- Jailbreak Protection: Block prompt injection attempts hidden in documents
- Compliance: Ensure GDPR, CCPA, and other regulatory compliance
- Audit Trail: Log all PII and jailbreak detection events for security audits
- Multi-layer Security: Combine PII and jailbreak detection for comprehensive protection