<?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: kushoevskiv</title>
    <description>The latest articles on DEV Community by kushoevskiv (@kushoevskiv).</description>
    <link>https://dev.to/kushoevskiv</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%2F4274456%2Fd0c444cc-94c0-4b73-89e9-91662ba98a58.jpg</url>
      <title>DEV Community: kushoevskiv</title>
      <link>https://dev.to/kushoevskiv</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kushoevskiv"/>
    <language>en</language>
    <item>
      <title>I had a backup for my Supabase app. Then I actually tried to open it.</title>
      <dc:creator>kushoevskiv</dc:creator>
      <pubDate>Mon, 30 Nov 2026 15:24:42 +0000</pubDate>
      <link>https://dev.to/kushoevskiv/i-had-a-backup-for-my-supabase-app-then-i-actually-tried-to-open-it-he7</link>
      <guid>https://dev.to/kushoevskiv/i-had-a-backup-for-my-supabase-app-then-i-actually-tried-to-open-it-he7</guid>
      <description>&lt;p&gt;I kept thinking: what if my users' data just disappears one day? My app runs on Supabase's free plan, which doesn't give you downloadable backups. So I set up my own: every Sunday, a GitHub Action dumps the database, encrypts it and stores it for 90 days.&lt;/p&gt;

&lt;p&gt;It ran, it was green, it produced a file. Done, right?&lt;/p&gt;

&lt;p&gt;Not really. A backup you've never opened is just a file you &lt;em&gt;hope&lt;/em&gt; works. So I downloaded one and checked it. Here's the setup and what I learned.&lt;/p&gt;

&lt;h2&gt;
  
  
  The workflow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;weekly-backup&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;cron&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'0 1 * * 0'&lt;/span&gt;   &lt;span class="c1"&gt;# every Sunday
&lt;/span&gt;  &lt;span class="na"&gt;workflow_dispatch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;       &lt;span class="c1"&gt;# so you can run it by hand
&lt;/span&gt;&lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;read&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;backup&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;timeout-minutes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install PostgreSQL 17 client&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;sudo apt-get update -qq&lt;/span&gt;
          &lt;span class="s"&gt;sudo apt-get install -y -qq postgresql-common gnupg&lt;/span&gt;
          &lt;span class="s"&gt;sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y&lt;/span&gt;
          &lt;span class="s"&gt;sudo apt-get install -y -qq postgresql-client-17&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Dump and encrypt&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;DB_URL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.SUPABASE_DB_URL }}&lt;/span&gt;
          &lt;span class="na"&gt;PASS&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.BACKUP_PASSPHRASE }}&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;set -euo pipefail&lt;/span&gt;
          &lt;span class="s"&gt;test -n "$DB_URL" &amp;amp;&amp;amp; test -n "$PASS"&lt;/span&gt;
          &lt;span class="s"&gt;D=$(date -u +%F)&lt;/span&gt;
          &lt;span class="s"&gt;PGDUMP=/usr/lib/postgresql/17/bin/pg_dump&lt;/span&gt;
          &lt;span class="s"&gt;mkdir backup&lt;/span&gt;
          &lt;span class="s"&gt;$PGDUMP "$DB_URL" -Fc --no-owner --no-privileges -n public -f backup/public.dump&lt;/span&gt;
          &lt;span class="s"&gt;$PGDUMP "$DB_URL" -Fc --no-owner --no-privileges --data-only \&lt;/span&gt;
            &lt;span class="s"&gt;-t auth.users -t auth.identities -f backup/auth.dump&lt;/span&gt;
          &lt;span class="s"&gt;tar cf - backup | gpg --batch --yes --pinentry-mode loopback \&lt;/span&gt;
            &lt;span class="s"&gt;--passphrase "$PASS" --symmetric --cipher-algo AES256 -o "backup-$D.tar.gpg"&lt;/span&gt;
          &lt;span class="s"&gt;echo "D=$D" &amp;gt;&amp;gt; "$GITHUB_ENV"&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Store for 90 days&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/upload-artifact@v4&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;backup-${{ env.D }}&lt;/span&gt;
          &lt;span class="na"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;backup-*.tar.gpg&lt;/span&gt;
          &lt;span class="na"&gt;retention-days&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;90&lt;/span&gt;
          &lt;span class="na"&gt;if-no-files-found&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;error&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two secrets: &lt;code&gt;SUPABASE_DB_URL&lt;/code&gt; (I used the &lt;strong&gt;Session pooler&lt;/strong&gt; connection string from Supabase → Connect) and &lt;code&gt;BACKUP_PASSPHRASE&lt;/code&gt; (a long random password, store it somewhere safe, without it the backup is useless).&lt;/p&gt;

&lt;h2&gt;
  
  
  Things that matter more than they look
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. The pg_dump version has to match.&lt;/strong&gt; Supabase runs Postgres 17. The &lt;code&gt;pg_dump&lt;/code&gt; that comes with the runner is older, and an older pg_dump refuses to dump a newer server. That's why the first step installs the version 17 client from the official PostgreSQL repo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Your users live in a different schema.&lt;/strong&gt; Your tables are in &lt;code&gt;public&lt;/code&gt;, but sign-ups are in &lt;code&gt;auth.users&lt;/code&gt; and &lt;code&gt;auth.identities&lt;/code&gt;. If you only dump &lt;code&gt;public&lt;/code&gt;, you get all the data and nobody who can log in. I dump those two tables separately, data only, because Supabase manages the auth schema itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Encrypt it.&lt;/strong&gt; GitHub artifacts can be downloaded by anyone with access to the repo, and this file has every user's email in it. &lt;code&gt;gpg --symmetric&lt;/code&gt; with AES256 is one line.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. &lt;code&gt;if-no-files-found: error&lt;/code&gt;.&lt;/strong&gt; If the dump silently fails, the job goes red instead of uploading nothing and looking fine.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part most people skip: opening it
&lt;/h2&gt;

&lt;p&gt;I downloaded the artifact, decrypted it with the passphrase, unpacked it and read the dumps back with &lt;code&gt;pg_restore&lt;/code&gt;. Then I compared everything with the live database:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;16 tables, &lt;strong&gt;row counts matched production exactly&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;auth.users&lt;/code&gt; had the right number of accounts&lt;/li&gt;
&lt;li&gt;all 23 RLS policies, 9 functions and 3 triggers were in the dump&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Small surprise on the way: my laptop didn't have &lt;code&gt;pg_restore&lt;/code&gt; at all, and I had to get the version 17 tools first. Worth finding out &lt;em&gt;before&lt;/em&gt; the day you actually need it, not during.&lt;/p&gt;

&lt;p&gt;After checking, I deleted the decrypted files. A decrypted backup lying around in Downloads is a leak waiting to happen.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you built your app with Lovable, Bolt or similar
&lt;/h2&gt;

&lt;p&gt;Ask yourself three questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Do I have a backup that &lt;strong&gt;I&lt;/strong&gt; control?&lt;/li&gt;
&lt;li&gt;When did I last &lt;strong&gt;open&lt;/strong&gt; it?&lt;/li&gt;
&lt;li&gt;Does it include my &lt;strong&gt;users&lt;/strong&gt;, not just my tables?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If any answer is "not sure", that's your weekend task. It takes about an hour, and it's the one thing you can't fix after something goes wrong.&lt;/p&gt;




&lt;p&gt;My first post was about the security audit I did on the same app: &lt;a href="https://dev.to/kushoevskiv/i-audited-my-own-live-supabase-app-before-promoting-it-heres-what-i-found-3n55"&gt;I audited my own live Supabase app before promoting it&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I wrote this post with help from AI tools. The setup, the restore check and the numbers are real and from my own project.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The full setup is open source: supabase-encrypted-backup on GitHub&lt;/p&gt;

</description>
      <category>supabase</category>
      <category>postgres</category>
      <category>githubactions</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I audited my own live Supabase app before promoting it. Here's what I found.</title>
      <dc:creator>kushoevskiv</dc:creator>
      <pubDate>Mon, 30 Nov 2026 14:27:47 +0000</pubDate>
      <link>https://dev.to/kushoevskiv/i-audited-my-own-live-supabase-app-before-promoting-it-heres-what-i-found-3n55</link>
      <guid>https://dev.to/kushoevskiv/i-audited-my-own-live-supabase-app-before-promoting-it-heres-what-i-found-3n55</guid>
      <description>&lt;p&gt;I built &lt;a href="https://tastebox.com.tr" rel="noopener noreferrer"&gt;tastebox&lt;/a&gt;, a film taste app for Turkish movie fans, mostly with AI help. Next.js on Vercel, a small Python API on Render, Supabase for the database and auth. Real people use it. I was using Letterboxd and wanted to compare my film taste with my friends, and I thought other people would find that useful too.&lt;/p&gt;

