<?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: pam mafeng</title>
    <description>The latest articles on DEV Community by pam mafeng (@mafengpam).</description>
    <link>https://dev.to/mafengpam</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%2F3995584%2Fbc09f46d-74d1-42cf-b584-d0718aa8dcad.jpg</url>
      <title>DEV Community: pam mafeng</title>
      <link>https://dev.to/mafengpam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mafengpam"/>
    <language>en</language>
    <item>
      <title>What I found when I security-scanned 10 AI-built apps (and how to check yours manually)</title>
      <dc:creator>pam mafeng</dc:creator>
      <pubDate>Sun, 21 Jun 2026 17:31:11 +0000</pubDate>
      <link>https://dev.to/mafengpam/what-i-found-when-i-security-scanned-10-ai-built-apps-and-how-to-check-yours-manually-13a2</link>
      <guid>https://dev.to/mafengpam/what-i-found-when-i-security-scanned-10-ai-built-apps-and-how-to-check-yours-manually-13a2</guid>
      <description>&lt;p&gt;AI coding agents — Lovable, bolt.new, Cursor, Replit — have made it possible&lt;br&gt;
for anyone to ship a working app without writing a line of code themselves.&lt;br&gt;
That's genuinely great. It also means a huge and growing number of live apps&lt;br&gt;
were never looked at by anyone who knows what a SQL injection or a missing auth&lt;br&gt;
check looks like.&lt;/p&gt;

&lt;p&gt;The numbers on this aren't subtle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;45–88%&lt;/strong&gt; of AI-generated code samples contain at least one real,
exploitable vulnerability, depending on the study.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;380,000&lt;/strong&gt; publicly exposed assets have been found running on vibe-coding
platforms with no security review — roughly 5,000 of them holding sensitive
corporate data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Moltbook&lt;/strong&gt;, a real app launched in 2026, had 1.5M API tokens and 35,000
user emails exposed in under three minutes. Its founder wrote zero lines of
code himself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Tea App&lt;/strong&gt; left private user images publicly accessible — the kind of
mistake a scanner catches instantly and a busy solo builder never sees.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted to know what this actually looks like in practice, so I found 10 real,&lt;br&gt;
public repos generated by Lovable and bolt.new and ran them through&lt;br&gt;
&lt;a href="https://semgrep.dev" rel="noopener noreferrer"&gt;Semgrep&lt;/a&gt; — free, open-source, no account needed — using&lt;br&gt;
the same rulesets a commercial scanner runs as a baseline (&lt;code&gt;p/secrets&lt;/code&gt; and&lt;br&gt;
&lt;code&gt;p/owasp-top-ten&lt;/code&gt;). Here's what came back, in plain language instead of CVE&lt;br&gt;
numbers.&lt;/p&gt;
&lt;h3&gt;
  
  
  Finding 1: A complete set of production secrets, committed to git
&lt;/h3&gt;

&lt;p&gt;One app — an AI-tooling SaaS — had a &lt;code&gt;.env&lt;/code&gt; and a &lt;code&gt;.env.server&lt;/code&gt; file both&lt;br&gt;
committed directly to the repo. Together they contained an OpenAI API key, a&lt;br&gt;
Supabase &lt;strong&gt;service-role key&lt;/strong&gt; (which bypasses every Row-Level-Security policy&lt;br&gt;
in the database, full read/write on every table), the Supabase &lt;strong&gt;JWT secret&lt;/strong&gt;,&lt;br&gt;
the production database password, a Clerk auth secret key, and a Vercel deploy&lt;br&gt;
token.&lt;/p&gt;

