Calendar Icon White
October 29, 2026
Clock Icon
5
 min read

How to Detect and Secure Sensitive Data in HAR Files?

Find and redact session tokens, API keys, and PII in HAR files across support tickets, Slack, AI chat tools, and MCP agents. A 2026 guide with a checklist.

How to Detect and Secure Sensitive Data in HAR Files?
ChatGPT
Perplexity
Grok
Google AI
Claude
Summarize and analyze this article with:

TL;DR

  • A HAR file is a full recording of a browser session. It can hold session cookies, bearer tokens, API keys, and customer PII in plain text.
  • In 2023, attackers pulled HAR files out of Okta's support system and used the session tokens inside them to hijack sessions at 1Password, BeyondTrust, and Cloudflare.
  • In 2026 the problem is wider. HAR files sit in Zendesk tickets, Jira issues, Slack threads, and shared drives, and they now get pasted into AI chat tools or read directly by AI agents through MCP servers.
  • Manual cleanup and open source sanitizers help one file at a time. They do not find the HAR files already sitting in your systems, and they do not stop the next upload.
  • Strac scans HAR files where they land (support tools, collaboration apps, cloud storage), redacts secrets and PII from attachments, blocks raw HAR uploads into AI tools from the browser, and redacts the same data on MCP tool calls before it reaches an AI model.

What a HAR file is and why support teams ask for it

A HAR (HTTP Archive) file is a JSON log of every request and response a browser made while a page loaded. Support and engineering teams ask for one because it lets them replay exactly what the customer saw: the failing call, the slow endpoint, the redirect loop.

That is also what makes it risky. A HAR file does not record a summary of the session. It records the session itself, including whatever the browser sent to prove who the user was.

A typical HAR file contains:

  • log.entries[].request: URL, method, headers, cookies, query string, and the POST body
  • log.entries[].response: status, headers (including Set-Cookie), and often the full response body
  • timings and page data: load times, server IPs, and the order of every call

Some browsers now leave cookies and authorization headers out of the default export and require a separate setting to include them. That helps, but request bodies, query strings, and response payloads still come through, and many support guides tell customers to turn the full export on so the issue can be reproduced.

✨ What sensitive data lives inside a HAR file

The dangerous part of a HAR file is anything that lets someone act as the user without logging in. The second risk is customer data that rides along in request and response bodies.

Credentials and secrets

  • Session cookies and refresh tokens
  • Authorization headers with bearer tokens or JWTs
  • API keys passed in headers or query strings
  • OAuth codes and SAML assertions captured during a login redirect
  • Passwords submitted in a login form body

Customer and regulated data

  • Names, emails, phone numbers, and addresses returned by account or profile APIs
  • Card numbers or bank details in checkout and billing calls (PCI)
  • Patient and claims data in healthcare portals (PHI)
  • Government IDs, dates of birth, and SSNs in onboarding or KYC flows

Internal details

  • Internal hostnames, IP addresses, and API routes
  • Tenant IDs, account IDs, and feature flags

A single HAR file from an admin session can hold all three groups at once. That is the file most likely to be shared with a vendor when something breaks.

What the Okta support breach taught everyone

The clearest example of HAR file risk is still the 2023 Okta support system breach. An attacker used a stolen service account credential to get into Okta's support case system and had access from September 28 to October 17, 2023 (The Hacker News).

Inside the system were HAR files that customers had uploaded to support cases. Files tied to 134 customers were accessed, and the session tokens in those files were used to hijack the live Okta sessions of five customers, including 1Password, BeyondTrust, and Cloudflare (Dark Reading).

At 1Password, an IT team member had shared a HAR file with Okta support. The attacker later used the same Okta session that created that file to reach the Okta admin portal (Help Net Security).

Three lessons still hold in 2026:

  1. The support system is the target. Attackers did not need to break Okta's product. They went where customers had already dropped working credentials.
  2. A HAR file stays dangerous after the ticket closes. Until the tokens inside expire or get revoked, the file is a key.
  3. Telling customers to sanitize is not a control. Okta and Cloudflare both pushed sanitizing after the fact. The files that caused the damage were already uploaded.

Where HAR files end up in 2026

In 2023 the question was "what is sitting in our support tool?" In 2026 a HAR file can pass through five or six systems in a single afternoon, and two of them are new.

1. Support tickets. Customers attach HAR files to Zendesk, Intercom, Freshdesk, and Salesforce cases. Agents forward them to engineering.

