From: maximiliancw Date: Fri, 9 Jan 2026 12:33:47 +0000 (+0100) Subject: Add secrets_detection section to config.example.yaml X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=9462d0505bcb264054edf62d26ea1111cba003c3;p=sgasser-llm-shield.git Add secrets_detection section to config.example.yaml --- diff --git a/config.example.yaml b/config.example.yaml index 98fb32b..88327dc 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -89,6 +89,35 @@ pii_detection: # - MEDICAL_LICENSE # - URL +# Secrets Detection settings (Secrets Shield) +# Detects private keys and other secret credentials in requests +secrets_detection: + # Enable secrets detection (default: true) + enabled: true + + # Action to take when secrets are detected: + # block: Block the request with HTTP 422 (default, secure-by-default) + # redact: Replace secrets with placeholders and continue (irreversible) + # route_local: Route to local provider (only works in route mode) + action: block + + # Secret types to detect + entities: + - OPENSSH_PRIVATE_KEY # OpenSSH format: -----BEGIN OPENSSH PRIVATE KEY----- + - PEM_PRIVATE_KEY # PEM formats: RSA, PRIVATE KEY, ENCRYPTED PRIVATE KEY + + # Maximum characters to scan per request (performance limit) + # Set to 0 to scan entire request (not recommended for large payloads) + max_scan_chars: 200000 + + # Placeholder format for redaction (only used if action: redact) + # {N} will be replaced with sequential number + redact_placeholder: "" + + # Log detected secret types (never logs secret content) + # Even if logging.log_content is true, secret content is never logged + log_detected_types: true + # Logging settings logging: # SQLite database for request logs