China Export Controls

Start with controls for export-regulated content, data sovereignty, state secrets and sensitive AI interactions in China.

Industry starter · Sovereign region

What it checks

Policies in the China Export Controls template, in the order the gateway runs them
PolicyOnChecksAction
prompt-injectionRequest4 attack patterns; similarity threshold 0.90Block
rbacRequestRequires the X-User-ID, X-Org-ID, X-PRC-Region and X-Export-License-Profile headersBlock
entity-list-filterRequest6 listed entities such as “Lockheed Martin” and “Raytheon Missiles & Defense”; near-miss spellingsBlock
dual-use-filterRequest9 blocked terms such as “satellite remote sensing payload” and “laser gyro”; near-miss spellingsBlock
pii-detectorRequest7 custom identifier patternsRedact
dlp-filterRequest12 blocked terms such as “绝密” and “机密”; 6 custom patterns; near-miss spellingsBlock
agent-firewallBothAllows 1 tool; denies 7 tools; at most 2 actions per sessionBlock
safety-filterRequestBuilt-in government patterns; 6 extra blocked phrases such as “Taiwan independence” and “Xinjiang independence”; near-miss spellingsBlock
language-validatorBothAllowed languages: zh, enBlock
data-routing-policyRequestZero-data-retention providers only; providers that do not train on dataBlock
quality-scorerResponseAccuracy ≥ 0.94; relevancy ≥ 0.92; combined score ≥ 0.93; at least 250 characters and 3 sentences; china-export-control profileBlock
audit-loggerRequestAdds an allow-only audit marker to the decisionRecord
Policy YAML
pack:
  id: "cfg_demo_china_export_controls"
  name: "demo-china-export-controls"
  version: "0.2.0"
  enabled: true
  author: "local"
  description: "PRC export-control, data-sovereignty, and politically sensitive content governance template"
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", "entity-list-filter", "dual-use-filter", "pii-detector", "dlp-filter", "agent-firewall", "safety-filter", "language-validator", "data-routing-policy", "quality-scorer", "audit-logger"]

policy:
  prompt-injection:
    embedding_threshold: 0.90
    attack_patterns: ["ignore.*regulatory.*constraints", "bypass.*cross-border.*rules", "reveal.*state.*secret", "disable.*content.*controls"]
    response: { action: block, message: "Prompt rejected by China export-control guardrails.", log_level: warn }
  # Export, customs, and regional authority context must be present before controlled-content handling.
  rbac:
    deny_if_missing: ["X-User-ID", "X-Org-ID", "X-PRC-Region", "X-Export-License-Profile"]
  # Unreliable Entity List and restricted counterparties relevant to PRC export-control screening.
  entity-list-filter:
    blocked_entities: ["Lockheed Martin", "Raytheon Missiles & Defense", "Anduril Industries", "General Atomics Aeronautical Systems", "Skydio", "Boeing Defense, Space & Security"]
    action: block
    fuzzy_matching: true
    max_distance: 1
  # PRC dual-use catalog categories: aerospace, encryption, advanced materials, navigation, sensing, and high-performance computing.
  dual-use-filter:
    blocked_terms: ["satellite remote sensing payload", "laser gyro", "high-performance computing cluster", "advanced composite material", "drone propulsion system", "encryption appliance", "synthetic aperture radar", "missile telemetry", "marine inertial navigation"]
    action: block
    fuzzy_matching: true
    max_distance: 1
  pii-detector:
    detect_patterns: ["(?i)(?:resident\\s+identity\\s+card|id\\s+card)\\s*(?:#|number)?\\s*[:#-]?\\s*[A-Z0-9-]{15,18}", "(?i)\\bpassport\\s*(?:#|number|no\\.)?\\s*[:#-]?\\s*[A-Z0-9-]{6,12}", "(?i)\\bunified\\s+social\\s+credit\\s+code\\s*[:#-]?\\s*[0-9A-Z]{18}\\b", "(?i)\\bcustoms\\s+(?:registration|entry|declaration)\\s*[:#-]?\\s*[A-Z0-9-]{4,20}", "(?i)\\bmilitary\\s+unit\\s*(?:id|identifier|designator)?\\s*[:#-]?\\s*[A-Z0-9-]{4,20}", "(?i)\\bexport\\s+license\\s*(?:#|number)?\\s*[:#-]?\\s*[A-Z0-9-]{4,20}", "(?i)\\b(?:contact|call|duty)\\s+roster\\b"]
    action: redact
    redaction: { marker_format: label, include_metadata: true, preserve_length: false }
  # State Secrets Law / Data Security Law / military-civil fusion controls: block sensitive labels and transfer context.
  dlp-filter:
    blocked_terms: ["绝密", "机密", "秘密", "国家秘密", "内部资料", "不得外传", "涉密", "军民融合", "装备采购", "战备值班", "涉台", "跨境传输"]
    detect_patterns: ["重要数据", "出口管制许可证", "国防科研", "保密审查", "军工单位", "对外提供数据"]
    action: block
    fuzzy_matching: true
    max_distance: 1
    sensitivity_level: restricted
  # Extremely restrictive execution posture: only internal regulatory and knowledge lookup tools are allowed.
  agent-firewall:
    allowed_tools: ["regulation_lookup"]
    blocked_tools: ["shell", "browser", "file_upload_external", "code_exec", "network_scan", "external_api", "database_write"]
    max_actions_per_session: 2
  # Politically sensitive and prohibited-content phrases are blocked before generation continues.
  safety-filter:
    mode: government
    block_if: ["Taiwan independence", "Xinjiang independence", "free Tibet", "separatist movement", "evade censorship controls", "bypass state secrets review"]
    action: block
    fuzzy_matching: true
    max_distance: 1
  language-validator:
    allowed_languages: ["zh", "en"]
    min_confidence: 0.80
    action: block
    apply_to: input
  # Data must remain within approved domestic routing paths with zero retention and no training use.
  data-routing-policy:
    require_zero_data_retention: true
    require_no_training: true
    on_no_compliant_provider: block
    log_provider_selection: true
  quality-scorer:
    industry: china-export-control
    min_output_chars: 250
    min_sentences: 3
    benchmarks: { ragas_faithfulness: true, ragas_relevancy: true, coherence: true, completeness: true }
    thresholds: { min_aggregate: 0.93, min_faithfulness: 0.94, min_relevancy: 0.92, min_coherence: 0.91, min_completeness: 0.90, min_accuracy: 0.94 }
    failure_action: { action: block, fallback_message: "Response withheld pending compliance and state-secrets review." }
  audit-logger: {}

providers:
  targets:
    - id: "cn-approved-proxy-primary"
      provider: "openai"
      model: "gpt-5.4-mini"
      region: "cn-beijing"
      base_url: "https://llm-proxy.internal.example.cn"
      secret_key_ref: { env: "VERDICTAN_CN_PROXY_API_KEY" }
      data_policy:
        zero_data_retention: true
        training_opt_out: true
        allow_internet_egress: false
    - id: "cn-approved-proxy-fallback"
      provider: "openai"
      model: "gpt-4.1-mini"
      region: "cn-shanghai"
      base_url: "https://llm-fallback.internal.example.cn"
      secret_key_ref: { env: "VERDICTAN_CN_FALLBACK_API_KEY" }
      data_policy:
        zero_data_retention: true
        training_opt_out: true
        allow_internet_egress: false
  routing:
    strategy: "ordered"