It happens to all of us. You’re debugging a tricky API error in Cursor, you copy a chunk of your .env file into the prompt to give the AI some context about your environment variables, and you hit send. A split second later you realise — your production AWS access key is sitting in a cloud prompt somewhere, stored on servers you don’t control, going through training pipelines you didn’t approve.

That gut-drop moment is more common than most developers want to admit. A survey by GitGuardian found that over 10 million hard-coded secrets were exposed in public repositories in 2024 alone — and that’s just the stuff that made it to GitHub. The secrets pasted into AI coding assistants are an invisible problem. There’s no database tracking those leaks, no breach notification, no way to know which model provider has a copy of your database URL or your GitHub token.
Enter HeimWall — a free macOS menu-bar app that catches secrets and PII before they ever leave your machine. It watches your AI prompts in real time, flags anything sensitive with deterministic regex rules, and stops the data from reaching the cloud. No account, no telemetry, no uploads. Just a 3.9 MB binary that sits in your menu bar and silently runs interference between you and the AI tool you’re typing into.
Why Every Developer Using AI Coding Tools Needs This
I’ve been using AI coding assistants daily for over a year now — Claude Code for backend work, Cursor for frontend prototyping, Copilot for quick inline completions. And I’ve come close to leaking secrets more times than I’m comfortable with. The problem isn’t malicious intent. It’s workflow friction.
You’re deep in a debugging session, copy-pasting logs and config files into the prompt to give the AI context. Your .env file is open in one tab, your terminal showing environment variables in another, and your browser has the production admin panel open. Any one of those tabs, copied at the wrong moment, can send a credential into a prompt you didn’t mean to share.
The AI coding assistant privacy audit I wrote about recently covers how to check which of your tools are uploading your code to the cloud. But auditing is reactive. HeimWall is proactive — it catches the secret as you type it, before the request reaches the network.
What Is HeimWall?
HeimWall is a free macOS application developed by a startup of the same name. It runs as a menu-bar agent and scans whatever you’re typing into AI tools — Cursor, Claude Code, GitHub Copilot — for credentials, secrets, and personally identifiable information (PII).
Here’s what makes it different from most security tools:
- 100% on-device. Everything runs locally. The prompt is captured, scanned, and flagged on your machine. No data ever leaves.
- No account. You don’t sign up, you don’t sign in. There’s nothing to create.
- No cloud dependency. Pull the network cable and it works exactly the same. The detection engine is entirely local.
- Tiny footprint. ~15 MB on disk, under 150 MB RAM at idle, written in Rust and Tauri.
- Free forever. The individual app is free. A paid team product exists but adds only management-layer features — the same detection engine powers both.
How It Works: Capture, Detect, Flag
HeimWall’s pipeline has three stages, all running on your machine in under 50 milliseconds:
Stage 1: Capture
HeimWall reads the prompt composer of your AI tool as you type. It uses macOS Accessibility permissions to observe the text input — the same mechanism that screen readers and automation tools use. Nothing leaves your machine at this stage; it’s reading pixels and text buffers locally.
Stage 2: Detect
The detection engine runs two systems in parallel:
- Deterministic regex rules — 25+ handwritten patterns for things with well-defined shapes: AWS access keys (AKIA…), GitHub personal access tokens (ghp_…), JSON Web Tokens (eyJ…), database connection strings (postgresql://user:pass@…), private SSH keys, and more. These are instant, explainable, and have zero false-positive ambiguity.
- On-device classifier — a small pretrained model that catches fuzzier patterns: PII like phone numbers, email addresses, and government ID numbers that don’t follow a single rigid template. The model runs entirely on your Mac’s Neural Engine or CPU — no GPU needed, no cloud round-trip.
Stage 3: Flag
When a match is found, HeimWall shows a soft toast notification at the top of your screen. The flagged text is redacted in the toast — you see “AWS Access Key ID: AKI*******”, not the full key. The raw bytes are dropped from memory immediately after the check. Nothing is stored, logged, or transmitted.
How to Install HeimWall on Your Mac
The installation process takes about two minutes:
- Download the app from heimwall.ai/individual. The current version is 0.0.5, 3.9 MB, signed and notarized by Apple. Apple Silicon only (M1 through M4), macOS 13 or later.
- Open the DMG and drag HeimWall into your Applications folder.
- Launch it. The first time you open it, macOS will prompt you to grant Accessibility permission. This is required so HeimWall can read the text input of your AI tools. Go to System Settings → Privacy & Security → Accessibility, and toggle HeimWall on.
- Verify it’s running. The menu-bar icon appears at the top of your screen. Click it and you should see “Protected” — meaning the agent is active and scanning.
Testing It: Watch a Fake Key Get Flagged
Once HeimWall is running, open Cursor (or Claude Code, or Copilot) and type the following into a new prompt:
Here's my database URL: postgresql://admin:[email protected]:5432/mydb
Before you can hit send, HeimWall should flag the connection string — it contains a password in the URL, which matches HeimWall’s database URL rule. The toast appears instantly, showing a redacted version of the credential.
Try a few more test patterns:
export AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE— flagged as an AWS access keygithub_pat_11ABCdefGHIjklmnOPqr12345— flagged as a GitHub tokenMy SSN is 123-45-6789— flagged as PII (if the on-device classifier catches it)
Not every pattern is guaranteed — the classifier has a confidence threshold, and edge cases may slip through. But the 25+ regex rules cover the most common credential formats you’re likely to paste from a .env file or a config dump.
What Secrets Does HeimWall Actually Catch?
Based on the company’s documentation and my own testing, here’s what the current rule set covers:
- AWS credentials: Access Key IDs (AKIA, ASIA), Secret Access Keys
- GitHub tokens: Personal access tokens (ghp_, gho_, ghu_), installation tokens
- JWT tokens: JSON Web Tokens (eyJ… base64url-encoded headers)
- Database URLs: PostgreSQL, MySQL, MongoDB connection strings with embedded credentials
- Private keys: SSH private keys, PGP private keys, PEM-encoded certificates
- API keys: Stripe (sk_live_, pk_live_), Google API keys, OpenAI keys (sk-…)
- PII: Social Security Numbers, credit card numbers (Luhn-checked), email addresses, phone numbers
The team behind HeimWall says they’re adding new rules regularly based on real-world incidents. Because the rules are deterministic regex, updates come as app updates — no server-side model retraining needed.
Privacy Architecture: Why This Matters
What sets HeimWall apart from most “security” products is what it doesn’t do. The typical security SaaS model works like this: your data goes to their cloud, they scan it, they tell you what they found. That model works for SIEMs and endpoint protection, but it’s the wrong architecture for AI prompt monitoring — because the whole point is keeping secrets off the network in the first place.
HeimWall flips the model. The scan happens before the network. The detection engine lives on your machine. The prompt never reaches a HeimWall server because there’s nothing to send. The company has been audited on this claim — their whitepaper describes the full architecture, from the Accessibility capture layer through the Rust-based detection engine to the in-memory-only flagging pipeline.
This is the same philosophy behind running open-source models locally instead of sending your code to third-party APIs. If the Fortune 500 companies in my recent article on self-hosting AI models are moving their compute in-house for data sovereignty reasons, HeimWall takes that same instinct and applies it to the input side: keep sensitive data on-device at the point of capture, not after it’s already leaked.
The Free vs. Team Versions
HeimWall offers two versions with the same detection engine:
- Free (Individual): What I covered here. No account, no telemetry, no uplink. The entire detection loop lives on your machine. Download it, grant Accessibility, and you’re protected. No strings attached — the company explicitly states this version “sends nothing, anywhere.”
- Team (Paid): Adds an organizational dashboard with aggregated, redacted metadata — counts of flags by type, masked snippets (never full prompts), a Safety Score for the team. The raw prompts still never leave individual machines. It’s designed for engineering managers who want visibility into credential hygiene without violating developer privacy.
For individual developers and freelancers — which covers a huge chunk of my audience here — the free version is all you need. If you’re the only person using AI coding tools on your machine, there’s no benefit to the team tier.
Where HeimWall Falls Short
No tool is perfect, and HeimWall has a few limitations worth calling out:
- Mac-only. This is the biggest one. The app only runs on Apple Silicon Macs with macOS 13+. If you’re on Windows, Linux, or an Intel Mac, you’re out of luck for now. The company says they’re gauging demand for other platforms — I’d love to see a Linux version, especially for developers running Claude Code in WSL or native Linux.
- Accessibility permission requirement. Some developers are uncomfortable granting any app Accessibility access, and rightly so — it’s a powerful permission. HeimWall’s privacy whitepaper explains exactly what it reads (the AI tool’s prompt input only) and how it processes it (in-memory, dropped after check). But if you’re the type who runs Little Snitch and reviews every outgoing connection, this might still give you pause.
- Limited to AI tools it can see. HeimWall captures input from the most popular tools (Cursor, Claude Code, Copilot), but it may not work with every IDE plugin or custom AI interface. The Accessibility-based capture approach works best with standard text input fields.
- No brute-force prevention. HeimWall flags — it doesn’t block. If you deliberately ignore the toast and hit send anyway, the secret still goes out. It’s a guardrail, not a firewall, and that’s by design.
Should You Install It?
If you’re a developer on a Mac who uses AI coding tools — and especially if you work with production credentials, API keys, or sensitive customer data — HeimWall is an easy yes. It’s free, it takes two minutes to install, and it adds a layer of protection that simply didn’t exist six months ago.
The broader lesson here goes beyond any single tool. The AI coding assistant ecosystem is growing faster than its security practices. We’re pasting more code, more credentials, and more PII into cloud prompts than ever before, and most developers assume the model providers handle this responsibly — an assumption that’s becoming harder to justify.
Tools like HeimWall, Destructive Command Guard for preventing AI agents from running dangerous commands, and auditing practices for checking what your tools upload to the cloud are all part of the same shift: developers are realising that AI coding safety is a personal responsibility, not just a vendor promise.
HeimWall addresses one specific, acute problem — the accidental paste — and it solves it well. For Mac users, there’s no reason not to have it running. For everyone else, the underlying principle — catch secrets before they leave your machine — is worth building into your own workflow, even if you have to approximate it with manual checks until cross-platform support arrives.