Reference

Configuration Reference

Complete reference for every key in guard_config.yaml. The file is hot-reloaded via POST /api/config — no restart needed.

Dev Developer tier   Biz Business tier   Ent Enterprise tier

global

Top-level system configuration.

Key Type Default Description
active_industry string general Sets context for industry-specific rails. Options: finance, healthcare, general
deployment_mode string active active blocks threats. passive logs only — useful for tuning before go-live.
audit_log_path string logs/compliance_audit.jsonl Path to the JSONL audit log file. Mount as Docker volume to persist.
project_name string — Display name shown in dashboard and logs.

security_rails

Core keyword-based protection against prompt injection and jailbreaks. Available on all tiers.

Key Type Description
system_prompt_protection.enabled bool Blocks phrases that attempt to extract or override the system prompt
system_prompt_protection.blocked_phrases list Default: ["ignore previous instructions", "system override", "reveal system prompt"]
jailbreak_detection.enabled bool Blocks known jailbreak patterns
jailbreak_detection.blocked_phrases list Default: ["dan mode", "do anything now", "disable safety"]. Add your own.
security_rails:
  system_prompt_protection:
    enabled: true
    blocked_phrases:
      - ignore previous instructions
      - reveal system prompt
  jailbreak_detection:
    enabled: true
    blocked_phrases:
      - dan mode
      - do anything now

input_rails

Core input processing — PII redaction and industry-specific keyword rules.

Key Type Description
pii_redaction.enabled bool Automatically redacts email, phone, credit card, and SSN patterns from prompts before sending to LLM
pii_redaction.normalize_text bool Normalises unicode before redaction
industry_rules.finance.restricted_keywords list Keywords that trigger a compliance block for finance-regulated roles
industry_rules.finance.canned_response string Message returned when a finance rule fires

input_rails_advanced Biz

Advanced evasion detection for obfuscation and encoding attacks.

Key Type Description
invisible_text.enabled bool Detects zero-width characters (U+200B etc.) used to hide injections
obfuscation.enabled bool Detects Base64-encoded payloads in prompts
gibberish.enabled bool Blocks high-entropy strings (fuzzing / DoS attempts)
gibberish.entropy_threshold float Default: 5.5. Shannon entropy limit. Higher = more permissive.
language_enforcement.enabled bool Restricts input to ASCII-dominant languages to prevent polyglot attacks

semantic_rails Biz

Vector-similarity matching against banned topics using a local all-MiniLM-L6-v2 model running on CPU. No external API calls.

Key Type Description
enabled bool Enables semantic matching engine
banned_topics list Natural language phrases. Any prompt semantically similar to these is blocked.
similarity_threshold float Cosine similarity cutoff (0.0–1.0). Default: 0.45. Lower = stricter.
model string Default: all-MiniLM-L6-v2. Model is cached after first load.
semantic_rails:
  enabled: true
  similarity_threshold: 0.45
  banned_topics:
    - hack
    - exploit
    - steal credentials
    - bypass firewall
    - exfiltrate data

output_rails Biz

Validates LLM responses before they reach your users.

Key Type Description
insecure_code_detection.enabled bool Blocks LLM responses containing dangerous function calls
insecure_code_detection.block_patterns list Default: ["eval(", "exec(", "os.system(", "subprocess.call"]
max_retries int Times to re-prompt the LLM if output is blocked. Default: 2
output_rails_advanced.code_secrets.enabled bool Scans LLM output for leaked API keys and secrets
output_rails_advanced.hallucination_check.enabled bool Flags responses with low semantic consistency vs. the original prompt
output_rails_advanced.hallucination_check.confidence_threshold float Default: 0.7. Responses below this cosine similarity score are flagged.

content_rails

Business-policy content controls.

Key Type Description
financial_advice.enabled bool Blocks prompts requesting stock picks or investment advice
medical_advice.enabled bool Blocks prompts requesting diagnosis or prescription advice
competitors.enabled bool Blocks mentions of specified competitor brand names
competitors.banned_brands list List of competitor brand names to block

rbac Biz

Role-based access control. Roles are passed as the role field in API requests.

rbac:
  enabled: true
  roles:
    executive:
      allow_finance: true
    user:
      allow_finance: false
    intern:
      allow_finance: false

multi_modal Biz

Controls for image, audio, and video scanning via POST /api/upload.

Key Type Description
image.scan_exif bool Blocks images containing GPS metadata (privacy risk)
multi_modal_advanced.image_nsfw.enabled bool Skin-tone heuristic NSFW detection on uploaded images
multi_modal_advanced.image_ocr.enabled bool OCR text extraction from images — scanned through all text rails
multi_modal_advanced.audio_deepfake.enabled bool Spectral analysis to detect AI-cloned/synthetic voices
multi_modal_advanced.audio_deepfake.block_on_detection bool If true, blocks audio when deepfake is suspected. If false, flags only.

canary

Canary token injection to detect system prompt leakage in LLM outputs.

canary:
  enabled: true
  token_prefix: INTERNAL_ID_
# A unique token is injected into each session's system prompt.
# If the LLM echoes it back in a response, a CRITICAL alert fires
# and the response is blocked immediately.