-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
HAR Redaction / Sanitization (Phase 0 - MVP)
Summary
Add a robust, client-side HAR redaction/sanitization tool to Replin Inspect so users can safely share or archive HAR files without exposing sensitive tokens, cookies, headers, or large response bodies. All processing must be performed in-browser; no data egress.
Scope (high level)
- Phase 0 (MVP): UI panel + basic redaction pass (strip
AuthorizationandCookieheaders; truncate request/response bodies > 64KB to a short snippet plus metadata). Allow download of sanitized HAR and include a small manifest entry in the sanitized file. - Phase 1: Add pattern detectors (JWT, Bearer, API key heuristics), per-field JSON masking, query param redaction, preview evidence UI, and manifest detailing applied rules.
- Phase 2: Policy/rule import-export, streaming parsing for large HARs, enterprise presets and audit UI.
Why
HAR files commonly include sensitive data (cookies, auth headers, tokens, query params, response bodies). A built-in, client-side redaction flow will let support engineers create safe, shareable HAR files without leaving the browser.
What is considered sensitive (examples)
- Headers:
Authorization,Proxy-Authorization,X-Auth-Token,Cookie, and any header containingauthortoken. - Cookies: session cookies (
session,sid,auth,jwt), SSO cookies, CSRF tokens. - Query params:
api_key,token,access_token,secret,password,session_id. - Request/response bodies: fields named
password,token,secret,email,ssn, card numbers, or any PII. - Other metadata: internal hostnames, IPs,
referer/originrevealing internal flows.
Design & UX (summary)
- Add a Sanitize / Redact step into the upload flow (post-upload, pre-download).
- Modes: Safe (default) and Custom (advanced toggles).
- Preview: side-by-side sample of original vs redacted for a selected request.
- Manifest: embed a JSON manifest in the sanitized HAR listing applied rules and counts.
Acceptance criteria (MVP)
- Default Safe mode strips
AuthorizationandCookieheaders and truncates bodies > 64KB. - Download sanitized HAR locally; no network egress.
- Unit tests for header/cookie redaction and body truncation; one functional test verifying sanitized HAR lacks
Authorization/cookie values.
Implementation notes
- Deterministic rules (exact header/cookie names) + heuristic detectors (JWT, bearer tokens, API keys).
- Replace redacted values with placeholders (e.g.
<REDACTED: Authorization token>) and record evidence in manifest. - For large files, process in chunks and warn users about memory limits.
Phasing & next steps
- Create Phase 0 PR (
feat-redact-har-mox) implementing MVP safe mode. Include tests and QA steps. - After MVP merged, plan Phase 1 (pattern detectors, JSON masking, preview) with separate issue(s).
- Phase 2 enterprise features later.
I will draft the Phase 0 PR after you confirm. The PR will be small, low-risk, and fully client-side.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels