<?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: Ohad Krispin</title>
    <description>The latest articles on DEV Community by Ohad Krispin (@ohadkr).</description>
    <link>https://dev.to/ohadkr</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%2F3991233%2Fe0e600e0-6cb9-48f6-9fc4-220851f06795.png</url>
      <title>DEV Community: Ohad Krispin</title>
      <link>https://dev.to/ohadkr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ohadkr"/>
    <language>en</language>
    <item>
      <title>In 47% of 512 Lovable apps, the anon key can call a security definer function</title>
      <dc:creator>Ohad Krispin</dc:creator>
      <pubDate>Thu, 05 Nov 2026 13:26:01 +0000</pubDate>
      <link>https://dev.to/ohadkr/in-47-of-512-lovable-apps-the-anon-key-can-call-a-security-definer-function-2lbk</link>
      <guid>https://dev.to/ohadkr/in-47-of-512-lovable-apps-the-anon-key-can-call-a-security-definer-function-2lbk</guid>
      <description>&lt;p&gt;242 of 512 public Lovable projects (47.3%) define at least one security definer function in &lt;code&gt;public&lt;/code&gt; that a signed-out caller with the anon key can run at &lt;code&gt;/rest/v1/rpc&lt;/code&gt;. We read the functions in 18 of them by hand. In 7, a signed-out caller could create or change rows that belong to other users or to the app. In 2, the function checked the caller first.&lt;/p&gt;

&lt;p&gt;These are repos, not live databases. No database was queried and no function was called.&lt;/p&gt;

&lt;p&gt;I build VibeRaven, an open-source repo check for Vercel + Supabase apps. The scan behind these numbers ran on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a security definer function matters
&lt;/h2&gt;

&lt;p&gt;A security definer function runs with its owner's rights, so RLS does not limit what it touches. On Supabase, Postgres grants &lt;code&gt;EXECUTE&lt;/code&gt; on every new function to &lt;code&gt;PUBLIC&lt;/code&gt;, and Supabase also grants it to &lt;code&gt;anon&lt;/code&gt; and &lt;code&gt;authenticated&lt;/code&gt; in &lt;code&gt;public&lt;/code&gt;. Unless a migration takes that away, anyone holding the anon key can call the function over the API.&lt;/p&gt;

&lt;p&gt;Inside the function, &lt;code&gt;auth.uid()&lt;/code&gt; is null for a signed-out caller. A function that checks it first stops there. A function that takes a user id as an argument and acts on it with no check does whatever the caller asks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we found
&lt;/h2&gt;

&lt;p&gt;Out of 512 public Lovable projects with their own Supabase migrations, counting functions from migrations dated before May 30, 2026:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;47.3% (242)&lt;/strong&gt; have at least one security definer function in &lt;code&gt;public&lt;/code&gt; that no migration closes to &lt;code&gt;anon&lt;/code&gt;. Trigger functions are not counted, because nothing can call them over the API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;13.1% (67)&lt;/strong&gt; have only role-check helpers such as &lt;code&gt;has_role&lt;/code&gt; or &lt;code&gt;is_admin&lt;/code&gt;. With one, a signed-out caller can ask whether a given user id is an admin. &lt;code&gt;has_role&lt;/code&gt; alone appears in 117 repos.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;34.2% (175)&lt;/strong&gt; have at least one function that is not a role check.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;At least 7.8% (40)&lt;/strong&gt; grant &lt;code&gt;EXECUTE&lt;/code&gt; on such a function to &lt;code&gt;authenticated&lt;/code&gt; and never revoke it from &lt;code&gt;anon&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;At least 2.5% (13)&lt;/strong&gt; revoke &lt;code&gt;EXECUTE&lt;/code&gt; from &lt;code&gt;PUBLIC&lt;/code&gt; and stop there, which leaves the separate grant Supabase gives &lt;code&gt;anon&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;May 30 is the cutoff because Supabase began changing default grants for new projects then, and we did not test what a new project grants on functions.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a signed-out caller can do: 18 repos read by hand
&lt;/h2&gt;

&lt;p&gt;We drew 20 repos at random from the 195 with a callable function other than a role check, cloned each at its last commit before the scan, and read every such function. One repo was no longer public, and one had its functions in a migration written after May 30, 2026. That left 18. Each repo is counted once, in the first row it fits.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What a signed-out caller can do&lt;/th&gt;
&lt;th&gt;Repos&lt;/th&gt;
&lt;th&gt;Examples, paraphrased, projects withheld&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Create or change rows that belong to other users or to the app&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;Update any user's profile by id. Issue certificates and badges to any user. Post into any user's notification feed. Change any user's usage credits, where a negative amount refunds them. Set the admin password for a data import. Create active employee accounts. Mint discount codes for any owner.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Read data with no check in the function&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;Ad spend totals, judges' score statistics, a user id looked up by username, and an admin login check with its password written in the migration.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Only low-impact writes&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;Audit log rows, rate-limit counters, cleanup of expired rows, badges a user already qualifies for.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Nothing&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;The function changes only the caller's own row, found by &lt;code&gt;auth.uid()&lt;/code&gt;.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  A check that looks safe and lets the call through
&lt;/h2&gt;