2. Engineering trackers and chat. The same file gets re-attached to a Jira issue, dropped into a Slack channel, or linked from a Confluence page so the on-call engineer can look at it.

3. Shared drives and cloud storage. Files pile up in Google Drive, OneDrive, SharePoint, Box, and S3 buckets, often in folders shared with whole teams or vendors.

4. AI chat tools. This is the big change. An engineer who wants a fast answer uploads the raw HAR file to ChatGPT, Claude, Gemini, or Copilot and asks "why is this request failing?" Every cookie and token in the file goes with it.

5. AI agents through MCP. Coding agents now read browser traffic on their own. Google's Chrome DevTools MCP server lets an agent control Chrome and inspect network requests, and the Playwright MCP server lets agents read traces and network captures. The agent never exports a .har file, but it reads the same headers, cookies, and bodies, and they land straight in the model's context.

6. Endpoints. HAR files sit in Downloads folders, get copied to USB drives, and get re-uploaded from laptops long after the original ticket is closed.

A control that only watches one of these paths leaves the other five open.

Manual and open source sanitizing, and where it stops

Cleaning a HAR file before you share it is good practice, and there are decent free tools for it:

  • By hand: open the file in a text editor and remove cookies, Authorization headers, tokens, and personal fields.
  • Cloudflare's HAR File Sanitizer: released after the Okta breach to strip sensitive content before files go to support teams.
  • HARmor: an open source tool that scrubs cookies, passwords, auth headers, query parameters, and JSON body keys, and lets teams define their own rules.
  • Library and CLI sanitizers: projects such as the PHP har library added a sanitize command in 2026 for cleaning fixtures before they go into a repo.

These tools share the same limits:

  1. They depend on the sender. If the customer or engineer forgets, nothing happens.
  2. They match field names, not content. A token in an unusual header, or a card number deep in a response body, slips past a rule that only knows "Cookie" and "Authorization".
  3. They do nothing about files already stored. Years of HAR files in old tickets and shared folders stay exactly as they were.
  4. They do not see AI tools or agents. No sanitizer runs when someone drags a HAR file into a chat window or when an agent reads network traffic over MCP.

Sanitizing is a habit. Security teams also need a control that runs whether or not anyone remembers.

✨ How Strac finds and redacts sensitive data in HAR files

Strac covers every place a HAR file travels from one console: SaaS apps, cloud storage, the browser, the endpoint, and MCP connections used by AI agents. The same detection rules for PII, PHI, PCI data, and secrets apply on each path.

1. Find the HAR files you already have

Strac's data discovery (DSPM) connects to your SaaS and cloud apps by API and runs historical scans, so HAR files attached to tickets years ago show up next to the one uploaded this morning. Each finding shows which file it is in, what was detected, and who can see it.

Coverage includes 50+ integrations, among them Zendesk, Intercom, Salesforce, Jira, Confluence, Slack, Google Workspace, Microsoft 365, AWS, and Azure.

2. Redact HAR files in support tickets and attachments

Native ticket redaction in many support tools stops at comments or chat text. Strac reads the attachment itself. In Zendesk it continuously checks tickets, comments, and file attachments across 100+ file types, and in Jira it redacts sensitive data in issues and comments.

Teams that need the file during troubleshooting can use delayed redaction: Strac redacts after the ticket closes or after a set time window, so engineering gets the HAR file while the case is open and the tokens do not sit there forever.

3. Stop raw HAR files from reaching AI chat tools

The Strac browser extension checks text that is typed or pasted and files that are uploaded into ChatGPT, Claude, Gemini, Copilot, Perplexity, and other AI apps before anything is sent. When a HAR file carries tokens or PII, Strac can redact those values and let the rest through, warn the user, or block the upload.

It runs on Chrome, Edge, Firefox, and Safari, and rolls out through Chrome Enterprise, Edge policy, or your MDM. The Shadow AI dashboard also shows which AI tools people are using, so you can see where HAR files might be going. See browser DLP.

4. Redact network data before AI agents read it

When an agent reads browser traffic through an MCP server, there is no file to scan. Strac MCP DLP sits between the agent and the MCP server and checks every tool call. Credentials, PII, PHI, card data, and source code are redacted before the response reaches the model. It works with Claude, Cursor, ChatGPT, and custom agents. See Strac for the Playwright MCP server.

Strac also lists every MCP server and connected agent in use, including ones set up outside approved channels, and lets you allow or block which servers run. See shadow MCP.

5. Cover the laptop

Strac endpoint DLP covers the paths a HAR file takes once it is on a laptop: downloads, USB copies, printing, and other ways files leave the device.