&lt;p&gt;The JWT secret is the one to understand: with it, anyone can mint their own&lt;br&gt;
valid login token for &lt;em&gt;any user, including an admin&lt;/em&gt;, and Supabase's API will&lt;br&gt;
accept it as real. No password, no exploit — just the file sitting in the repo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix&lt;/strong&gt;, if this were your repo: rotate every one of those credentials&lt;br&gt;
today (yes, all of them, not just the obvious one), scrub the files from git&lt;br&gt;
history (deleting the latest commit isn't enough — the old commit still has&lt;br&gt;
it), and add &lt;code&gt;.env*&lt;/code&gt; to &lt;code&gt;.gitignore&lt;/code&gt; before committing again.&lt;/p&gt;
&lt;h3&gt;
  
  
  Finding 2: Row-Level Security disabled mid-migration, no transaction
&lt;/h3&gt;

&lt;p&gt;A financial group-savings app had a migration file that runs&lt;br&gt;
&lt;code&gt;ALTER TABLE public.profiles DISABLE ROW LEVEL SECURITY;&lt;/code&gt;, performs some&lt;br&gt;
unrelated column additions, and re-enables RLS near the bottom of the same&lt;br&gt;
file — without wrapping any of it in &lt;code&gt;BEGIN; ... COMMIT;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This script reads like it was meant to be pasted into Supabase's SQL editor a&lt;br&gt;
block at a time, which is exactly how someone without a database background&lt;br&gt;
fixes things. If anything errors out between the disable and the re-enable —&lt;br&gt;
a typo, a duplicate constraint — the user profiles table (names, emails, phone&lt;br&gt;
numbers) is left wide open with no policy protecting it, and nothing in the UI&lt;br&gt;
tells you that happened.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix:&lt;/strong&gt; wrap fix-up migrations in an explicit transaction so a mid-script&lt;br&gt;
failure rolls everything back together, and re-check the RLS toggle in the&lt;br&gt;
Supabase dashboard after running any migration that touches it.&lt;/p&gt;
&lt;h3&gt;
  
  
  Finding 3: No way to verify security from the repo at all
&lt;/h3&gt;

&lt;p&gt;Across the Supabase-backed apps I scanned, two out of three had no&lt;br&gt;
&lt;code&gt;supabase/migrations&lt;/code&gt; folder and no SQL anywhere in the repo. They had a fully&lt;br&gt;
working Supabase client wired into the frontend, and nothing in version control&lt;br&gt;
showing whether the tables behind it have an RLS policy on them or not.&lt;/p&gt;

&lt;p&gt;This is the one that matters most for how I think about this problem: a code&lt;br&gt;
scanner — including the one I'm building — genuinely can't see this. The&lt;br&gt;
schema and its policies were built by hand in a dashboard and never exported&lt;br&gt;
anywhere reviewable. The risk isn't a bug in the code; it's a decision that was&lt;br&gt;
never written down.&lt;/p&gt;
&lt;h3&gt;
  
  
  How to check your own repo right now
&lt;/h3&gt;

&lt;p&gt;You don't need to wait for a tool. This takes about five minutes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;semgrep
semgrep &lt;span class="nt"&gt;--config&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;p/secrets &lt;span class="nt"&gt;--config&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;p/owasp-top-ten /path/to/your/repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That catches committed secrets and the most common injection/XSS patterns. For&lt;br&gt;
the Supabase-specific gap (Finding 2 and 3), there's no substitute yet for&lt;br&gt;
manually opening your Supabase dashboard, going to Table Editor, and checking&lt;br&gt;
that every table handling real user data has Row-Level Security turned on with&lt;br&gt;
policies that actually scope to &lt;code&gt;auth.uid()&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  What's next
&lt;/h3&gt;

&lt;p&gt;I'm building a tool that runs this kind of scan automatically and turns each&lt;br&gt;
finding into a plain-language explanation — what's wrong, why it actually&lt;br&gt;
matters, the smallest fix — instead of a severity score and a CWE number. If&lt;br&gt;
you want to be notified when it's ready: &lt;a href="https://goosegustin.github.io/vibesafe/" rel="noopener noreferrer"&gt;https://goosegustin.github.io/vibesafe/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>vibecoding</category>
      <category>vulnerabilities</category>
    </item>
  </channel>
</rss>