&lt;p&gt;Before I started promoting it with TikTok videos, I wanted to know one thing: &lt;strong&gt;what happens if someone tries to break it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So I ran a security audit on my own app. I used AI-assisted code review to go through the whole codebase quickly, then I tested every finding by hand against the live app. Here's what came out, including one fix that broke my own app.&lt;/p&gt;

&lt;h2&gt;
  
  
  The good news first
&lt;/h2&gt;

&lt;p&gt;No critical holes. No way to log in as someone else, no way to read another user's data by changing an ID, no SQL injection, no XSS, no secret keys in the browser bundle. All 23 Row Level Security policies did what they should.&lt;/p&gt;

&lt;p&gt;If you built your app with Lovable or Bolt, this is the part people focus on, and it matters. But a correct RLS setup was not where my problems were.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 1: anyone could fill my database in minutes
&lt;/h2&gt;

&lt;p&gt;I had two analytics tables where anonymous visitors can insert rows (page views, funnel steps). RLS allowed &lt;code&gt;insert&lt;/code&gt; for &lt;code&gt;anon&lt;/code&gt;, which is normal for analytics.&lt;/p&gt;

&lt;p&gt;What I didn't think about: the Supabase API accepts &lt;strong&gt;an array&lt;/strong&gt; of rows in one request. One &lt;code&gt;insert&lt;/code&gt; with 10,000 rows is a single HTTP call. The free tier has a 500 MB database. You do the math.&lt;/p&gt;

&lt;p&gt;The fix was a statement-level trigger that counts the rows in each insert:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;create&lt;/span&gt; &lt;span class="k"&gt;or&lt;/span&gt; &lt;span class="k"&gt;replace&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;limit_event_inserts&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;returns&lt;/span&gt; &lt;span class="k"&gt;trigger&lt;/span&gt;
&lt;span class="n"&gt;language&lt;/span&gt; &lt;span class="n"&gt;plpgsql&lt;/span&gt;
&lt;span class="n"&gt;security&lt;/span&gt; &lt;span class="n"&gt;definer&lt;/span&gt;
&lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="n"&gt;search_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;
&lt;span class="k"&gt;as&lt;/span&gt; $$
&lt;span class="k"&gt;declare&lt;/span&gt;
  &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;begin&lt;/span&gt;
  &lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="nb"&gt;count&lt;/span&gt;&lt;span class="cm"&gt;(*) into n from new_rows;
  if n &amp;gt; 5 then
    raise exception 'too many rows' using errcode = '54000';
  end if;
  execute format(
    'select count(*)&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="no"&gt;I&lt;/span&gt; &lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;created_at&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="kt"&gt;interval&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="n"&gt;day&lt;/span&gt;&lt;span class="s1"&gt;''',
    tg_table_name) into n;
  if n &amp;gt; 30000 then
    raise exception '&lt;/span&gt;&lt;span class="n"&gt;daily&lt;/span&gt; &lt;span class="k"&gt;limit&lt;/span&gt;&lt;span class="s1"&gt;' using errcode = '&lt;/span&gt;&lt;span class="mi"&gt;54000&lt;/span&gt;&lt;span class="s1"&gt;';
  end if;
  return null;
end;
$$;

create trigger funnel_events_limit after insert on public.funnel_events
  referencing new table as new_rows
  for each statement execute function public.limit_event_inserts();
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Plus a &lt;code&gt;pg_cron&lt;/code&gt; job that deletes rows older than 90 days.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The part I got wrong:&lt;/strong&gt; my first version didn't have &lt;code&gt;security definer&lt;/code&gt;. The trigger ran as the &lt;code&gt;anon&lt;/code&gt; role, and &lt;code&gt;anon&lt;/code&gt; can insert but can't &lt;em&gt;read&lt;/em&gt; the table. So the daily count failed and &lt;strong&gt;every normal single-row insert got rejected too&lt;/strong&gt;. My analytics silently stopped. I only caught it because I tested on the live site afterwards: 1 row → accepted, 6 rows → rejected. Always test the happy path after a security fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 2: a 46 KB file that unzips to 32 MB
&lt;/h2&gt;

