<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Larissa Dourado</title>
    <description>The latest articles on DEV Community by Larissa Dourado (@larissadourado27).</description>
    <link>https://dev.to/larissadourado27</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4234106%2Ffaaa3699-afc7-420a-96ca-6007ae711f8f.jpg</url>
      <title>DEV Community: Larissa Dourado</title>
      <link>https://dev.to/larissadourado27</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/larissadourado27"/>
    <language>en</language>
    <item>
      <title>I audited AI-built Supabase apps. These are the security bugs I keep finding</title>
      <dc:creator>Larissa Dourado</dc:creator>
      <pubDate>Sun, 08 Nov 2026 21:05:04 +0000</pubDate>
      <link>https://dev.to/larissadourado27/i-audited-ai-built-supabase-apps-these-are-the-security-bugs-i-keep-finding-g5d</link>
      <guid>https://dev.to/larissadourado27/i-audited-ai-built-supabase-apps-these-are-the-security-bugs-i-keep-finding-g5d</guid>
      <description>&lt;p&gt;Tools like Lovable, Bolt and Cursor can take you from idea to working app in a weekend. The demo works, the UI looks great, and you are ready to launch.&lt;/p&gt;

&lt;p&gt;But "it works" and "it's safe to put real users on it" are not the same thing. I audit React + Supabase apps built with AI tools, and the same problems show up again and again. Here are the five that matter most, and how to check your own app in a few minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Trusting IDs sent by the client
&lt;/h2&gt;

&lt;p&gt;This is the most serious one. A server function receives something like &lt;code&gt;notebook_id&lt;/code&gt; or &lt;code&gt;order_id&lt;/code&gt; from the request, then reads or writes data with the service role key, which bypasses Row Level Security.&lt;/p&gt;

&lt;p&gt;The function checks that the user is logged in, but not that the ID belongs to them. Any signed-in user can send someone else's ID and get their data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; before using an ID from the request, look it up with the caller's own session (so RLS applies), or check ownership explicitly.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Webhooks and callbacks that anyone can call
&lt;/h2&gt;

&lt;p&gt;Payment webhooks and "job finished" callbacks often run without any secret check. Anyone who finds the URL can send fake payments or overwrite records.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; verify the provider's signature, or require a long random token in the URL or a header.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. RLS that is on, but not complete
&lt;/h2&gt;

&lt;p&gt;RLS is enabled, but:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;insert and update policies have no &lt;code&gt;with check&lt;/code&gt;, so users can create rows for other users;&lt;/li&gt;
&lt;li&gt;users can update their own profile, including the &lt;code&gt;role&lt;/code&gt; column;&lt;/li&gt;
&lt;li&gt;a view or a &lt;code&gt;SECURITY DEFINER&lt;/code&gt; function quietly bypasses RLS.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; read every policy, add &lt;code&gt;with check&lt;/code&gt;, restrict updatable columns, and use &lt;code&gt;security_invoker = true&lt;/code&gt; on views.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Data left in the browser
&lt;/h2&gt;

&lt;p&gt;Persisted caches (React Query, Zustand, &lt;code&gt;localStorage&lt;/code&gt;) keep customer data after logout. On a shared device, the next user sees it. And hard-coded seed data in &lt;code&gt;src/&lt;/code&gt; is shipped to every visitor, logged in or not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix:&lt;/strong&gt; clear caches on sign-out, and never put real data in the frontend source.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Mixing up public and secret keys
&lt;/h2&gt;

&lt;p&gt;The Supabase anon / publishable key in your frontend is fine. It is designed to be public. The real problem is a service role key with a &lt;code&gt;VITE_&lt;/code&gt; prefix, or RLS that does not protect your tables.&lt;/p&gt;

&lt;h2&gt;
  
  
  The full checklist
&lt;/h2&gt;

&lt;p&gt;I turned everything I check into a free checklist, with SQL queries you can run in the Supabase SQL editor:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://github.com/Larissadourado27/lovable-supabase-security-checklist" rel="noopener noreferrer"&gt;Lovable + Supabase Security Checklist&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Only run these checks on apps you own or are authorized to test.&lt;/p&gt;

&lt;p&gt;If you would rather have someone go through it for you, I offer audits and fixes for AI-built apps on &lt;a href="https://www.fiverr.com/larissadoura380" rel="noopener noreferrer"&gt;Fiverr&lt;/a&gt;. Questions are welcome in the comments.&lt;/p&gt;

</description>
      <category>supabase</category>
      <category>security</category>
      <category>react</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