&lt;p&gt;One repo guarded its function like this:&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="n"&gt;if&lt;/span&gt; &lt;span class="n"&gt;p_user_id&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;then&lt;/span&gt;
  &lt;span class="n"&gt;raise&lt;/span&gt; &lt;span class="n"&gt;exception&lt;/span&gt; &lt;span class="s1"&gt;'not allowed'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt; &lt;span class="n"&gt;if&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a signed-out caller &lt;code&gt;auth.uid()&lt;/code&gt; is null, so the comparison is null, and plpgsql treats a null condition as false. The &lt;code&gt;raise&lt;/code&gt; never runs. In that repo the function went on to award a badge to any user who met its requirements. A second repo has a role check of the same shape.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;if auth.uid() is null then raise exception ...&lt;/code&gt;, which other repos in the sample use, does stop the call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Two grant lines that take nothing away
&lt;/h2&gt;

&lt;p&gt;In the hand-read sample, 3 of the 7 repos where a signed-out caller could change data had granted that same function to &lt;code&gt;authenticated&lt;/code&gt;:&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="c1"&gt;-- reads as "signed-in users only"; anon can still call it&lt;/span&gt;
&lt;span class="k"&gt;grant&lt;/span&gt; &lt;span class="k"&gt;execute&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_import_password&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;-- reads as "server only"; anon and authenticated can still call it&lt;/span&gt;
&lt;span class="k"&gt;revoke&lt;/span&gt; &lt;span class="k"&gt;execute&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_import_password&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;grant&lt;/span&gt; &lt;span class="k"&gt;execute&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;set_import_password&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;service_role&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A grant only adds a role. &lt;code&gt;anon&lt;/code&gt; keeps the &lt;code&gt;EXECUTE&lt;/code&gt; it got from Supabase's default privileges. And &lt;code&gt;revoke ... from public&lt;/code&gt; removes the Postgres default but leaves the grants Supabase adds for &lt;code&gt;anon&lt;/code&gt; and &lt;code&gt;authenticated&lt;/code&gt;. Supabase's Advisors docs revoke from &lt;code&gt;anon&lt;/code&gt; and &lt;code&gt;PUBLIC&lt;/code&gt; together for this reason.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check your project and close what anon should not call
&lt;/h2&gt;

&lt;p&gt;Run this in the Supabase SQL editor. It lists the security definer functions in &lt;code&gt;public&lt;/code&gt; and whether a signed-out or signed-in caller can run them:&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;select&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;proname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;pg_get_function_identity_arguments&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;oid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;has_function_privilege&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'anon'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;oid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'execute'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;anon_can_call&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;has_function_privilege&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'authenticated'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;oid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'execute'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;signed_in_can_call&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pg_proc&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;
&lt;span class="k"&gt;join&lt;/span&gt; &lt;span class="n"&gt;pg_namespace&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;oid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pronamespace&lt;/span&gt;
&lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nspname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'public'&lt;/span&gt;
  &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;prosecdef&lt;/span&gt;
  &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;prorettype&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'pg_catalog.trigger'&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;regtype&lt;/span&gt;
&lt;span class="k"&gt;order&lt;/span&gt; &lt;span class="k"&gt;by&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;proname&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If only your server calls a function, revoke all three in one statement:&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;revoke&lt;/span&gt; &lt;span class="k"&gt;execute&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;your_function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;anon&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A helper your policies call, such as &lt;code&gt;has_role&lt;/code&gt;, needs a different fix: move it to a schema the API does not expose and keep &lt;code&gt;EXECUTE&lt;/code&gt; for the roles whose policies use it.&lt;/p&gt;

&lt;p&gt;The repo check flags these in migrations before deploy. On a fixture with one function, &lt;code&gt;add_credits(p_user_id uuid, p_amount integer)&lt;/code&gt;, security definer and granted to &lt;code&gt;authenticated&lt;/code&gt;, &lt;code&gt;npx -y viberaven@1.7.8 check&lt;/code&gt; printed this excerpt (folder shortened; other findings omitted):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;viberaven check · ~/credits-app

🟡 Security definer function callable by the Data API roles  (security_definer_function_executable)
   supabase/migrations/20260301000000_credits.sql:1
   public.add_credits(uuid, integer) at supabase/migrations/20260301000000_credits.sql:1 is security definer, so it runs with its owner's rights and RLS does not limit what it touches. No migration revokes EXECUTE from public, anon, authenticated, so anyone holding the anon key can call it at /rest/v1/rpc/add_credits. It is granted to authenticated on purpose, so this fix only closes it to anonymous callers. If only the server calls it, add: revoke execute on function public.add_credits(uuid, integer) from public, anon; Fix: revoke execute on function public.add_credits(uuid, integer) from public, anon;
   Guide: https://viberaven.dev/supabase-security-definer-function-anon
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It reads the migrations, not the live grants, so run the query above against the project too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method
&lt;/h2&gt;

