Data Analytics
Protect personal data and secrets, constrain analytics tools, check output quality, require review and retain evidence.
What it checks
| Policy | On | Checks | Action |
|---|---|---|---|
| prompt-injection | Request | Detects jailbreak and prompt-injection signals | Block |
| pii-detector | Request | 2 custom identifier patterns | Redact |
| dlp-filter | Request | 3 blocked terms such as “private key” and “secret” | Block |
| agent-firewall | Both | Allows 1 tool; denies 3 tools | Block |
| tool-security | Request | Blocks unsafe tool definitions in the request | Block |
| quality-scorer | Response | Accuracy ≥ 0.80; relevancy ≥ 0.78; combined score ≥ 0.78; at least 120 characters and 2 sentences | Block |
| human-oversight | Response | No action is set, so it does not review responses | None |
| audit-logger | Request | Adds an allow-only audit marker to the decision | Record |
Policy YAML
pack:
id: "cfg_data_analytics"
name: "data-analytics"
version: "0.1.0"
enabled: true
author: "verdictan"
description: "Analytics controls for personal data, secrets, agent tools, output quality, and traceability."
policies:
chain:
- "prompt-injection"
- "pii-detector"
- "dlp-filter"
- "agent-firewall"
- "tool-security"
- "quality-scorer"
- "human-oversight"
- "audit-logger"
policy:
prompt-injection: {}
pii-detector:
action: redact
detect_patterns:
- "(?i)(?:api[_\\s-]?key|apikey)\\s*[:#=]?\\s*[A-Za-z0-9_\\-]{16,128}"
- "(?i)(?:session[_\\s-]?id|sid)\\s*[:#=]?\\s*[A-Za-z0-9\\-]{8,128}"
dlp-filter:
blocked_terms:
- "private key"
- "secret"
- "token"
action: block
agent-firewall:
allowed_tools:
- "document_search"
blocked_tools:
- "shell"
- "code_exec"
- "database_write"
tool-security:
analysis_mode: local
quality-scorer:
min_output_chars: 120
min_sentences: 2
thresholds:
min_aggregate: 0.78
min_relevancy: 0.78
min_accuracy: 0.80
weights:
relevancy: 0.5
accuracy: 0.5
human-oversight: {}
audit-logger: {}