Fix library: common holes in AI-built apps
One entry per common hole: what it looks like in generated code, how to confirm it in your own app and a fix prompt you can paste into your AI builder.
Severity
Audit area
Showing 25 of 25
Supabase · Access controlCriticalAdmin check only in the frontend: why hiding the admin page protects nothingHiding the admin page in React does not stop anyone from reading admin data or making themselves admin. Move the role into the database and enforce it in policies.3 min readAI · SecretsCriticalOpenAI or Anthropic key in client code, or returned by a functionAn AI provider key in a VITE_ variable or returned by an edge function belongs to every visitor. Move AI calls into a server function, then rotate the key.4 min readSupabase · RLSCriticalRLS policy with USING (true) or WITH CHECK (true): close the open doorA Supabase policy of using (true) or with check (true) turns RLS on in name only. Find these policies with one query and replace them with owner checks.3 min readSupabase · Database functionsCriticalSECURITY DEFINER function without an auth check or search_path: lock it downA SECURITY DEFINER function runs with its owner’s rights and skips RLS. If anyone can call it and it trusts its arguments, it is an open admin endpoint.3 min readSupabase · KeysCriticalservice_role or secret key in the frontend: rotate it, then move the work to the serverA Supabase secret or service_role key in browser code lets anyone who copies it bypass RLS. Find it in your bundle, rotate it and move admin work to the server.3 min readSupabase · RLSCriticalTable without row level security: find it and fix it in SupabaseA Supabase table without row level security can be read and changed by anyone with your public key. Find every such table with one query and lock it down.3 min readSupabase · PaymentsHighCredits, paid status or prices set by the client: stop trusting the browser with moneyIf the browser writes the price, the payment status or the credit balance, users can set their own. Lock these columns with grants and compute them in the database.3 min readSupabase · Edge FunctionsHighEdge function trusts user_id from the request bodyAn edge function that takes userId from the request body and queries with the admin key lets anyone read any user’s data. Take the user from the verified token.4 min readSupabase · Edge FunctionsHighEdge function without an auth check: who is calling your function?A Supabase edge function that never checks its caller is a public API for everyone. How to find such functions and verify the user before any data work.4 min readSupabase · Access controlHighMissing ownership check on update and delete: any user can change anyone’s dataIf your update and delete rules only check that someone is signed in, every user can edit or delete other users’ rows. Find these policies and add the owner check.3 min readAuth · Password resetHighPassword reset link that redirects to any URLA broad Supabase redirect allow list or a reset link built from untrusted input can send reset links to sites you don’t own. Pin them to exact URLs.4 min readSupabase · StorageHighPublic storage bucket with private files: make it private and serve signed URLsFiles in a public Supabase bucket can be opened by anyone with the link, no policy asked. Find public buckets, make private ones private and switch to signed URLs.3 min readVite · SecretsHighSecret key in a VITE_ variable: why .env doesn’t hide it, and how to move itEvery VITE_ variable ends up in the JavaScript your visitors download. Find secrets in VITE_ variables and code, rotate them and call the API from an edge function.4 min readVite · Build outputHighSource maps and .env files served in productionA live site that serves .js.map files or a .env file hands out your source code and often your secret keys. Turn off public source maps and keep .env out of dist.4 min readStripe · WebhooksHighStripe webhook without signature check: anyone can say ‘paid’A Stripe webhook that acts on the JSON body without checking the Stripe-Signature header lets anyone fake a payment. Verify the raw body with your endpoint secret.3 min readSupabase · PaymentsHighSubscription check only in the frontend: how free users get paid featuresA paywall that only exists in React lets free users load paid content through the API, or mark themselves as subscribed. Enforce the plan in the database instead.3 min readReact · XSSHighXSS through dangerouslySetInnerHTML: user text runs as codeRendering user content with dangerouslySetInnerHTML lets anyone run JavaScript in your users’ browsers. Render Markdown safely or sanitize with DOMPurify.3 min readCORS · APIsMediumCORS with credentials for any origin: other sites read your users’ dataAn API that echoes any Origin back and allows credentials lets every website read your users’ responses with their cookies. Use a fixed allowlist instead.3 min readAI · CostsMediumNo AI spend cap: one bug or one abuser can empty your budgetWithout a hard spend limit at your AI provider and a per-user quota in your app, one leaked key or bot can run up a large bill. Set both before launch.4 min readAuth · AIMediumNo rate limit on login or AI endpointsWithout rate limits, bots can guess passwords and burn through your AI budget. Use Supabase Auth’s limits and CAPTCHA, and add a limiter to your own endpoints.4 min readStripe · WebhooksMediumNon-idempotent Stripe webhook: one payment, credits granted twiceStripe may deliver the same event more than once. A webhook that adds credits on every delivery hands out extras. Record each event id and process it only once.4 min readAuth · RedirectsMediumOpen redirect after login: your sign-in page sends users anywhereA login page that follows ?next= or ?redirect= to any URL lets phishers borrow your domain. Accept only paths on your own site, with a tested helper.3 min readLogging · PrivacyMediumPersonal data and tokens in logs and error messagesconsole.log(body) and raw error messages copy emails, tokens and passwords into logs and browsers. Log ids and field names, return generic errors.4 min readAuth · Account privacyLowEmail enumeration: your sign-up and reset forms say who has an accountMessages like ‘no account with this email’ or ‘already registered’ let anyone test which addresses use your app. Answer the same way for every address.4 min readSupabase · RLSLowRLS enabled but no policies: why your app shows nothing, and the fix that keeps data safeRLS is on but the table has no policies, so lists are empty and inserts fail. Add the right policies instead of turning RLS off or allowing everything.3 min read
Find this in your own app
ShipRely reads your repository (read-only), proves each finding with file and line, and gives you a fix prompt to paste into your AI builder.
Run a demo audit- Read-only access to your repository
- Every finding with file and line
- Fix prompts for Lovable, Cursor, Claude Code and Bolt