&lt;p&gt;Users can upload their Letterboxd export (a ZIP of CSV files). A ZIP bomb is a tiny file that expands to something huge. Mine was 46 KB and unpacked into four 8 MB CSVs. Parsing that kept the server busy for about 50 seconds.&lt;/p&gt;

&lt;p&gt;The fix: check the &lt;strong&gt;unzipped size&lt;/strong&gt; of each file before reading it (the ZIP header tells you), limit the number of files and the compression ratio, cap the rows at 30,000, and only read the columns I actually use. I also rewrote the parsing with vectorized pandas code. A million rows went from minutes to almost instant, with exactly the same output.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 3: the size limit that wasn't
&lt;/h2&gt;

&lt;p&gt;My API rejected requests with a large &lt;code&gt;Content-Length&lt;/code&gt;. But if a client sends the body &lt;strong&gt;chunked&lt;/strong&gt;, there is no &lt;code&gt;Content-Length&lt;/code&gt; header at all, and my check simply didn't run. In testing, a 300 MB body was read into memory.&lt;/p&gt;

&lt;p&gt;Fix: requests without a known length now get &lt;code&gt;411 Length Required&lt;/code&gt;. Boring, one line, important.&lt;/p&gt;

&lt;h2&gt;
  
  
  Problem 4: my server would call any URL you gave it
&lt;/h2&gt;

&lt;p&gt;Push notifications work like this: the browser gives you a subscription URL, and your server sends a request to it. My endpoint accepted &lt;strong&gt;any https URL&lt;/strong&gt;. That means an attacker could make my server send requests to addresses of their choice (this is called SSRF).&lt;/p&gt;

&lt;p&gt;Fix: only accept URLs on the real push services (Google, Mozilla, Apple), remove subscriptions that fail, and compare the cron token with &lt;code&gt;hmac.compare_digest&lt;/code&gt; instead of &lt;code&gt;!=&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The smaller ones
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;An unauthenticated endpoint looked up any key in a third-party API (TMDB) and cached the result. Anyone could burn my API quota and fill a table with junk. Now it only looks up keys that exist in my own data.&lt;/li&gt;
&lt;li&gt;A background job had no per-user lock. 30,000 fake items could start hours of API calls. Now: max 1,500 items, max 2 jobs at once, one per user.&lt;/li&gt;
&lt;li&gt;Game votes could be spammed. Now: max 30 per IP per day.&lt;/li&gt;
&lt;li&gt;Users could save any image URL to their profile. External images can track who views the page. A &lt;code&gt;CHECK&lt;/code&gt; constraint now allows only the trusted image host.&lt;/li&gt;
&lt;li&gt;HSTS without &lt;code&gt;includeSubDomains&lt;/code&gt;, and a service worker that could open another site on notification click.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I'd check first in any Lovable / Bolt app
&lt;/h2&gt;

&lt;p&gt;You don't need to read code for most of these:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Open Supabase → Advisors → Security Advisor.&lt;/strong&gt; Fix everything red. It's free and takes five minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Look at every table where &lt;code&gt;anon&lt;/code&gt; can insert.&lt;/strong&gt; Contact forms, waitlists, analytics. Ask: what stops someone from inserting a million rows?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Check your Storage buckets.&lt;/strong&gt; Is anything marked public that shouldn't be?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Search your deployed site for &lt;code&gt;service_role&lt;/code&gt;.&lt;/strong&gt; Open the site, press F12, search the JavaScript files. If that key is in there, anyone has full access to your database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do you have a backup you've actually restored?&lt;/strong&gt; I set up a weekly encrypted &lt;code&gt;pg_dump&lt;/code&gt; with GitHub Actions, then downloaded it, restored it and compared row counts table by table. Most people have never tried, and a backup you haven't restored is a hope, not a backup.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;The full list with all fixes is in &lt;a href="https://gist.github.com/kushoevskiv/2b903ab2c462d27de8d68fcce764a2b1" rel="noopener noreferrer"&gt;this case study&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I'm a student who builds with AI tools, and I now help other people check and fix their Supabase / Next.js apps. If you want a second pair of eyes on yours, leave a comment or send me a message.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I wrote this post with help from AI tools. The app, the audit findings, the fixes and the live tests are real and from my own project.&lt;/em&gt;&lt;/p&gt;

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