# HAR File Forensics: Sanitize, Audit & Diff Network Traces

> Sanitizes and audits local .har HTTP Archive captures offline, returning secret-free HAR files, p50/p95/p99 waterfall forensics, security leak findings, and release regression diffs.

HAR File Forensics: Sanitize, Audit & Diff Network Traces is a paid AI agent skill on Agensi by ClumsyMoney, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9 (one-time purchase)
- Creator: [ClumsyMoney](https://www.agensi.io/creators/clumsymoney)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-12-02
- Security: scan passed (2026-12-02); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/har-file-forensics-sanitize-audit-diff-network-traces
- Tags: testing-debugging, security, frontend-web-apps, coding, automation

## About this skill

Stop fighting 50 MB browser `.har` files that overflow LLM context windows and leak live session cookies.

**HAR File Forensics** gives your AI agent a deterministic, 100% offline Python 3.9+ toolkit to sanitize, audit, and diff W3C HAR 1.2 network captures from Chrome DevTools, Firefox, Safari, Charles, and Proxyman—with zero pip installs, zero API keys, and zero network calls.

### What It Does
- **8-Vector DevTools-Safe Sanitizer (`har_sanitize.py`)**: Scrubs `Authorization`, `Cookie`, `Set-Cookie`, `X-API-Key`, OAuth query/redirect tokens (rewriting `queryString[]`, `request.url`, and `redirectURL` in lockstep), JSON/form `postData`, base64-encoded response bodies, and `_initiator` URLs using deterministic pseudonymous hashes (`[REDACTED:HEADER:a1b2c3]`) so session correlation survives without leaking credentials. Supports `--strip-bodies` for monster 50+ MB SPA captures.
- **Waterfall Performance & Security Auditor (`har_audit.py`)**: Computes exact `p50`/`p95`/`p99` timings (properly handling HAR 1.2 `-1` sentinels and avoiding `ssl`-inside-`connect` double-counting), wire transfer weight via the Chrome `_transferSize` cascade, uncompressed compressible payloads (`>= 1.4 KiB` while skipping binary `webp`/`woff2`/`png`), `Cache-Control`/`immutable` gaps, uncached CORS `OPTIONS` preflights (`Access-Control-Max-Age`), redirect chains, duplicate calls, `status: 0` aborted requests, mixed content, and `Set-Cookie` flag flaws (`Secure`, `HttpOnly`, `SameSite`, `__Host-`/`__Secure-`). Automatically detects Chrome 130+ pre-sanitized exports.
- **Release-to-Release HAR Regression Differ (`har_diff.py`)**: Normalizes dynamic URLs (`/users/12345` -> `/users/:id`, UUIDs, hex hashes, fingerprinted bundles) to compare baseline vs. candidate captures for `p50`/`p95` latency regressions, payload bloat, new `4xx`/`5xx` errors, and newly added third-party hosts—with CI exit codes (`--max-p95-delta-ms`, `--fail-on-new-5xx`).

## Requires

- Python 3.9+

## Known limitations

Operates exclusively on W3C HAR 1.2 JSON captures (.har); does not parse binary Wireshark .pcap/.pcapng files or run live remote Lighthouse crawls. Chrome 130+ exports that stripped sensitive headers at capture time cannot be audited for missing Set-Cookie security flags (an informational notice is emitted).

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the HAR File Forensics: Sanitize, Audit & Diff Network Traces skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Does this skill upload my HAR captures or session cookies to any external server?

No. All three scripts run 100% offline using Python 3.9+ standard library only. Zero network requests, zero pip installs, and zero raw tokens are printed to stdout.

### Will sanitized HAR files still open cleanly in Chrome DevTools or Firefox?

Yes. har_sanitize.py parses and re-serializes valid W3C HAR 1.2 JSON, preserving all timing phases, status codes, and schema structure while replacing credentials with deterministic pseudonymous hashes.

### Which HAR exporters are supported?

Chrome DevTools (including Chrome 130+ pre-sanitized export detection and _transferSize), Firefox, Safari, Charles Proxy, and Proxyman—handling UTF-8 BOMs, empty pages[] arrays, and floating-point timings automatically.

### Does this work on Wireshark .pcap files?

No. This toolkit is purpose-built for W3C HAR 1.2 HTTP Archive (.har) JSON captures, not binary L3/L4 .pcap/.pcapng packet captures.

### What do I need installed to run it?

Only Python 3.9 or newer. No Node.js, Lighthouse, or third-party Python packages are required.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
