Defense (U.S.)

Map controls for export-regulated and controlled defense data, access, human review and retention.

Industry starter · Sovereign region

What it checks

Policies in the Defense (U.S.) template, in the order the gateway runs them
PolicyOnChecksAction
prompt-injectionRequest5 attack patterns; similarity threshold 0.88Block
rbacRequestRequires the X-User-ID, X-Org-ID, X-Clearance-Level and X-Program-ID headersBlock
itar-ear-filterRequest10 blocked terms such as “defense article” and “defense service”; near-miss spellingsBlock
entity-list-filterRequest6 listed entities such as “Rosoboronexport” and “Almaz-Antey”; near-miss spellingsBlock
pii-detectorRequest7 custom identifier patternsRedact
dlp-filterRequest10 blocked terms such as “classified” and “secret”; 6 custom patterns; near-miss spellingsBlock
data-routing-policyRequestZero-data-retention providers only; providers that do not train on dataBlock
agent-firewallBothAllows 1 tool; denies 7 tools; at most 2 actions per sessionBlock
safety-filterRequestBuilt-in military patterns; 6 extra blocked phrases such as “disable rules of engagement” and “bypass positive identification”; near-miss spellingsBlock
code-sanitizerBoth8 extra code patternsBlock
citation-verifierResponseRequires cited sources; confidence ≥ 0.97; groundedness ≥ 0.96Block
quality-scorerResponseAccuracy ≥ 0.96; relevancy ≥ 0.94; combined score ≥ 0.94; at least 400 characters and 4 sentences; defense profileBlock
audit-loggerRequestAdds an allow-only audit marker to the decisionRecord
Policy YAML
pack:
  id: "cfg_demo_defense_us"
  name: "demo-defense-us"
  version: "0.2.0"
  enabled: true
  author: "local"
  description: "US defense and intelligence guardrails for ITAR/EAR, CUI, and controlled data routing"
history:
  capture:
    enabled: true
    mode: redacted
    include_blocked: true
    fail_open: false
policies:
  chain: ["prompt-injection", "rbac", "itar-ear-filter", "entity-list-filter", "pii-detector", "dlp-filter", "data-routing-policy", "agent-firewall", "safety-filter", "code-sanitizer", "citation-verifier", "quality-scorer", "audit-logger"]