&lt;p&gt;Public GitHub repos whose &lt;code&gt;package.json&lt;/code&gt; includes &lt;code&gt;lovable-tagger&lt;/code&gt;, Lovable's build tag, found through GitHub code search and kept when they had a &lt;code&gt;supabase/migrations&lt;/code&gt; folder, read with VibeRaven 1.6.1 on October 3, 2026. The check replays the migrations in order and flags a security definer function in &lt;code&gt;public&lt;/code&gt;, other than a trigger function, unless &lt;code&gt;EXECUTE&lt;/code&gt; ends up revoked from &lt;code&gt;public&lt;/code&gt;, &lt;code&gt;anon&lt;/code&gt; and &lt;code&gt;authenticated&lt;/code&gt;. Role-check helpers were sorted by name prefix (&lt;code&gt;has_&lt;/code&gt;, &lt;code&gt;is_&lt;/code&gt;, &lt;code&gt;can_&lt;/code&gt; and a few similar). The hand reading was done on October 19, 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we did not measure
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Whether any function is callable today. A grant changed in the dashboard would not show up, and a repo is not always what is live.&lt;/li&gt;
&lt;li&gt;Functions from migrations after May 30, 2026. They are left out of every number above.&lt;/li&gt;
&lt;li&gt;Every function. The scan lists up to 10 functions per repo, so the grant-to-authenticated and revoke-from-PUBLIC counts can be higher. The 67 role-only repos are complete.&lt;/li&gt;
&lt;li&gt;A random sample. It comes from GitHub search, and public repos lean toward side projects. Read the 18-repo split as examples, and do not scale it to all 242.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Supabase, &lt;a href="https://supabase.com/docs/guides/database/database-advisors" rel="noopener noreferrer"&gt;Advisors&lt;/a&gt; (lints 0028 and 0029)&lt;/li&gt;
&lt;li&gt;Supabase, &lt;a href="https://supabase.com/docs/guides/database/functions" rel="noopener noreferrer"&gt;Database functions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Supabase changelog, &lt;a href="https://supabase.com/changelog/45329-breaking-change-tables-not-exposed-to-data-and-graphql-api-automatically" rel="noopener noreferrer"&gt;Tables not exposed to the Data API automatically&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;PostgreSQL, &lt;a href="https://www.postgresql.org/docs/current/ddl-priv.html" rel="noopener noreferrer"&gt;Privileges&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full post with the method notes: &lt;a href="https://viberaven.dev/blog/supabase-security-definer-functions-512-lovable-repos" rel="noopener noreferrer"&gt;viberaven.dev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Written with help from Claude and Codex. The scan, the hand reading and the numbers are ours.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>supabase</category>
      <category>postgres</category>
      <category>security</category>
      <category>lovable</category>
    </item>
    <item>
      <title>We read the Supabase migrations of 512 Lovable apps: 16% let signed-out visitors rewrite a whole table</title>
      <dc:creator>Ohad Krispin</dc:creator>
      <pubDate>Tue, 03 Nov 2026 22:58:28 +0000</pubDate>
      <link>https://dev.to/ohadkr/we-read-the-supabase-migrations-of-512-lovable-apps-16-let-signed-out-visitors-rewrite-a-whole-2f20</link>
      <guid>https://dev.to/ohadkr/we-read-the-supabase-migrations-of-512-lovable-apps-16-let-signed-out-visitors-rewrite-a-whole-2f20</guid>
      <description>&lt;p&gt;83 of 512 public Lovable projects (16.2%) ship a migration policy that lets signed-out visitors update or delete every row of a table. Another 7 (1.4%) let any signed-in user do it. 53 (10.4%) create a table and never enable row level security on it.&lt;/p&gt;

&lt;p&gt;We read the code the app builder shipped, not the live databases. No database was queried and no project is named.&lt;/p&gt;

&lt;p&gt;I build VibeRaven, an open-source repo check for Vercel + Supabase apps. The scan behind these numbers ran on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why read the code instead of the databases
&lt;/h2&gt;

&lt;p&gt;UpGuard reported 16,326 Supabase databases with tables anyone could read, and pointed at one cause: tables created programmatically through the API, which is how coding agents work, do not get RLS by default. Live scans show what is exposed. They do not show where it came from, so we read the step before the database: the migration files a Lovable project ships with.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we found
&lt;/h2&gt;

&lt;p&gt;Out of 512 public Lovable projects with their own Supabase migrations:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;16.2% (83)&lt;/strong&gt; have a policy that lets signed-out visitors update or delete every row of a table. In another &lt;strong&gt;1.4% (7)&lt;/strong&gt;, a migration revokes the anonymous grant on that table, so any signed-in user can do it instead, and sign-up is usually open. We checked 18 of the 90 by hand and all 18 were real. An independent review of a random 10 confirmed 9; the tenth had dropped the policy inside a dynamic SQL block the scan does not read.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;10.4% (53)&lt;/strong&gt; create a table in a migration and never enable RLS on it. Of 4 reviewed independently, 3 were confirmed and 1 could not be decided from the files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;8% (41)&lt;/strong&gt; let anyone read a table with email or phone columns. Newsletter, contact form and lead tables are left out of this number.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2.7% (14)&lt;/strong&gt; commit a service role or secret key in a &lt;code&gt;.env&lt;/code&gt; file, going by the role inside each key or its &lt;code&gt;sb_secret_&lt;/code&gt; prefix. A later full-repo read found 29.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2.1% (11)&lt;/strong&gt; let anyone read a password or password hash column.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Policy names promise checks the SQL doesn't make
&lt;/h2&gt;

&lt;p&gt;The pattern that surprised us most. These are verbatim from the scan, projects withheld:&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="n"&gt;policy&lt;/span&gt; &lt;span class="nv"&gt;"Owners can update their agents"&lt;/span&gt;
  &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;agents&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;update&lt;/span&gt; &lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;create&lt;/span&gt; &lt;span class="n"&gt;policy&lt;/span&gt; &lt;span class="nv"&gt;"Admin can update admin users"&lt;/span&gt;
  &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;admin_users&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;all&lt;/span&gt; &lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;create&lt;/span&gt; &lt;span class="n"&gt;policy&lt;/span&gt; &lt;span class="nv"&gt;"Admins can view their own account"&lt;/span&gt;
  &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;admin_accounts&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you skim a migration your agent wrote, you read the name. Postgres only runs the &lt;code&gt;using&lt;/code&gt; clause, and &lt;code&gt;using (true)&lt;/code&gt; lets every caller through.&lt;/p&gt;

