Network Scrubber
Automatic redaction of auth headers, cookies, tokens, API keys, and sensitive parameters in network.har.
What `NetworkScrubber` redacts
- Sensitive headers (
SENSITIVE_HEADERS):Authorization(keeping scheme prefix, e.g.Bearer [REDACTED]),Proxy-Authorization,Cookie,Set-Cookie,X-API-Key/apikey/api-key,X-Auth-Token,X-CSRF-Token,X-XSRF-Token,token,secret, andsession. - Cookies: Every cookie value in HAR request and response
cookiesarrays is replaced with[REDACTED]. - Raw tokens & keys in text (
RAW_SENSITIVE_PATTERNS): Standard JWTs (ey...),Bearertokens, PEM private keys (-----BEGIN ... PRIVATE KEY-----), and API keys withsk-(OpenAI),ghp_(GitHub), orAIza(Google) prefixes. - Sensitive URL query params, form params & JSON keys (
SENSITIVE_PARAM_PATTERNS): Keys matchingtoken,api_key,secret,auth,password/passwd/pwd,session,jwt,access_token,refresh_token,id_token,cvv/cvc,card/credit_card,private_key,credential,passcode,pin, orssn/social_securityacross URLs,postData, and JSON/base64 response bodies.
Always-on & fail-closed
NetworkScrubber runs automatically on every captured HAR with built-in rules (no external configuration required). If HAR sanitization fails, LOKI drops the archive instead of writing an unscrubbed network.har.
