Skip to main content
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

ParameterTypeDescriptionDefault
modestringprotect (block) or observe (log only)protect
thresholdfloatJailbreak detection threshold (0.0 - 1.0)0.7

URL Settings

ParameterTypeDescriptionDefault
url.timeoutintegerRequest timeout in milliseconds5000
url.max_content_sizeintegerMaximum response body size in bytes1048576 (1MB)
url.allowed_domainsarrayWhitelist of allowed domains (empty = all allowed)[]
url.blocked_domainsarrayBlacklist of blocked domains[]

PII Settings

ParameterTypeDescriptionDefault
pii.entitiesarrayList of PII entity types to detect and block[]

Credentials

ParameterTypeDescription
credentials.base_urlstringNeuralTrust API base URL
credentials.tokenstringAPI 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

  1. Prevent Indirect Prompt Injection: Block malicious content from external URLs
  2. Data Exposure Prevention: Detect PII in linked documents and pages
  3. Compliance: Audit external content accessed by AI applications
  4. Security Monitoring: Track all external URLs referenced in requests