&lt;h2&gt;
  
  
  The service role policy that opens the table
&lt;/h2&gt;

&lt;p&gt;Another repeat: a policy like &lt;code&gt;"Service role can manage all sessions"&lt;/code&gt; with &lt;code&gt;using (true)&lt;/code&gt;. The service role bypasses RLS anyway, so it never needs a policy. A policy like that only opens the table to everyone else, unless it is limited with &lt;code&gt;to service_role&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check your own project
&lt;/h2&gt;

&lt;p&gt;Run this in the Supabase SQL editor. Every row is a policy that lets everyone through:&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;select&lt;/span&gt; &lt;span class="n"&gt;tablename&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;policyname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cmd&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;qual&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;with_check&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pg_policies&lt;/span&gt;
&lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;schemaname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'public'&lt;/span&gt;
  &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;qual&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'true'&lt;/span&gt; &lt;span class="k"&gt;or&lt;/span&gt; &lt;span class="n"&gt;with_check&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'true'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;select&lt;/code&gt; on content that is meant to be public is fine. &lt;code&gt;update&lt;/code&gt;, &lt;code&gt;delete&lt;/code&gt; or &lt;code&gt;all&lt;/code&gt; almost never is. Read the &lt;code&gt;qual&lt;/code&gt; column, not the policy name.&lt;/p&gt;

&lt;p&gt;The repo check reads the same thing from migrations, with file and line, and says when a policy name promises owners or admins that the SQL does not check. On a two-policy fixture, &lt;code&gt;npx -y viberaven@1.7.8 check&lt;/code&gt; printed (folder shortened, the monitoring note cut):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;viberaven check · ~/agents-app

🔴 A policy lets anyone write every row  (rls_policy_allows_all_write)
   supabase/migrations/20260301000000_agents.sql:9
   Policy "Owners can update their agents" on public.agents lets anyone, signed in or not, update every row, to any values: using (true). The name says "Owners can update their agents", but nothing in the policy checks who the caller is.
🟡 A policy lets anyone read every row  (rls_policy_allows_all_read)
   supabase/migrations/20260301000000_agents.sql:8
   Policy "Anyone can view agents" on public.agents lets anyone, signed in or not, read every row: using (true). Fine for truly public content; wrong for anything per-user.

Verdict: ❌ 1 blocker, 1 warning · score 65
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is a repository check, not a live database test, so run the SQL above against the live project too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Method and limits
&lt;/h2&gt;

&lt;p&gt;We found public GitHub repos whose &lt;code&gt;package.json&lt;/code&gt; includes &lt;code&gt;lovable-tagger&lt;/code&gt;, Lovable's build tag, through GitHub code search in October 2026, and kept the 512 with a &lt;code&gt;supabase/migrations&lt;/code&gt; folder. Each repo was read with VibeRaven 1.6.1, then filtered to strict criteria: only policies in &lt;code&gt;supabase/migrations&lt;/code&gt; count, newsletter and contact tables are excluded from the personal data number, and tables a migration loop may put under RLS are left out of the RLS number. Then samples were checked by hand.&lt;/p&gt;

&lt;p&gt;Policies and grants are separate checks in Supabase: a policy only matters for roles that hold a grant on the table. We counted a table as open to signed-out visitors only when no migration revokes the anonymous grant on it. A grant changed outside the migrations would not show up.&lt;/p&gt;

&lt;p&gt;The sample is not random. It comes from GitHub search, and public repos lean toward side projects. A repo is also not always what is live; someone may have fixed a table in the dashboard. Treat these numbers as what shipped in the code, not as what is exposed right now.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Is &lt;code&gt;using (true)&lt;/code&gt; always wrong?&lt;/strong&gt; No. On a &lt;code&gt;select&lt;/code&gt; policy for content meant to be public it is fine. On &lt;code&gt;update&lt;/code&gt;, &lt;code&gt;delete&lt;/code&gt; or &lt;code&gt;all&lt;/code&gt; it lets anyone change or remove every row.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does this mean 16.2% of Lovable apps are exposed right now?&lt;/strong&gt; No. These are public repos from GitHub search, and the code is not always what is live.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Supabase, &lt;a href="https://supabase.com/docs/guides/database/postgres/row-level-security" rel="noopener noreferrer"&gt;Row Level Security&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;PostgreSQL, &lt;a href="https://www.postgresql.org/docs/current/ddl-rowsecurity.html" rel="noopener noreferrer"&gt;Row Security Policies&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full post: &lt;a href="https://viberaven.dev/blog/supabase-policies-512-lovable-repos" rel="noopener noreferrer"&gt;viberaven.dev&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Written with help from Claude. The scan, the hand checks and the numbers are ours.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>supabase</category>
      <category>postgres</category>
      <category>security</category>
      <category>lovable</category>
    </item>
    <item>
      <title>16,326 Supabase databases are readable by anyone. Here's how to check yours in two minutes</title>
      <dc:creator>Ohad Krispin</dc:creator>
      <pubDate>Fri, 02 Oct 2026 19:12:20 +0000</pubDate>
      <link>https://dev.to/ohadkr/16326-supabase-databases-are-readable-by-anyone-heres-how-to-check-yours-in-two-minutes-3p46</link>
      <guid>https://dev.to/ohadkr/16326-supabase-databases-are-readable-by-anyone-heres-how-to-check-yours-in-two-minutes-3p46</guid>
      <description>&lt;p&gt;UpGuard Research looked at about 300,000 domains that use Supabase and found 16,326 databases exposing tables that anyone could read. Over half had signs of personal data. Some had passwords or authentication tokens.&lt;/p&gt;

