What Can You Build With SendSafely Actions? A HAR Sanitizer Proof of Concept

HAR Sanitizer - Large

Support teams commonly request HAR files from customers while troubleshooting integration issues. Accepting and processing HAR files is a risky activity for both you and your customers, as we outline in our earlier blog: Debug Files (aka. The HAR File Problem): Why Your Support Process Is a Liability to Your Customers' Security.

The HAR file problem needed a solution, so we explored what one could look like using SendSafely Actions. As a proof of concept, we built an Action that combines SendSafely’s end-to-end encrypted file exchange with automated HAR sanitization. It demonstrates how Actions can transform sensitive files before they enter downstream support systems, removing exposed credentials while preserving the technical information engineers need to troubleshoot.

The HAR Sanitizer POC illustrates the broader possibilities of SendSafely Actions: organizations can introduce their own processing and security controls into sensitive-data workflows without exposing unencrypted content to SendSafely.

Why This Matters Now More Than Ever

HAR files, and related debug files, have always been very problematic from a security perspective. They can contain live session cookies, OAuth and JWT bearer tokens, API keys, client secrets, and SAML assertions—all keys to a customer's applications and/or environments. By requesting and receiving these files, you now have a duty of care to protect the secrets they contain.

In this new world of AI-driven support, the number of actors that can find and use those credentials has greatly increased, along with the speed with which they can be utilized. Unprotected HAR files could provide any AI agent acting within your support pipeline the potential ability to log into your customers' environments to “help”. This includes your own AI agents, as well as your vendors’.

The bottom line is that no AI agent your company uses, either directly or indirectly, should ever have access to customer credentials, even if that access came indirectly through a customer-supplied debug HAR file. AI agents can be manipulated, or can simply decide on their own to operate outside their intended parameters.

Any AI tied to your service that can log into your customers' systems creates real legal liability for you and real risk for your customers. For a sobering read of what AI agents are capable of, review both the Technical Incident and METR reports regarding the recent “Hugging Face Incident”.

How Our The Action Works

For this proof of concept, we created a SendSafely Action that invokes sanitization logic based on Cloudflare's excellent open-source har-sanitizer project. The example demonstrates how an Action can automatically process a .har file contained within a received SendSafely package and scrub sensitive values before the sanitized copy reaches its intended recipient. It strips things like Authorization headers, access and ID tokens, client secrets, passwords, refresh tokens, session cookies, JWTs, and SAML assertions before the file ever lands in front of a recipient.

In this implementation, when a .har file is uploaded to SendSafely, the Action intercepts it, checks it against a built-in list of sensitive keys, and replaces each matched value with a label identifying what was removed, e.g., “[Authorization redacted].” Cookie values are cleared while cookie names are preserved, so a stolen session can never be replayed, but engineers can still see what was set. JWTs keep their decodable header and payload, and only the signature is stripped (eyJhbGci...eyJzdWIi...redacted), so the token can still be inspected but never replayed. The workflow is configured to delete the original file and deliver only the sanitized copy, so raw credentials never enter the support ecosystem. Anything that isn't a HAR file is skipped silently, with no effect on any other files in the package.

That labeling approach is the detail that makes this useful rather than just safe: every placeholder explains exactly what kind of credential was on a given request, and JWTs keep their decodable payload, so engineers can still confirm that they're looking at the right user and session without ever holding a value they could actually exploit. This preserves the information engineers need for debugging.

This proof of concept is designed to run within a customer-managed environment using an AWS Lambda function invoked by SendSafely Actions. The example does not send file contents to a separate sanitization service; processing occurs inside that function. Because the implementation incorporates an external open-source project, organizations adapting this example would be responsible for evaluating, deploying, maintaining, and updating that component within their own environment.

Beyond HAR Files: What Else Can Actions Do?

HAR sanitization is only one example of what can be built with SendSafely Actions. Actions give organizations a framework for applying their own automated controls to sensitive-data workflows—for example, inspecting file types, transforming content, enforcing internal policies, routing packages, or removing information that should never reach a downstream system.

The purpose of this proof of concept is to demonstrate a larger idea: when sensitive information moves through a support workflow, organizations should be able to protect and process it before it reaches ticketing systems, AI agents, third-party platforms, or employees who do not need access to the raw data.

HAR files make that need particularly clear. They routinely contain credentials capable of granting access to customer environments, yet many organizations still handle them like ordinary attachments. SendSafely provides the secure exchange layer, while Actions make it possible to extend that protection with controls tailored to each organization’s workflows and risk profile.

Handling HAR files securely matters both for your company's legal risk and for your customers' security. Support ticketing and case management platforms simply aren't built to hold sensitive information like HAR files. In addition to introducing your own safeguards with SendSafely Actions, consider these additional controls:

  • If you're using an AI chat agent, use Halo. SendSafely Halo is designed specifically to allow you to utilize the benefits of AI support without exposing your customers’ sensitive data.
  • Automated expiration and deletion of sensitive data is one of the best, yet most often overlooked, security controls an organization can use to protect itself and its customers from future incidents. Files received through any SendSafely feature or integration, including Halo, inherit whatever expiration and deletion settings you've configured to meet your requirements.