Analytix-AI
How we audited a live, paying-customer AI SaaS product end to end, closing every critical vulnerability and verifying every fix against production, without a minute of downtime.
01
The Challenge
Analytix-AI is our own live, paid SaaS product, with over 120 active users, three subscription tiers, real Stripe billing, and hundreds of stored chart analyses. It was never audited as a single system: features had shipped incrementally, each reviewed on its own.
The brief was simple and non-negotiable: audit it all, test every part, make sure it actually functions, then check security. This product already holds people's money and their trading analyses, so nothing was going to be treated as a formality.
We didn't just need a list of theoretical risks. We needed to know, with certainty, what a determined user could actually get away with, and prove the fix without breaking the product for everyone else.
02
What We Did
Mapped the Real Attack Surface
Every edge function, every database policy, every place user input reaches billing, auth, or another user's data, not just the parts already flagged as sensitive.
Ran Two Independent Audits in Parallel
One pass on the application and edge-function layer, a second pass focused purely on the database and row-level security rules, so a blind spot in one didn't become a blind spot in both.
Reproduced the Exploit, Then Reproduced the Fix
Every finding was confirmed against the live production system with the actual request that broke it, then confirmed again after the fix, alongside the legitimate version of that same action, to rule out breaking real users to stop bad ones.
Walked Every Paid Flow by Hand
Signup, settings, billing, account deletion, analysis history, upgrade flow: clicked through end to end once security closed out, because "secure" and "working" are two different bars to clear.
03
What We Found & Fixed
Grouped by severity. Specifics are described at the level a customer needs to trust the fix, not as a how-to.
Critical · 3
Entitlement escalation via an incomplete update policy
A database rule meant to stop users editing their own subscription tier or usage quota only covered part of those fields, leaving a path to self-grant premium access through the app's own API.
Forgeable trial-extension links
A development-only fallback signing key was still reachable in production, meaning a valid-looking trial-extension token could be constructed without the real secret.
Unauthenticated email relay
An internal "welcome email" function accepted a recipient and display name directly from the request with no ownership check, enabling spoofed sends and unescaped content.
High · 3
Usage quota race condition
Metered AI analyses were checked, then decremented, as two separate steps, so concurrent requests could slip through the gap and exceed a plan's monthly limit.
Private analyses reachable without authentication
A "showcase" endpoint meant to surface a handful of demo results had overly broad fallback rules that could expose other users' private chart analyses.
Unauthenticated internal jobs
Scheduled maintenance and email-followup functions were callable directly from the public internet with no secret or signature check.
Medium · 4
Unmetered, unvalidated add-on feature
A paid sentiment-analysis add-on accepted unbounded input and had no abuse ceiling, unlike the product's core analysis feature.
Filter-injection risk in fraud signals
Device and IP identifiers used for signup-fraud detection were passed into a database filter unsanitized.
Open redirect in email link tracking
A click-tracking link redirected to its destination even when its signature failed to verify.
Account deletion left billing active
Deleting an account removed the local billing record without first cancelling the underlying subscription: a self-service dead end for anyone trying to actually stop being charged.
Low · 2
Hardcoded admin bypasses
Two internal tools checked a specific email address in addition to the proper roles table: redundant, and one more place permissions could drift out of sync.
Unreliable billing customer lookup
Billing-portal access preferred looking a customer up by email over the stored, authoritative billing ID.
Total findings closed
12 / 123 critical, 3 high, 4 medium, 2 low, every one fixed and confirmed live, with zero downtime.
One more thing surfaced only by clicking through the product like a real customer would: checkout and the billing portal had no recovery path if a stored billing reference ever went stale, and both would fail permanently for that account. Both now detect it and re-establish it automatically.
04
Tech Stack
React / TypeScript / Supabase / PostgreSQL / Row-Level Security / Deno Edge Functions / Stripe / Vercel
Shipping something real customers pay for?
This is the same audit-and-verify process we run before any client product carries real customers and real payments. Let's talk.
Start a Conversation