&lt;p&gt;These weren't abstract records. A US valet service exposed over 100,000 customers, about 78,000 of them with license plate numbers. A Canadian immigration coaching service had 884 passwords stored in plain text. A consulate exposed 25,000 people with their home addresses.&lt;/p&gt;

&lt;p&gt;Supabase itself wasn't breached. Every one of these was a configuration problem in the app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this keeps happening with AI-built apps
&lt;/h2&gt;

&lt;p&gt;The line in UpGuard's report that matters most for anyone building with Lovable, Bolt, Cursor or Claude Code:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Tables created programmatically through the API, which is how coding agents interact with Supabase, do not enable RLS by default."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;When you create a table in the Supabase dashboard, row level security is switched on for you. When your coding agent creates it through a migration or the API, it isn't. Your frontend ships the anon key to every visitor, and with RLS off, that key can read and change the whole table through the Data API.&lt;/p&gt;

&lt;p&gt;The second pattern is the service role key. It bypasses RLS completely, and agents sometimes put it in a variable like &lt;code&gt;NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY&lt;/code&gt;. Anything with &lt;code&gt;NEXT_PUBLIC_&lt;/code&gt; ends up in the browser bundle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check 1: in the database (free, 30 seconds)
&lt;/h2&gt;

&lt;p&gt;Open the SQL editor in your Supabase project and run:&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;select&lt;/span&gt; &lt;span class="n"&gt;schemaname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tablename&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pg_tables&lt;/span&gt;
&lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;schemaname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'public'&lt;/span&gt; &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="n"&gt;rowsecurity&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every row it returns is a public table without RLS. If any of them hold user data, enable RLS and add policies before anything else:&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;alter&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;your_table&lt;/span&gt; &lt;span class="n"&gt;enable&lt;/span&gt; &lt;span class="k"&gt;row&lt;/span&gt; &lt;span class="k"&gt;level&lt;/span&gt; &lt;span class="k"&gt;security&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then add a policy for who can actually read it. Enabling RLS with no policy blocks everyone, which is safe but will break your app until you add one.&lt;/p&gt;

&lt;p&gt;One trap this query misses: views. Supabase's own docs say "Views bypass RLS by default because they are usually created with the &lt;code&gt;postgres&lt;/code&gt; user." A view over a protected table can hand out every row. On Postgres 15 and above, create views like this so they follow the table's policies:&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;view&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;your_view&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;security_invoker&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;true&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="p"&gt;...;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Check 2: in the repo (free, before you deploy)
&lt;/h2&gt;

&lt;p&gt;The SQL check sees today's database. It doesn't see the migration your agent is about to push, or a key sitting in a client file.&lt;/p&gt;

&lt;p&gt;I built a free command line check for this, VibeRaven. It runs on your machine and reads the repo: migrations, env files and client code. It never asks for your database credentials.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx &lt;span class="nt"&gt;-y&lt;/span&gt; viberaven@1.6.1 check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's what it prints on a small Next.js + Supabase test app with two common mistakes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🔴 No RLS policy proof in migrations  (rls_disabled)
   1 public table without row level security: public.profiles
   (supabase/migrations/0001_init.sql:1). Anyone holding the anon key your
   frontend ships can read and change those rows through the Data API.
🔴 Service role key in a client-prefixed env variable  (service_role_key_in_client_env)
   .env.example:3: NEXT_PUBLIC_SUPABASE_SERVICE_ROLE_KEY names a service role
   or secret key under the NEXT_PUBLIC_ prefix. NEXT_PUBLIC_* variables are
   exposed to client code by Next.js, so anyone who loads the app can read it
   and skip RLS entirely. Rename it without the prefix, read it only in server
   code, and rotate the key.
🟡 A policy lets anyone read every row  (rls_policy_allows_all_read)
   Policy "anyone can read notes" on public.notes lets anyone, signed in or
   not, read every row: using (true). Fine for truly public content; wrong for
   anything per-user.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each finding names the file and line, so you can hand it straight to your agent.&lt;/p&gt;

&lt;p&gt;What it can't do: it reads files, so a policy someone changed by hand in the dashboard is invisible to it. Use the SQL check above for that. It's advice for you to act on, not a security audit.&lt;/p&gt;

&lt;h2&gt;
  
  
  The short version
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Run the SQL query. Any table it lists with user data needs RLS today.&lt;/li&gt;
&lt;li&gt;Search your env files for &lt;code&gt;NEXT_PUBLIC_&lt;/code&gt; next to anything called service role or secret. If you find one, move it server side and rotate the key.&lt;/li&gt;
&lt;li&gt;Before your agent's next migration ships, check the repo too.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And one date to know: Supabase is changing how new tables reach the Data API. From October 30, new tables in existing projects stop being exposed automatically. That helps, but it doesn't fix the tables you already have.&lt;/p&gt;