6. Scan and redact by API

For internal tools and upload pipelines, the Strac redaction API takes a file, redacts the data elements you choose, and returns a clean copy. Teams use it to sanitize HAR files automatically at the point of upload. See redaction API.

7. Alerts and audit evidence

Every detection and redaction can go to the Strac dashboard, your SIEM, email, or Slack. Strac Comply turns that activity into evidence for SOC 2, HIPAA, PCI DSS, ISO 27001, and GDPR audits.

A HAR file policy checklist for security and support teams

Use this list to turn HAR handling from a habit into a policy.

  • Ask for a HAR file only when a screenshot, console log, or request ID will not do.
  • Send customers a short guide that uses the browser's default sanitized export, and explain when the full export is really needed.
  • Scan support tools, trackers, chat, and shared drives for existing HAR files, and redact or delete the ones that hold live secrets.
  • Turn on attachment redaction in your support stack, with delayed redaction if engineers need the file while the case is open.
  • Revoke or rotate any session, token, or API key found in a stored HAR file. Redaction removes the copy, not the risk of a copy that already left.
  • Block or redact HAR uploads into AI chat tools from the browser.
  • Route agent access to browser and DevTools data through an MCP layer that redacts credentials and PII.
  • Keep an inventory of the MCP servers your engineers run, and allow only approved ones.
  • Use short-lived, IP-bound sessions for admin accounts so a leaked token is less useful.
  • Send HAR detections to your SIEM or Slack so someone owns the follow-up.

Find the HAR files you already have

Most teams are surprised by how many HAR files are sitting in old tickets, Slack threads, and shared folders, and how many still hold working tokens. Book a 30-minute demo and Strac will scan a support or collaboration app you choose, show you the HAR files and secrets it finds, and walk through redaction on your own data.

Book a demo

🌶️ Spicy FAQ on Securing Sensitive Data in HAR Files

Is it safe to share a HAR file with a vendor's support team?

Only after the secrets are gone. Remove or redact cookies, Authorization headers, tokens, and personal data first, and assume the file will be stored in the vendor's ticketing system for a long time.

Does Chrome's sanitized HAR export solve the problem?

It helps. Leaving cookies and auth headers out by default removes the most dangerous values. Request bodies, query strings, and response payloads can still hold PII, card data, and API keys, and many users switch to the full export when support asks.

Can I upload a HAR file to ChatGPT or Claude to debug it?

Not a raw one. Uploading sends every token and personal field in the file to a third party. Strac's browser extension can redact those values before the upload, so the request structure and errors still go through for debugging.

What about AI agents that read network traffic directly?

Agents using the Chrome DevTools or Playwright MCP servers read the same headers and bodies a HAR file contains, without ever creating a file. Strac MCP DLP redacts credentials and PII on those tool calls before the data reaches the model.

We already have years of HAR files in Zendesk and Jira. Where do we start?

Run a historical scan to find them, redact the ones holding live secrets or regulated data, and rotate any credentials you find. Then turn on ongoing redaction so new uploads are handled automatically.

Does redacting a HAR file break troubleshooting?

No. Strac replaces only the sensitive values, so URLs, status codes, timings, and request order stay intact. With delayed redaction, engineers can work with the original file until the ticket closes.

Which compliance rules apply to HAR files?

Any that cover the data inside them. A HAR file with card numbers falls under PCI DSS, one with patient data falls under HIPAA, and one with EU customer data falls under GDPR. Auditors for SOC 2 and ISO 27001 increasingly ask how support attachments and AI tools are controlled.

Customer story

“Don’t just alert on problems, fix them.”

Scott Roberts, Chief Information Security Officer, UiPath

  • UiPath
  • Crypto.com
  • Inmar Intelligence
  • thredUP
  • Paymentology
  • Enveda
  • Genesis Molecular AI
  • MeridianLink
More customer stories →
Discover & Protect Data on SaaS, AI, MCP, Endpoints & Cloud
Strac provides end-to-end data loss prevention for all SaaS and Cloud apps. Integrate in under 10 minutes and experience the benefits of live DLP scanning, live redaction, and a fortified SaaS environment.

Customers include

  • UiPath
  • Crypto.com
  • Inmar Intelligence
  • thredUP
  • Paymentology
  • Enveda
  • Genesis Molecular AI
  • MeridianLink
Trusted by enterprises
Data Security + Compliance Automation

Latest articles

Browse all

Get Your Datasheet

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Close Icon