policy:
  prompt-injection:
    embedding_threshold: 0.88
    attack_patterns: ["ignore.*chain.*of.*command", "reveal.*system.*prompt", "disable.*safety.*controls", "bypass.*classification.*rules", "pretend.*you.*bypass.*network.*controls"]
    response: { action: block, message: "Prompt rejected by defense prompt-injection controls.", log_level: warn }
  # NIST SP 800-53 AC-2 / AC-3: identity, organization, clearance, and program need-to-know are mandatory.
  rbac:
    deny_if_missing: ["X-User-ID", "X-Org-ID", "X-Clearance-Level", "X-Program-ID"]
  # ITAR / EAR: block defense articles, defense services, technical data, spacecraft, and military electronics markers.
  itar-ear-filter:
    action: block
    fuzzy_matching: true
    max_distance: 1
    blocked_terms: ["defense article", "defense service", "technical data", "USML Category XI", "missile guidance", "fire control radar", "spacecraft telemetry encryption", "military electronics", "controlled technical data", "ECCN 9A610"]
  # OFAC SDN, BIS Entity List, Denied Persons, and DDTC Debarred Parties screening.
  entity-list-filter:
    blocked_entities: ["Rosoboronexport", "Almaz-Antey", "Poly Technologies", "Iran Aircraft Manufacturing Industrial Company", "NPO Mashinostroyenia", "Aviation Industry Corporation of China"]
    action: block
    fuzzy_matching: true
    max_distance: 1
  pii-detector:
    detect_patterns: ["(?i)\\bpersonnel\\s+security\\s+number\\s*[:#-]?\\s*[A-Z0-9-]{4,20}", "(?i)(?:dod\\s*id|edipi)\\s*[:#-]?\\s*\\d{10}\\b", "(?i)\\bpassport\\s*(?:#|number|no\\.)?\\s*[:#-]?\\s*[A-Z0-9-]{6,12}", "(?i)\\bclearance\\s+adjudication\\b", "(?i)(?:badge|operator)\\s*(?:id|#|number)\\s*[:#-]?\\s*[A-Z0-9-]{4,16}", "(?i)\\bmission\\s+contact\\s+roster\\b", "(?i)\\btravel\\s+briefing\\b"]
    action: redact
    redaction: { marker_format: label, include_metadata: true, preserve_length: false }
  # DoDI 5200.48 / CUI Registry / NOFORN handling: block classification markers and controlled technical context.
  dlp-filter:
    blocked_terms: ["classified", "secret", "top_secret", "SCI", "SAP", "NOFORN", "ORCON", "controlled_technical_data", "FOUO", "CUI"]
    detect_patterns: ["(?i)\\btarget\\s+package\\b", "(?i)\\bstrike\\s+window\\b", "(?i)\\bbattle\\s+damage\\s+assessment\\b", "(?i)\\bcrypto\\s*[-\\s]?fill\\b", "(?i)\\bemission\\s+control\\s+plan\\b", "(?i)\\bspecial\\s+access\\s+program\\b"]
    action: block
    fuzzy_matching: true
    max_distance: 1
    sensitivity_level: restricted
  # FedRAMP High / IL5-style routing: only zero-retention, no-training approved proxies may be used.
  data-routing-policy:
    require_zero_data_retention: true
    require_no_training: true
    on_no_compliant_provider: block
    log_provider_selection: true
  # Least privilege for agentic actions: only read-only knowledge retrieval is allowed; all other tools are denied.
  agent-firewall:
    allowed_tools: ["document_search"]
    blocked_tools: ["shell", "code_exec", "file_upload_external", "web_request", "database_write", "network_scan", "system_prompt_dump"]
    max_actions_per_session: 2
  # DoD Directive 3000.09 / commander’s intent: block attempts to override human approval or battlefield safeguards.
  safety-filter:
    mode: military
    block_if: ["disable rules of engagement", "bypass positive identification", "ignore no-strike list", "override weapons safety", "launch without commander approval", "autonomous lethal action"]
    action: block
    fuzzy_matching: true
    max_distance: 1
  # Block code that enables device control, exfiltration, or unsafe military-system interfacing.
  code-sanitizer:
    enabled: true
    block_on_match: true
    additional_patterns: ["import\\s+pymodbus", "write_register\\(", "MIL-STD-1553", "socketcan", "scapy", "uav_control", "fire_control_loop", "169\\.254\\.169\\.254"]
  citation-verifier:
    require_sources: true
    require_source_match: true
    min_confidence: 0.97
    min_groundedness: 0.96
    extract_patterns: ["quote", "statistic", "url"]
    output_action: { unverified_action: block, hallucination_action: block }
    response: { include_verification_report: true }
  quality-scorer:
    industry: defense
    min_output_chars: 400
    min_sentences: 4
    benchmarks: { ragas_faithfulness: true, ragas_relevancy: true, coherence: true, completeness: true }
    thresholds: { min_aggregate: 0.94, min_faithfulness: 0.96, min_relevancy: 0.94, min_coherence: 0.93, min_completeness: 0.93, min_accuracy: 0.96 }
    weights: { faithfulness: 0.30, relevancy: 0.20, coherence: 0.15, completeness: 0.15, accuracy: 0.20 }
    failure_action: { action: block, fallback_message: "Response withheld pending cleared analyst review." }
  # DoD records schedules and FOIA preservation rely on immutable, long-lived audit trails.
  audit-logger: {}

providers:
  targets:
    - id: "defense-approved-proxy"
      provider: "openai"
      model: "gpt-5.4-mini"
      region: "us-gov-west-1"
      base_url: "https://defense-proxy.internal.example.mil"
      secret_key_ref:
        env: "VERDICTAN_DEFENSE_PROXY_API_KEY"
      data_policy:
        zero_data_retention: true
        training_opt_out: true
        allow_internet_egress: false
    - id: "defense-approved-claude"
      provider: "anthropic"
      provider_type: "anthropic"
      format: "anthropic"
      model: "claude-sonnet-4-20250514"
      region: "us-gov-east-1"
      base_url: "https://claude-proxy.internal.example.mil"
      secret_key_ref:
        env: "VERDICTAN_DEFENSE_CLAUDE_API_KEY"
      api_key_header: "x-api-key"
      api_key_prefix: ""
      data_policy:
        zero_data_retention: true
        training_opt_out: true
        allow_internet_egress: false
  routing:
    strategy: "ordered"