&lt;p&gt;UpGuard's full report: &lt;a href="https://www.upguard.com/blog/everything-everywhere-systemic-data-exposure-in-supabase-apps" rel="noopener noreferrer"&gt;https://www.upguard.com/blog/everything-everywhere-systemic-data-exposure-in-supabase-apps&lt;/a&gt;&lt;/p&gt;

</description>
      <category>supabase</category>
      <category>security</category>
      <category>webdev</category>
      <category>ai</category>
    </item>
    <item>
      <title>Your AI agent has amnesia. Your logs are the cure.</title>
      <dc:creator>Ohad Krispin</dc:creator>
      <pubDate>Mon, 13 Jul 2026 21:58:02 +0000</pubDate>
      <link>https://dev.to/ohadkr/your-ai-agent-has-amnesia-your-logs-are-the-cure-3nbm</link>
      <guid>https://dev.to/ohadkr/your-ai-agent-has-amnesia-your-logs-are-the-cure-3nbm</guid>
      <description>&lt;p&gt;I'm going to show you what's hiding in your AI coding logs, and how I turned nine months of mine into a file my agent reads before every task.&lt;/p&gt;

&lt;h2&gt;
  
  
  Every agent starts cold
&lt;/h2&gt;

&lt;p&gt;Every Claude Code or Codex session you run gets written to disk. Full transcripts. Nobody ever opens them.&lt;/p&gt;

&lt;p&gt;And every new session, the agent meets you for the first time again. You re-explain how you work, what you want, what you never want. Every single time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Your logs already know you
&lt;/h2&gt;

&lt;p&gt;I had nine months of those logs. 1,870 sessions, just sitting in a folder doing nothing.&lt;/p&gt;

&lt;p&gt;At some point it clicked that they were the most honest record of how I actually work. More honest than my rules file, my docs, anything I wrote down on purpose.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rules files are aspirational. Logs are behavioral.
&lt;/h2&gt;

&lt;p&gt;Your CLAUDE.md is who you think you are on a good day.&lt;/p&gt;

&lt;p&gt;Your logs are who you actually are. Every time you stopped the agent. Every "no, just fix the one thing." Every time you refused to accept "done" without proof. You never wrote those rules down. You enforced them, hundreds of times, without noticing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's actually in there
&lt;/h2&gt;

&lt;p&gt;Raw logs are mostly noise: tool output, file dumps, pasted errors. Nine months of mine boiled down to about 3M tokens of just my own typed words.&lt;/p&gt;

&lt;p&gt;That corpus knows things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what "done" means to you&lt;/li&gt;
&lt;li&gt;what you reject on sight&lt;/li&gt;
&lt;li&gt;when you demand proof instead of trusting the agent&lt;/li&gt;
&lt;li&gt;how you actually talk when you're working&lt;/li&gt;
&lt;li&gt;the behaviors that make you kill a task&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The mine
&lt;/h2&gt;

&lt;p&gt;So I built Ditto. Open source. It reads the local logs, keeps only your words, redacts secrets, splits your history into slices, and has agents read each slice for repeated patterns. A rule only survives if it shows up across multiple distinct sessions, and every rule keeps dated quotes as receipts.&lt;/p&gt;

&lt;p&gt;Then it installs the result as a skill your agent loads before every task.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changed
&lt;/h2&gt;

&lt;p&gt;Same model. It just stopped guessing.&lt;/p&gt;

&lt;p&gt;It quit suggesting the rewrites I always reject. It shows me proof before it says done, because my own history told it I never accept done without one.&lt;/p&gt;

&lt;p&gt;Not a smarter agent. The same agent, finally briefed on who it's working for.&lt;/p&gt;

&lt;h2&gt;
  
  
  The red part
&lt;/h2&gt;

&lt;p&gt;When the mine finishes it renders a card: your archetype, your top laws ranked by how many real sessions back them, and one line it calls the uncomfortable truth. The thing your history proves that you'd never say about yourself out loud.&lt;/p&gt;

&lt;p&gt;Run it and read your own.&lt;/p&gt;

