Securing Dear Hearth's AI chat and sensitive member data, graded A.

86
security score, graded A, on our passive scan
0
critical or high findings left
8 / min
chat messages per visitor, 60 an hour
0
form answers or screen recordings sent to analytics
Client
Dear Hearth (dearhearth.com)
Industry
Online peer support
Service line
Cybersecurity · AI security and website hardening
Timeline
October to November 2026
Stack
Next.js · Netlify · OpenAI API · PostHog · Whop · ImprovMX · Brevo
Team
1 person

People tell Hearth what they tell almost no one

Dear Hearth matches people with a trained listener, called a Keeper, for one-to-one peer support from $39 a month. The people who arrive share things they tell almost no one: their health, their faith, their family, who they are. On a site like that, a leak is not an inconvenience. It is the reason someone never comes back.

Before paid memberships opened, the site had four open doors. An AI chat assistant that anyone on the internet could call, and run up a bill on. Analytics that, left on its defaults, would record what people typed. A content security policy that only reported problems instead of blocking them. And an email address anyone could fake, in a setting where a convincing fake message does real harm. Each is ordinary on a marketing site. Here, each one was a way to hurt the people the service exists for.

Close each door, then prove it from the outside

The AI chat came first, because it is the one door that costs money and talks to people at a bad moment. It stores nothing on the server: the browser holds the conversation and sends it with each message. Every conversation ID is signed with an HMAC key, so nobody can forge or reuse someone else's. Each visitor gets 8 messages a minute and 60 an hour, a conversation stops at 20 messages, and a message at 1,000 characters. A crisis check runs before any message reaches the model and answers with real human contacts instead of an AI reply. Without its API key the widget does not render at all, so a missing secret fails closed, not open.

Analytics now sees page views and named events, nothing else. PostHog runs with autocapture, session recording and surveys switched off. The loneliness self-check and the therapy cost calculator work out their answers in the browser and send nothing anywhere, with a no-capture class on each as a second lock in case recording is ever switched on.

The content security policy ran in report-only mode first, so we could see every script, frame and connection the site really uses, Whop's checkout and PostHog included. Once the reports were clean it was enforced, on 10 November 2026, beside HSTS, frame, referrer and permissions headers that switch off the camera, microphone and location. A headless browser check loads the key pages and flags any script the policy blocks.

The rest was plumbing. Card details never touch the site: checkout hands the buyer to Whop's hosted checkout. hello@dearhearth.com now has SPF, DKIM and DMARC, so an inbox can tell real Hearth mail from a fake. Bot traps sit on the Keeper application and profile forms. The privacy page was rewritten from the code, so it promises only what the site does, and a pop-up that collected email addresses and sent them nowhere was taken out.

hearth-security
  • Findings
  • Headers
  • AI chat
  • Email
Security review86 · A
  • AI chat · 8 a minute per visitorlimited
  • Content security policyenforced
  • DMARC on hello@monitoring
The review board: what the passive scan and the code review found, and what was closed.
chat-guard · one message
21:14:02  conversation ID checked against its HMAC signature
21:14:02  visitor under 8 a minute and 60 an hour
21:14:02  crisis words checked before the model sees anything
21:14:03  last 12 turns sent, reply capped at 400 tokens
✓ reply sent, nothing stored on the server ▮
What happens to every chat message before and after the AI model.

Graded A from the outside, with the next steps written down

The score is our own passive scan of dearhearth.com on 23 November 2026: anyone can rerun it with the free scanner. The other rows come from the site's code and configuration.

MeasureBeforeAfter
Content security policyreport onlyenforced
AI chat assistantopen endpointsigned, rate-limited, crisis-checked
Analytics capturedefaultsno autocapture, no recording
Email authenticationnoneSPF, DKIM and DMARC
Passive security scannot measured86, grade A, no critical or high

What we would do next

Five low and medium findings are left, and they are the plan for December: DMARC moves from monitoring to quarantine and then reject, SPF goes from soft-fail to fail, HSTS covers subdomains and joins the preload list, a CAA record limits which certificate authorities can issue for the domain, and the content policy drops 'unsafe-inline' by hashing its scripts, the way this site's own policy works. A security.txt file will also give researchers a way to report a problem.

Nothing here is committed. It is the honest answer to the question the client asked at handover, and the estimate we gave for it.

Scope a phase like this

Team on this project

BA
Babar Ali
Founder · security review, AI chat hardening, headers and email

The same people who scoped it built it. No handover to a delivery pod.

Related work

Questions about this project

Treat it as a public API that costs money and may talk to someone at a bad moment. Sign conversation IDs so they cannot be forged, limit messages per visitor and per conversation, cap message and reply length, keep the system prompt on the server, check for crisis or abuse before the model sees anything, store nothing you do not need, and make the widget disappear when a secret is missing. Dear Hearth's assistant does all of these.

Have a product like this to build?

Thirty minutes answers fit and gives you a rough number. Babar Ali, founder, replies within one business day, and the written plan with a fixed price usually follows within a week.

Get an estimate