Documentation Index
Fetch the complete documentation index at: https://docs.neuraltrust.ai/llms.txt
Use this file to discover all available pages before exploring further.
The URL Analyzer plugin fetches and analyzes content from URLs found in user requests. It detects jailbreak attempts and PII in external content before it reaches your AI application.
Features
- URL extraction: Automatically detects URLs in request content
- Jailbreak detection: Analyzes fetched content for prompt injection attempts
- PII detection: Scans URL content for sensitive information
- Parallel processing: Analyzes multiple URLs concurrently
- Early exit: Stops processing immediately when a threat is detected
- Domain filtering: Whitelist or blacklist specific domains
Configuration
{
"name": "url_guardrail",
"enabled": true,
"stage": "pre_request",
"settings": {
"mode": "protect",
"threshold": 0.7,
"url": {
"timeout": 5000,
"max_content_size": 1048576,
"allowed_domains": [],
"blocked_domains": []
},
"pii": {
"entities": [
"email",
"credit_card",
"iban",
"phone_number"
]
},
"credentials": {
"base_url": "https://api.neuraltrust.ai",
"token": "your-api-token"
}
}
}
Settings
Root Settings
| Parameter | Type | Description | Default |
|---|
mode | string | protect (block) or observe (log only) | protect |
threshold | float | Jailbreak detection threshold (0.0 - 1.0) | 0.7 |
URL Settings
| Parameter | Type | Description | Default |
|---|
url.timeout | integer | Request timeout in milliseconds | 5000 |
url.max_content_size | integer | Maximum response body size in bytes | 1048576 (1MB) |
url.allowed_domains | array | Whitelist of allowed domains (empty = all allowed) | [] |
url.blocked_domains | array | Blacklist of blocked domains | [] |
PII Settings
| Parameter | Type | Description | Default |
|---|
pii.entities | array | List of PII entity types to detect and block | [] |
Credentials
| Parameter | Type | Description |
|---|
credentials.base_url | string | NeuralTrust API base URL |
credentials.token | string | API authentication token |
Modes
Protect Mode
When mode is set to protect, the plugin will:
- Block requests if jailbreak is detected (score >= threshold)
- Block requests if configured PII entities are found
- Return a
403 Forbidden response with details
Observe Mode
When mode is set to observe, the plugin will:
- Log all findings without blocking
- Allow requests to proceed
- Record jailbreak scores and PII detections in observability data
Domain Filtering
Allowed Domains
When allowed_domains is populated, only URLs from those domains will be analyzed. All other domains are skipped.
{
"url": {
"allowed_domains": ["trusted.com", "internal.company.com"]
}
}
Blocked Domains
URLs from blocked domains are skipped and marked as not allowed.
{
"url": {
"blocked_domains": ["malicious.com", "untrusted.org"]
}
}
Blocked domains take precedence over allowed domains. If a domain is in both lists, it will be blocked.
Response Examples
Jailbreak Detected
{
"error": "jailbreak detected in url content (score: 0.92, threshold: 0.70)",
"status": 403
}
PII Detected
{
"error": "PII detected in url content: [email, credit_card]",
"status": 403
}
Use Cases
- Prevent Indirect Prompt Injection: Block malicious content from external URLs
- Data Exposure Prevention: Detect PII in linked documents and pages
- Compliance: Audit external content accessed by AI applications
- Security Monitoring: Track all external URLs referenced in requests