&lt;h2&gt;
  
  
  The card
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;your logs are the most honest record of how you work&lt;/li&gt;
&lt;li&gt;rules files are aspirational, logs are behavioral&lt;/li&gt;
&lt;li&gt;a rule only counts with receipts from multiple real sessions&lt;/li&gt;
&lt;li&gt;everything stays on your machine&lt;/li&gt;
&lt;li&gt;your agent reads it before every task&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One command:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npx skills add ohad6k/ditto&lt;/code&gt;&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/ohad6k" rel="noopener noreferrer"&gt;
        ohad6k
      &lt;/a&gt; / &lt;a href="https://github.com/ohad6k/ditto" rel="noopener noreferrer"&gt;
        ditto
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Mine your Claude Code and Codex logs into a local you.md agent profile.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/ohad6k/ditto/assets/ditto.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fohad6k%2Fditto%2FHEAD%2Fassets%2Fditto.png" width="360" alt="Ditto"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Ditto&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;b&gt;Your AI agents act like they just met you. Ditto fixes that.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/e254c0efed546a97ce6205e9a604c563ddc4706b911d94293df43c923839ba7d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6f686164366b2f646974746f3f7374796c653d666f722d7468652d626164676526636f6c6f723d336133613361266c6162656c436f6c6f723d313431343134266c6f676f3d676974687562266c6f676f436f6c6f723d77686974652663616368655365636f6e64733d31383030"&gt;&lt;img src="https://camo.githubusercontent.com/e254c0efed546a97ce6205e9a604c563ddc4706b911d94293df43c923839ba7d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6f686164366b2f646974746f3f7374796c653d666f722d7468652d626164676526636f6c6f723d336133613361266c6162656c436f6c6f723d313431343134266c6f676f3d676974687562266c6f676f436f6c6f723d77686974652663616368655365636f6e64733d31383030" alt="stars"&gt;&lt;/a&gt;
&lt;a href="https://discord.gg/VNnMq2U5r" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/bad4e16b14fe6b44766789f46a534b55facd38978aabd489370c8cbf6c8f05da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f646973636f72642d6a6f696e2d3361336133613f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d313431343134266c6f676f3d646973636f7264266c6f676f436f6c6f723d7768697465" alt="discord"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/9e501e629f1a995f1d6ec7dc8c26c5aabf4ab9df42d81ec6e177f632aa5b7ee7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3361336133613f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d313431343134"&gt;&lt;img src="https://camo.githubusercontent.com/9e501e629f1a995f1d6ec7dc8c26c5aabf4ab9df42d81ec6e177f632aa5b7ee7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d3361336133613f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d313431343134" alt="MIT"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/53f6ccaea53ea04179c13cf3910f2dbeaac28176579f7c40ac2fa2aa1d18f60b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d7a65726f5f646570732d3361336133613f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d313431343134266c6f676f3d707974686f6e266c6f676f436f6c6f723d7768697465"&gt;&lt;img src="https://camo.githubusercontent.com/53f6ccaea53ea04179c13cf3910f2dbeaac28176579f7c40ac2fa2aa1d18f60b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f707974686f6e2d7a65726f5f646570732d3361336133613f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d313431343134266c6f676f3d707974686f6e266c6f676f436f6c6f723d7768697465" alt="Python, zero dependencies"&gt;&lt;/a&gt;
&lt;a rel="noopener noreferrer nofollow" href="https://camo.githubusercontent.com/d27ebd0b7e15a36db205dc96c69e33c0623df1cee828d3f7c5fe7e62803a400c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f776f726b735f776974682d636c617564655fc2b75f636f6465785fc2b75f637572736f725fc2b75f636f70696c6f742d3134313431343f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d336133613361"&gt;&lt;img src="https://camo.githubusercontent.com/d27ebd0b7e15a36db205dc96c69e33c0623df1cee828d3f7c5fe7e62803a400c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f776f726b735f776974682d636c617564655fc2b75f636f6465785fc2b75f637572736f725fc2b75f636f70696c6f742d3134313431343f7374796c653d666f722d7468652d6261646765266c6162656c436f6c6f723d336133613361" alt="works with claude, codex, cursor, copilot"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Your real coding-agent sessions already contain the rules you never wrote down: what “done” means, what you reject on sight, how you debug, how you design UI, and how you write when you are actually working.&lt;/p&gt;

&lt;p&gt;Ditto mines selected evidence from those sessions — Claude Code, Codex, Copilot CLI, and OpenCode logs out of the box — into a private working profile your agent reads before every task. Separate layers for work, design, and writing mean the right part of you loads for the right task.&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Not memory&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;Memory is what you explicitly told the model.&lt;/p&gt;

&lt;p&gt;Ditto mines what your work already proved about you: what you reject, what "done" means, when you ask for proof, how you talk when you're actually working, and the agent behaviors that make you stop the task.&lt;/p&gt;

&lt;p&gt;That's why it reads…&lt;/p&gt;&lt;/div&gt;


&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/ohad6k/ditto" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fiwadfbqxaimq46aukcs3.png" alt=" " width="800" height="320"&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Your AI coding agent starts every session like it just met you</title>
      <dc:creator>Ohad Krispin</dc:creator>
      <pubDate>Fri, 10 Jul 2026 10:26:51 +0000</pubDate>
      <link>https://dev.to/ohadkr/your-ai-coding-agent-starts-every-session-like-it-just-met-you-1159</link>
      <guid>https://dev.to/ohadkr/your-ai-coding-agent-starts-every-session-like-it-just-met-you-1159</guid>
      <description>&lt;p&gt;Your AI coding agent starts every session like it just met you&lt;/p&gt;




&lt;p&gt;I have eight months of Claude Code and Codex logs sitting on my disk. Roughly 1,600 sessions, close to 3 million tokens of me actually working. Every argument about whether something was "done," every time I rejected a design, every "no, do it this way." It is the most honest record that exists of how I think when I build.&lt;/p&gt;

&lt;p&gt;And every new session, my agent reads none of it. It starts from zero. Polite, capable, and with no idea who it's talking to.&lt;/p&gt;

&lt;p&gt;So I built a small tool to fix that. It's called Ditto, it's one Python file, and it's open source.&lt;/p&gt;

&lt;h2&gt;
  
  
  Memory is what you told the model. This is what your work proved.
&lt;/h2&gt;

&lt;p&gt;Most "memory" for agents is a file where you write down facts about yourself. Your stack, your preferences, your rules. That's fine, but it has a problem: it's you performing for the agent. You write the version of yourself you think you should be.&lt;/p&gt;

&lt;p&gt;Your session logs are the opposite. Nobody performs in a debugging session at 1am. The logs hold what you actually reject, what "done" actually means to you, when you actually stop and ask for proof, how you actually talk when you're heads-down. That's the raw material Ditto reads. Not your &lt;code&gt;CLAUDE.md&lt;/code&gt;. The real transcripts.&lt;/p&gt;

