Sample report · 2 November 2026
What a production check finds.
Pantry Pal is a made-up app, built in Lovable with Supabase, Stripe and Vercel. Its ten findings are illustrations of issues we commonly check for, not a real client. All keys, ids and addresses shown are fake.
The real report is written the same way: what we found, why it matters, how to see it safely yourself, and how to fix it. $490, fixed, and the report arrives within 5 working days of access. Read all 14 pages as a PDF.
Not ready for paying users yet. Three fixes change that.
The core is sound: login, hosted checkout and HTTPS are set up properly. But today a stranger could copy the Stripe and OpenAI keys from the browser, read every household's pantry, and get Pro without paying. All three are fixable, and none needs a rebuild.
| Area | Score | Findings |
|---|---|---|
| Secrets and API keys | Red | F1, F7 |
| Database access rules | Red | F2 |
| Payments | Red | F3 |
| File storage | Amber | F4 |
| Login and sign-in | Amber | F5 |
| Backups and recovery | Amber | F6 |
| Errors and alerts | Amber | F8 |
| Privacy and legal | Amber | F9 |
| Hosting and headers | Green | F10 (low) |
| Dependencies | Green | No findings |
Red: at least one critical finding. Amber: high or medium findings. Green: low findings or none.
Ten findings, worst first
| # | Finding | Severity |
|---|---|---|
| F1 | Stripe and OpenAI secret keys are in the browser bundle | Critical |
| F2 | Row level security is on, but the policies say using (true) | Critical |
| F3 | Pro is switched on by the browser, not by a Stripe webhook | Critical |
| F4 | Receipt photos sit in a public storage bucket | High |
| F5 | The 4-digit kitchen PIN sign-in has no attempt limit | High |
| F6 | No backups you could restore, and no restore ever tested | High |
| F7 | A .env file with live keys is still in the Git history | Medium |
| F8 | Errors are logged but nobody is told | Medium |
| F9 | The privacy policy does not match the services that get the data | Medium |
| F10 | Basic security headers are missing | Low |
The first three are shown in full below. F4 to F10 are in the PDF.
F1 · Critical
Stripe and OpenAI secret keys are in the browser bundle
What we found
The checkout session and the recipe ideas are created straight from the browser. To make that work, the Stripe live secret key and the OpenAI key are stored as VITE_ variables, and Vite copies every VITE_ variable into the JavaScript it sends to every visitor.
# .env (values redacted, and fake)
VITE_STRIPE_SECRET_KEY=sk_live_EXAMPLE...redacted
VITE_OPENAI_API_KEY=sk-proj-EXAMPLE...redactedWhy it matters
Anyone who opens your site can copy both keys in under a minute. The Stripe secret key gives full API access to your Stripe account. The OpenAI key lets anyone run requests on your bill until you notice.
How to see it safely
Open the live app, press F12, go to Sources and search all files (Ctrl+Shift+F) for sk_live and sk-proj. If they show up, the keys are exposed. Do not use a key you find; just note that it is there.
The fix
- Today: roll the Stripe secret key and revoke the OpenAI key, then create new ones. Old copies stop working at once.
- Delete the two VITE_ lines and keep the new keys as Supabase secrets.
- Move both calls into Supabase Edge Functions and call those from the app.
Sources: Vite, Env variables and modes · Stripe, API keys · Supabase, Edge Function secrets
F2 · Critical
Row level security is on, but the policies say using (true)
What we found
Row level security (RLS) is switched on for every table, which looks right in the Supabase dashboard. But the policies on four tables allow every row to everyone, so RLS is on in name only.
create policy "Enable read access for all users"
on public.pantry_items for select using (true);Why it matters
The Supabase anon key is meant to be public, because RLS is what protects the data. With using (true), anyone holding that public key can read every household's pantry, names and dietary notes, and change or wipe them, without logging in.
How to see it safely
Create two test accounts in two different households. Signed in as test account A, run this in the browser console. If rows come back, A can read B's data.
await supabase.from("pantry_items").select("*").eq("household_id", "<test household B id>")The fix
- Drop the open policies.
- Limit each table to members of the household, for select, insert, update and delete (with a with check), using a small security definer function for the membership lookup.
- Test it with the two accounts above.
Sources: Supabase, Row Level Security · Supabase, API keys · OWASP Top 10, Broken Access Control
F3 · Critical
Pro is switched on by the browser, not by a Stripe webhook
What we found
Checkout itself uses Stripe's hosted page, which is right. But when the customer lands back on the success page, the browser upgrades its own account. Signed-in users are also allowed to update every column of their own profile, including plan.
// src/pages/CheckoutSuccess.tsx
supabase.from("profiles").update({ plan: "pro" }).eq("id", user.id);Why it matters
Anyone signed in can open the success page, or run that one line in the console, and get Pro for free. It also fails honest customers: if the tab closes before the redirect, they pay and do not get Pro. Cancellations and failed renewals never downgrade anyone.
How to see it safely
With a test account and without paying, open the success page with a made-up session id, then check that account's plan in the profiles table.
The fix
- Stop the browser from changing plan: take away the update right on the table, then give it back for the columns users may edit.
- Pass the user id to Stripe as client_reference_id when the checkout session is created.
- Add a webhook edge function that checks Stripe's signature and changes the plan. Handle subscription deleted and payment failed too.
Sources: Stripe, Fulfill orders · Stripe, Webhooks · OWASP Top 10, Broken Access Control
What was already right
A check is also about what you do not need to touch. These passed.
- Email login uses Supabase Auth, with email confirmation on and normal session expiry.
- Card details never touch the app: payment happens on Stripe's hosted checkout page.
- HTTPS everywhere; the custom domain certificate is valid and renews by itself.
- Vercel preview deployments are protected, so unfinished work is not public.
- npm audit showed no high or critical advisories on the day of the check.
Want this for your app?
Send us the link. The production check is $490, fixed, with the report in 5 working days. Fixes are priced in writing before any work starts, and the report is yours to give to any developer.
Report in 3 to 5 working days. A personal reply within one working day.