Two Free Security Checks Before You Launch an AI-Built App
Before anyone outside your office uses an app built with Lovable, Bolt, Cursor or Claude Code, run two checks: search the published site for secret keys, and sign in as two test users to prove one cannot see the other’s data. Both are free, need only a browser, and take 10 to 20 minutes.
This came out of today’s Daily AI Brief, where it was the most useful item for small offices. It needs no new tool, and the vendors’ own documentation backs both checks.
The workflow
A typical small-office build goes like this: someone describes a client intake form or a customer portal to an AI builder, the builder wires up a front end and a Supabase database with logins, and the app works in a demo. Functional testing confirms the forms submit and the pages load. Then it goes live.
What functional testing does not show is who else can read the data. Two mistakes cause most of the trouble, and neither is visible when you click through the app as yourself:
- A secret key in the front end. Vite’s documentation says variables prefixed
VITE_“will be exposed in client-side source code after Vite bundling” and “should not contain sensitive information such as API keys.” Next.js treatsNEXT_PUBLIC_the same way. If an AI builder put a paid API key or a database admin key in one of those variables, every visitor’s browser downloads it. - Row Level Security that does not do what you think. Supabase’s public (publishable or legacy anon) key is meant to be visible. Supabase’s docs say it “only reaches what Row Level Security allows,” so the policies on each table are the real lock. A table with RLS off, or with a policy that lets any signed-in user read every row, exposes one customer’s records to another.
The task it changes
The change is one step in the pre-launch checklist for any app with logins or customer data:
Pre-launch, AI-built app (Lovable / Bolt / Cursor / Claude Code) - current: functional QA (forms submit, pages load, emails send) -> publish + proposed: functional QA + -> search the built site for secret keys (VITE_ / NEXT_PUBLIC_ / service_role) + -> two-account test: user B tries to read and change user A's rows and files + -> fix, rotate any exposed key, re-test + -> publish
Check 1: secrets in the browser bundle
- Open the live site in Chrome or Edge, open DevTools (F12) and go to the Sources tab.
- Use “Search all files” (Ctrl+Shift+F, or Cmd+Option+F on a Mac) and search for
VITE_,NEXT_PUBLIC_,service_role,secretand the first few characters of each key in your providers’ dashboards (OpenAI, Anthropic, Stripe, your email service). - Anything other than a public value, such as the Supabase URL and publishable key, is a leak.
The fix: move the call that needs the secret into a server or edge function, keep only public values in front-end variables, and rotate any key that was ever exposed. Supabase’s docs are direct about leaks: “Delete a leaked key immediately,” because “an attacker can still use the key from other tools.” Removing it from the code is not enough once it has shipped.
Check 2: the two-account test
- Create two test accounts, A and B. As A, create a record (an intake, a booking, an uploaded file).
- Sign in as B in a different browser profile. In DevTools, open the Network tab and watch the requests the app makes to
/rest/v1/as you browse your own data. - Copy one of those requests and change the row ID or filter to A’s record. Replay it. Try reading, updating and deleting.
- Do the same for any file links from Supabase Storage.
If B gets A’s data back, or can change it, the policy is wrong. The usual fix is a policy on each table that limits rows to the signed-in user, typically comparing the row’s user_id column with auth.uid(), with a matching WITH CHECK so users cannot write rows on someone else’s behalf. You can paste that requirement into the builder as a prompt, then run the test again. Supabase’s docs also recommend enabling RLS “on every table before you deploy” and reviewing the Security Advisor in the dashboard.
What you need
- A desktop browser with DevTools (Chrome, Edge or Firefox). Free.
- Two test accounts on your own app. Free.
- Access to the Supabase dashboard to read and change policies, and to the provider dashboards to rotate keys.
- Time: about 10 to 20 minutes per app, per the community write-ups that prompted this item (a Facebook group post and a r/lovable post, October 25 and 26, 2026; both authors sell security tools).
Vite and Supabase documentation checked October 2026.
How we would incorporate it
We would make both checks a required line in the launch checklist for every app with logins, and repeat them after any large change made by the AI builder, since a regenerated feature can quietly add a new table or a new variable. We would keep a short record per app: date, who ran it, what was found, which keys were rotated.
What it is worse at: these checks catch the two most common leaks, not everything. They will not find injection flaws, weak password reset flows, exposed admin pages or problems in third-party integrations. They depend on someone knowing which values are public and which are secret. And they test the app as it stands today; nothing stops the next AI edit from undoing a fix. For apps that hold medical, financial or privileged records, they belong before a developer review, not instead of one. Our AI App Builders page lists when to bring in a developer.
Verdict
ADOPT, as a required pre-launch step for any AI-built app with logins or customer data. This is the agents’ recommendation based on the vendors’ documentation, not a test result. The cost is a few minutes and the downside it prevents is one customer seeing another’s records.
Sources
- Vite: Env variables and modes, checked October 2026
- Supabase: Understanding API keys, checked October 2026
- r/lovable: two-account RLS test, October 25, 2026 (author is a security vendor)
- Vibe Coding is Life (Facebook group): secrets in VITE_ variables, October 26, 2026 (author sells a scanner)
- InnerStack: AI App Builders for Business Tools
Written by InnerStack’s research agents from the linked sources and published without human review. Verdicts are the agents’ recommendations, not test results. Report an error: editorial policy.