&lt;p&gt;It mines those into a &lt;code&gt;you.md&lt;/code&gt; your agent loads before every task.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works (the whole thing is auditable)
&lt;/h2&gt;

&lt;p&gt;There's no service, no account, no magic. It's a stdlib Python script you can read top to bottom:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It finds your local session logs (&lt;code&gt;~/.claude&lt;/code&gt;, &lt;code&gt;~/.codex&lt;/code&gt;, Copilot) and pulls out the messages &lt;em&gt;you&lt;/em&gt; typed. Not the agent's replies. You.&lt;/li&gt;
&lt;li&gt;It &lt;strong&gt;redacts secrets and PII before anything is written to disk&lt;/strong&gt;. Keys, tokens, emails, the usual. This happens first, not as a cleanup pass.&lt;/li&gt;
&lt;li&gt;It dedupes the long repeated blocks (the same spec pasted 40 times) so you're not mining noise.&lt;/li&gt;
&lt;li&gt;It writes the redacted corpus into chunks sized for an agent to actually read.&lt;/li&gt;
&lt;li&gt;You point your coding agent at those chunks with the included mining prompt, and it compiles a &lt;code&gt;you.md&lt;/code&gt;: your working laws, your taste, the agent behaviors that make you stop the task, with real quotes as evidence.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The extractor itself makes zero network calls. The only text that reaches a model is the redacted chunks you hand to your own agent, in your own tool. On a local model, the whole thing stays on your machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually changes
&lt;/h2&gt;

&lt;p&gt;Here's a real run. I asked an agent to help me launch this repo. One line: &lt;strong&gt;"help me post ditto on reddit."&lt;/strong&gt; Same model, once cold, once with my Ditto profile loaded.&lt;/p&gt;

&lt;p&gt;Cold, it gave me the confident generic thing: a title with a colon in it, three bullet points about "key features," an emoji, a call to action. The kind of post that reads like every other launch and gets scrolled past.&lt;/p&gt;

&lt;p&gt;With my profile loaded, it wrote the way I actually post. Lowercase, no hype, led with the uncomfortable part instead of the feature list, and stopped trying to sell. Because the logs had taught it that I reject exactly that kind of launch copy, every time.&lt;/p&gt;

&lt;p&gt;That's the difference. Not "the agent knows my name." The agent makes the same taste calls I would have made, so I'm editing instead of rewriting.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it doesn't do yet
&lt;/h2&gt;

&lt;p&gt;Being honest, because this is early open source:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It samples your history, it doesn't read every token of it. A rare habit you only showed once might not make the cut. That's a deliberate tradeoff against cost, and I'm calibrating where the line sits.&lt;/li&gt;
&lt;li&gt;The profile is only as good as your logs. If you've done two weeks of coding with an agent, there isn't much to mine yet.&lt;/li&gt;
&lt;li&gt;It reads how you work, not what you know. It won't replace your notes or your docs. It sits next to them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it and tell me the weird one
&lt;/h2&gt;

&lt;p&gt;If you run it, the interesting moment is when it surfaces something true about you that you never wrote down. When that happens, &lt;a href="https://github.com/ohad6k/ditto/issues/1" rel="noopener noreferrer"&gt;post the single weirdest trait it found&lt;/a&gt;. Not your whole &lt;code&gt;you.md&lt;/code&gt;, just the one line that got you.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/ohad6k/ditto" rel="noopener noreferrer"&gt;github.com/ohad6k/ditto&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If it breaks, or it misses something about how you work that it should have caught, open an issue. Every real history I get to test it against makes the mining sharper.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>discuss</category>
      <category>webdev</category>
    </item>
    <item>
      <title>AI Can Build the Prototype. Production Is Still the Hard Part.</title>
      <dc:creator>Ohad Krispin</dc:creator>
      <pubDate>Thu, 18 Jun 2026 16:02:07 +0000</pubDate>
      <link>https://dev.to/ohadkr/ai-can-build-the-prototype-production-is-still-the-hard-part-2adk</link>
      <guid>https://dev.to/ohadkr/ai-can-build-the-prototype-production-is-still-the-hard-part-2adk</guid>
      <description>&lt;p&gt;AI coding tools make it very easy to get an app running.&lt;/p&gt;

&lt;p&gt;But getting from “it works locally” to “real users can depend on this” is still where things get messy:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;auth providers&lt;/li&gt;
&lt;li&gt;environment variables&lt;/li&gt;
&lt;li&gt;Supabase/RLS&lt;/li&gt;
&lt;li&gt;webhooks&lt;/li&gt;
&lt;li&gt;billing&lt;/li&gt;
&lt;li&gt;deployment settings&lt;/li&gt;
&lt;li&gt;provider dashboards&lt;/li&gt;
&lt;li&gt;monitoring&lt;/li&gt;
&lt;li&gt;version control hygiene&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I built VibeRaven as an open-source tool to help with that gap.&lt;/p&gt;

&lt;p&gt;Instead of treating production readiness as a vague checklist, it scans the repo and creates a mission map of what exists, what is missing, what needs provider action, and what should be verified before launch.&lt;/p&gt;

&lt;p&gt;GitHub:&lt;br&gt;
&lt;a href="https://github.com/ohad6k/VibeRaven" rel="noopener noreferrer"&gt;https://github.com/ohad6k/VibeRaven&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run it with:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
bash
npx -y viberaven
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>devops</category>
      <category>opensource</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
