Critical Infrastructure
Control access to operational technology and industrial control systems while keeping people responsible for high-impact actions.
What it checks
| Policy | On | Checks | Action |
|---|---|---|---|
| prompt-injection | Request | 4 attack patterns; similarity threshold 0.87 | Block |
| rbac | Request | Requires the X-User-ID, X-Org-ID, X-Sector-Role and X-Facility-ID headers | Block |
| pii-detector | Request | 7 custom identifier patterns | Redact |
| dlp-filter | Request | 9 blocked terms such as “SCADA configuration” and “OT network diagram”; 8 custom patterns; near-miss spellings | Block |
| agent-firewall | Both | Allows 3 tools; denies 8 tools; at most 2 actions per session | Block |
| safety-filter | Request | Built-in critical infrastructure patterns; 9 extra blocked phrases such as “disable emergency shutdown” and “override safety interlock”; near-miss spellings | Block |
| bot-detector | Request | More than 6 similar requests in 300 seconds; similarity ≥ 0.90 | Block |
| code-sanitizer | Both | 8 extra code patterns | Block |
| quality-scorer | Response | Accuracy ≥ 0.95; relevancy ≥ 0.93; combined score ≥ 0.94; at least 250 characters and 3 sentences; critical-infrastructure profile | Block |
| audit-logger | Request | Adds an allow-only audit marker to the decision | Record |
Policy YAML
pack:
id: "cfg_demo_critical_infrastructure"
name: "demo-critical-infrastructure"
version: "0.2.0"
enabled: true
author: "local"
description: "Critical infrastructure template for OT-safe AI assistance with restricted agent actions and operational data controls"
distributed_rate_limit:
backend: valkey
url_env: VERDICTAN_REDIS_URL
history:
capture:
enabled: true
mode: redacted
include_blocked: true
fail_open: false
policies:
chain: ["prompt-injection", "rbac", "pii-detector", "dlp-filter", "agent-firewall", "safety-filter", "bot-detector", "code-sanitizer", "quality-scorer", "audit-logger"]
policy:
prompt-injection:
embedding_threshold: 0.87
attack_patterns: ["ignore.*operating.*limits", "disable.*safety.*interlock", "reveal.*network.*topology", "bypass.*operator.*approval"]
response: { action: block, message: "Prompt rejected by critical infrastructure safety controls.", log_level: warn }
# Sector operators must identify user, owning organization, role, and facility before any action support is given.
rbac:
deny_if_missing: ["X-User-ID", "X-Org-ID", "X-Sector-Role", "X-Facility-ID"]
pii-detector:
detect_patterns: ["(?i)(?:operator|badge)\\s*(?:id|#|number)\\s*[:#-]?\\s*[A-Z0-9-]{4,16}", "(?i)\\bvendor\\s+contact\\s*[:#-]?\\s*[A-Za-z0-9 ,()+-]{6,80}", "(?i)(?:shift|crew|duty)\\s+roster\\b", "(?i)(?:maintenance|hotline|on[-\\s]?call)\\s*(?:phone|line|#)?\\s*[:#-]?\\s*(?:\\+?\\d[\\d\\s().-]{7,}\\d)", "(?i)(?:access|proximity|badge)\\s*card\\s*(?:#|number|no\\.)?\\s*[:#-]?\\s*[A-Z0-9-]{4,20}", "(?i)\\bservice\\s+account\\s*[:#=]?\\s*[A-Za-z0-9_.@-]{3,64}", "(?i)\\bincident\\s+reporter\\s*[:#-]?\\s*[A-Za-z ,'-]{3,80}"]
action: redact
redaction: { marker_format: label, include_metadata: true, preserve_length: false }
# NIST SP 800-82 / NERC CIP / ICS hardening: block OT topology, SCADA config, and blueprint leakage.
dlp-filter:
blocked_terms: ["SCADA configuration", "OT network diagram", "facility blueprint", "PLC ladder logic", "relay setting file", "substation one-line", "HMI admin password", "historian connection string", "safety instrumented system"]
detect_patterns: ["ModbusTcpClient", "opc\\.tcp://", "(?i)\\bdnp3\\b", "(?i)\\bwrite_coil\\s*\\(", "(?i)\\bwrite_register\\s*\\(", "(?i)\\bengineering\\s+workstation\\b", "(?i)\\bvalve\\s+position\\s+setpoint\\b", "(?i)\\bbreaker\\s+trip\\s+command\\b"]
action: block
fuzzy_matching: true
max_distance: 1
sensitivity_level: restricted
# Only non-actuating support tools are allowed; anything capable of direct control or scanning is blocked.
agent-firewall:
allowed_tools: ["runbook_search", "ticket_create", "status_check"]
blocked_tools: ["shell", "network_scan", "file_upload_external", "web_request", "ssh_exec", "plc_write", "relay_trip", "valve_control"]
max_actions_per_session: 2
safety-filter:
mode: critical_infrastructure
block_if: ["disable emergency shutdown", "override safety interlock", "bypass protection relay", "force valve open without permit", "disable alarm annunciation", "skip lockout tagout", "ignore pressure trip", "shed load without dispatcher approval", "disable chlorine feed safeguard"]
action: block
fuzzy_matching: true
max_distance: 1
# Detect repeated probing and scripted abuse against OT-support AI surfaces.
bot-detector:
fingerprint_fields: ["user-agent", "x-forwarded-for", "authorization", "body"]
profile_window_seconds: 300
similarity_threshold: 0.90
max_requests_per_window: 6
action: block
# Block ICS/SCADA code or commands that could enable direct actuation or unsafe reconfiguration.
code-sanitizer:
enabled: true
block_on_match: true
additional_patterns: ["ModbusTcpClient", "write_coil\\(", "write_register\\(", "S7Client\\.ConnectTo", "opc\\.tcp://", "dnp3", "systemctl\\s+stop", "relay_trip_command"]
quality-scorer:
industry: critical-infrastructure
min_output_chars: 250
min_sentences: 3
benchmarks: { ragas_faithfulness: true, ragas_relevancy: true, coherence: true, completeness: true }
thresholds: { min_aggregate: 0.94, min_faithfulness: 0.95, min_relevancy: 0.93, min_coherence: 0.92, min_completeness: 0.92, min_accuracy: 0.95 }
failure_action: { action: block, fallback_message: "Response withheld pending operator review." }
audit-logger: {}