Secrets Detection
PasteGuard detects secrets before PII detection and can block, redact, or route requests containing sensitive credentials.Supported Secret Types
Private Keys (enabled by default)
| Type | Pattern |
|---|---|
OPENSSH_PRIVATE_KEY | -----BEGIN OPENSSH PRIVATE KEY----- |
PEM_PRIVATE_KEY | -----BEGIN RSA PRIVATE KEY-----, etc. |
API Keys (opt-in)
| Type | Pattern |
|---|---|
API_KEY_OPENAI | sk-... (48+ chars) |
API_KEY_AWS | AKIA... (20 chars) |
API_KEY_GITHUB | ghp_..., gho_..., ghu_..., ghs_..., ghr_... (40+ chars) |
Tokens (opt-in)
| Type | Pattern |
|---|---|
JWT_TOKEN | eyJ... (three base64 segments) |
BEARER_TOKEN | Bearer ... (40+ char tokens) |
Actions
| Action | Description |
|---|---|
redact | Replace secrets with placeholders, restore in response (default) |
block | Return HTTP 400, request never reaches LLM |
route_local | Route to local LLM (requires route mode) |