<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ProofForge]]></title><description><![CDATA[ProofForge]]></description><link>https://proofforge.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 13:58:59 GMT</lastBuildDate><atom:link href="https://proofforge.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Your Claude Code app can expose an API key even after a clean repo review]]></title><description><![CDATA[If you think a Claude Code app may have shipped an API key, paste the live URL into the free scan. ProofForge is the leak check for the app you actually…]]></description><link>https://proofforge.hashnode.dev/your-claude-code-app-can-expose-an-api-key-even-after-a-clean-repo-review</link><guid isPermaLink="true">https://proofforge.hashnode.dev/your-claude-code-app-can-expose-an-api-key-even-after-a-clean-repo-review</guid><category><![CDATA[Security]]></category><category><![CDATA[vibe coding]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 13:10:32 GMT</pubDate><content:encoded><![CDATA[<p>If you think a Claude Code app may have shipped an API key, paste the live URL into the <a href="https://proofforge.live/check">free scan</a>. ProofForge is the leak check for the app you actually shipped: it scans your live URL, not your repo, and gives you the exact fix for Claude Code. The first fix is free. All remaining fixes are $9 once, or $29 Fix + Guard with on-demand rechecks. No account. 14-day money-back. <a href="https://proofforge.live/pricing">Pay with PayPal</a>.</p>
<p>Claude Code is good at reading a repository. You can ask it to review secret handling, point it at server-only files, and have it rewrite a client component that was calling a provider directly. That review is worth doing, and you should read the diff before you deploy. It does not prove that the production URL matches the files you just approved.</p>
<p>The agent can change the tree again after the review. The host (Vercel, Netlify, Railway, a VPS) can inject a different set of environment variables than your laptop uses. A <code>NEXT_PUBLIC_</code> or <code>VITE_</code> prefix can copy a value into the browser even when the same name is also in a server secret store. A <code>.env</code> that was never meant to be downloaded can still be sitting on the hosted origin. None of those show up as a red flag in a local <code>git grep</code> of the last reviewed commit.</p>
<p>Only test a URL you own.</p>
<h2>How a key actually gets into the published app</h2>
<p>Four paths show up over and over with agent-built frontends.</p>
<p><strong>The public prefix.</strong> A variable named <code>NEXT_PUBLIC_OPENAI_API_KEY</code> or <code>VITE_ANTHROPIC_API_KEY</code> is not a secret once the app is built. The prefix means "put this in the client." If the agent needed a call to work in the browser, it will often reach for that prefix. The <a href="https://proofforge.live/fix/vite-env-secrets">Vite env secret</a> write-up is the usual repair: move the call to a server route, rename the variable, redeploy.</p>
<p><strong>A key pasted into a component "for a minute."</strong> Chat sessions are messy. A key that was dropped into a file to unblock a demo can survive into the commit that gets deployed. Claude Code will not always delete it later unless you ask, and a later review can miss a string that no longer looks like an assignment.</p>
<p><strong>The file the host serves by accident.</strong> An <a href="https://proofforge.live/fix/env-file-exposed">exposed <code>.env</code></a>, a <a href="https://proofforge.live/fix/git-folder-exposed"><code>.git</code> directory</a>, or a production <a href="https://proofforge.live/fix/source-maps-exposed">source map</a> can hand a visitor the same values you thought were only on the server. A repo review that never requests those URLs will not see them.</p>
<p><strong>The backend key that does not belong in any frontend, ever.</strong> A Stripe secret key, an Anthropic key, an OpenAI key, or a database service-role key has no business in HTML or JavaScript. If it is there, treat it as already copied. The <a href="https://proofforge.live/fix/openai-key-exposed">OpenAI</a>, <a href="https://proofforge.live/fix/anthropic-key-exposed">Anthropic</a> and <a href="https://proofforge.live/fix/stripe-secret-key-exposed">Stripe secret</a> fixes start with rotation, not with a comment in the code.</p>
<p>A publishable client token (a Supabase anon key, a Stripe publishable key, a Firebase web <code>apiKey</code>) is a different case. Those are often meant to be in the browser. The question then becomes whether the backend policy behind them is tight, not whether the token string is visible.</p>
<h2>What to do in the first hour if you already found a privileged key</h2>
<ol>
<li>Revoke or rotate it at the provider. Do not wait until the next deploy is green. A key in a public bundle has been downloadable for as long as that deploy has been live.</li>
<li>Check the provider dashboard for use you did not authorize: model calls, a sudden bill, new webhooks, unexpected charges.</li>
<li>Put the new value in the host's server-side secret store. Read it only from server code. Do not paste the new key back into the Claude Code chat if you can avoid it, and do not commit it to the repo.</li>
<li>Remove the old value from every client file, every public-prefixed env name, and any <code>.env</code> that might be served. Search the published JavaScript, not just the workspace, to make sure a previous build artifact is not still referenced.</li>
<li>Redeploy, then prove the live URL. A clean local tree is not proof.</li>
</ol>
<p>If the finding was a database service-role key, also assume anonymous clients may have been able to bypass row policies until that key is dead. Rotate it, then test signed-out reads on private tables.</p>
<h2>Prove the published URL before you call the app safe to launch</h2>
<p>Ask Claude Code for a second review if you want, then ignore it as evidence about production. Production evidence is the live host.</p>
<p>Paste the production URL into the <a href="https://proofforge.live/check/claude-code">Claude Code check</a>. The scan is read-only. It looks at public HTML, JavaScript, selected files, headers and supported anonymous backend signals. It does not sign in, it does not use a key it finds, and it does not inspect local files, agent memory, shell history or private host settings.</p>
<p>You get a grade, every finding's severity, and the first fix in full, written as something you can take back to Claude Code. If there is more than one issue, the $9 Fix Report unlocks the rest once. $29 Fix + Guard adds on-demand rechecks after the next deploys. Pay with PayPal.</p>
<p>After you apply the fix and the host finishes the deploy, run the same check on the same URL again. Also do a signed-out click-through, and a two-account test if the app stores user data. A repo that "looks clean" is not a launch decision.</p>
<p>If a privileged key or an open customer table is still on the live host, you do not share the link. If the published URL is clean, the policies reject anonymous reads of private data, and you have re-scanned after the last deploy, you have a serious answer to "is this Claude Code app safe to launch?" Start that check here: <a href="https://proofforge.live/check/claude-code">proofforge.live/check/claude-code</a>.</p>
<p><em>Built by <a href="https://x.com/brennanzambo">Brennan Zambo</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Your Supabase anon key showed up in the JavaScript. Here's what to do.]]></title><description><![CDATA[You opened the published site, searched the JavaScript, and found a Supabase key. Or a scanner, a leaked-key email, or a teammate flagged it. The first…]]></description><link>https://proofforge.hashnode.dev/your-supabase-anon-key-showed-up-in-the-javascript-here-s-what-to-do</link><guid isPermaLink="true">https://proofforge.hashnode.dev/your-supabase-anon-key-showed-up-in-the-javascript-here-s-what-to-do</guid><category><![CDATA[RLS]]></category><category><![CDATA[lovable]]></category><category><![CDATA[vibe coding]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 12:28:22 GMT</pubDate><content:encoded><![CDATA[<p>You opened the published site, searched the JavaScript, and found a Supabase key. Or a scanner, a leaked-key email, or a teammate flagged it. The first instinct is to rotate everything and republish. Sometimes that is exactly right. Sometimes it does nothing useful and leaves the real hole — an open policy — untouched.</p>
<p>Do this in order. Do not skip the identification step.</p>
<p>ProofForge is the leak check for the app you actually shipped. It scans your live URL, not your repo, and gives you the exact fix for your builder. After you know which key you are looking at, paste the published URL into the <a href="https://proofforge.live/check">free scan</a>. The first fix is free. Every remaining fix is $9 once.</p>
<h2>Step 1: Identify the key before you touch anything</h2>
<p>Supabase issues more than one kind of credential, and they are not interchangeable.</p>
<p><strong>Legacy JWTs.</strong> Older projects still use JWT-shaped keys. Paste the value into a JWT decoder that runs in your browser and look at the <code>role</code> claim. The <a href="https://proofforge.live/tools/supabase-jwt-role-decoder">Supabase JWT role decoder</a> does this locally; the token is not sent anywhere. A <code>role</code> of <code>anon</code> (or <code>authenticated</code> in some wrappers) is the public client key. A <code>role</code> of <code>service_role</code> is the privileged key that bypasses Row Level Security. Decoding does not verify the signature or prove the key is still valid. It tells you which kind you found.</p>
<p><strong>Newer keys.</strong> <code>sb_publishable_…</code> is the public client key (the successor to the anon JWT). <code>sb_secret_…</code> is the privileged secret (the successor to <code>service_role</code>). The prefix is the signal; there is no role claim to decode.</p>
<p>A project URL (<code>https://xxxx.supabase.co</code>) next to a public key is normal. A <code>service_role</code> JWT or an <code>sb_secret_</code> key in the browser is not.</p>
<p>If you are not sure, treat a privileged-looking value as privileged until the decoder or the prefix says otherwise. Do not paste a service role key into a chat, a ticket, or a public gist.</p>
<h2>Step 2: If it is a service role or secret key, rotate first</h2>
<p>A <code>service_role</code> or <code>sb_secret_</code> key in client code is a break-glass event. Anyone who copied the bundle can talk to your project with RLS turned off.</p>
<ol>
<li>In the Supabase dashboard, rotate or revoke that privileged key. Do this before you edit the app. Leaving it live while you "clean the code" gives every cached copy of the old JavaScript more time to work.</li>
<li>Check API and database logs for activity you do not recognize, especially around the window the key was in production.</li>
<li>Remove the key from client code, from any <code>VITE_</code>, <code>NEXT_PUBLIC_</code>, or Lovable/Bolt chat that baked it in, and from any committed <code>.env</code>.</li>
<li>Move privileged operations to a server path: a Supabase Edge Function, a server route, or another backend that holds the secret and enforces authorization.</li>
<li>Redeploy, then search the new JavaScript and any source maps for the old value. Absence in the new bundle does not replace the rotation you already did.</li>
</ol>
<p>The <a href="https://proofforge.live/fix/service-role-key-exposed">service role exposure guide</a> walks that sequence on your live URL.</p>
<h2>Step 3: If it is an anon or publishable key, do not rotate it as the fix</h2>
<p>The anon key is designed to sit in the frontend. Rotating it, republishing, and calling the job done usually fails for two reasons. First, the new anon key will also be in the next JavaScript bundle, because your client has to send some public key. Second, the actual risk is almost never the key. It is the policy the key is allowed to use.</p>
<p>What you do instead:</p>
<p><strong>Turn RLS on</strong> for every table that holds user data. "RLS is enabled" in the dashboard is the start of the check, not the end of it.</p>
<p><strong>Read the policies.</strong> No policy on private tables should use <code>USING (true)</code> or <code>WITH CHECK (true)</code> unless that table is deliberately public (a blog <code>posts</code> table can be; <code>profiles</code>, <code>orders</code> and <code>messages</code> cannot). The <a href="https://proofforge.live/fix/supabase-rls-using-true">USING (true) fix</a> is the pattern to look for.</p>
<p><strong>Test as a stranger.</strong> From a signed-out session, a <code>HEAD</code> or <code>GET</code> against a private table with the anon key and <code>Prefer: count=exact</code> should not hand you a useful count or contents. An empty table is not proof the policy is safe; a policy that returns every row will look fine until the first real customer shows up.</p>
<p><strong>Test as a second user.</strong> Create a row as user B. Sign in as user A and try to read it. User A should not see B's row. The free <a href="https://proofforge.live/tools/supabase-rls-checker">RLS checker</a> lays out those four tests.</p>
<p><strong>Check storage the same way.</strong> A public bucket of private uploads is the same class of problem as an open table. Open a file URL in a private window while signed out.</p>
<p>Rotate the anon key only if you also have a reason to believe the project itself is compromised, or as part of a planned key migration. It is not the repair for "I saw the anon key in the bundle."</p>
<h2>Step 4: Prove the live URL, then lock the fix in</h2>
<p>Paste the published URL into <a href="https://proofforge.live/check">ProofForge</a> and pick your builder (Lovable, Bolt, v0, Cursor, or whatever actually shipped the site). The scan is read-only. It looks at public HTML, JavaScript, selected files, headers and supported anonymous backend signals. It does not sign in as your users and it does not return row contents.</p>
<p>You get a grade, every finding's severity, and the first fix in full, written for your builder. If there is more than one issue, the <a href="https://proofforge.live/pricing">$9 Fix Report</a> unlocks every remaining fix and the builder prompts, once. <a href="https://proofforge.live/pricing">$29 Fix + Guard</a> adds on-demand rechecks after the next deploys. There is no subscription and no account. Pay with PayPal (card, Apple Pay and Google Pay too).</p>
<p>Apply the change, wait for the publish to finish, and scan the same URL again. Search the new bundle for any privileged key you rotated. Re-run the signed-out table request. Then, and only then, tell yourself the exposure is closed.</p>
<p>The short version: identify the key, rotate a privileged one immediately, and treat a public anon key as a reason to audit RLS, not as a reason to panic-rotate. Then confirm it on the live URL. Start here: <a href="https://proofforge.live/check">proofforge.live/check</a>. The first fix is free; the rest are $9 once.</p>
<p><em>Built by <a href="https://x.com/brennanzambo">Brennan Zambo</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[A Lovable app security checklist to run before you launch]]></title><description><![CDATA[Lovable can give you a working app in an afternoon. Launch is the moment that app gets a real URL, real users and a real bill. The built-in Lovable…]]></description><link>https://proofforge.hashnode.dev/a-lovable-app-security-checklist-to-run-before-you-launch</link><guid isPermaLink="true">https://proofforge.hashnode.dev/a-lovable-app-security-checklist-to-run-before-you-launch</guid><category><![CDATA[Security]]></category><category><![CDATA[lovable]]></category><category><![CDATA[supabase]]></category><category><![CDATA[vibe coding]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 12:15:02 GMT</pubDate><content:encoded><![CDATA[<p>Lovable can give you a working app in an afternoon. Launch is the moment that app gets a real URL, real users and a real bill. The built-in Lovable security scan is worth running, and it reads the project in the editor. It does not reliably tell you what a stranger receives from the published site.</p>
<p>ProofForge is the leak check for the app you actually shipped. It scans your live URL, not your repo, and gives you the exact fix for your builder. For a Lovable app, that means the published domain, the JavaScript it serves, the Supabase project that frontend already talks to, and a paste-ready prompt you can drop back into Lovable. The scan and the first fix are free. Every remaining fix is $9 once.</p>
<p>Work through this checklist on the URL you are about to share, not on the editor preview. Tick every item before you send the link to customers, Product Hunt, or a first paid user.</p>
<h2>1. Put secrets in Lovable Secrets, then prove they are not in the code</h2>
<p>Anything that can spend money or bypass your database belongs in Lovable Secrets (or a server-only path such as a Supabase Edge Function). It does not belong in a component, a <code>.env</code> line that starts with a public prefix, or a message you once pasted into the chat.</p>
<p>Open the published site, press F12, and search all sources for <code>sk-</code>, <code>sk_live_</code>, <code>service_role</code>, <code>sb_secret_</code>, <code>AIza</code> and <code>re_</code>. A Supabase anon or publishable key in the bundle is expected. A service role key, a Stripe secret, or an OpenAI key is a launch blocker. Rotate the leaked value at the provider first, then remove it from the project, then republish. Renaming a variable and leaving the old key live is not a fix.</p>
<h2>2. Decide what remixing is allowed to copy</h2>
<p>If the project is set to public remix, anyone can copy the code you shipped. Values stored in Lovable Secrets are not copied. Values written into the code are, including API keys you hard-coded months ago and then "moved." Before launch, either turn remixing off or treat the codebase as public and rotate anything that ever lived in it.</p>
<h2>3. Launch the domain people will actually use</h2>
<p>Checklist this explicitly: the custom domain, the Lovable-hosted production URL, and any leftover preview link are not the same object. A clean preview can sit next to a stale production deploy. Scan and click through the exact URL in your bio, your emails and your payment receipts. If you have two domains pointing at the app, check both.</p>
<h2>4. Confirm who can read customer data</h2>
<p>Most Lovable apps talk to Supabase. Before launch:</p>
<ul>
<li>Row Level Security is on for every table that holds user data.</li>
<li>No policy on those tables uses <code>USING (true)</code> or <code>WITH CHECK (true)</code> unless the table is deliberately public (a blog <code>posts</code> table can be; <code>profiles</code>, <code>orders</code> and <code>messages</code> cannot).</li>
<li>A signed-out request cannot get a useful count or contents from a private table. An empty table is not proof the policy is safe.</li>
<li>Two real accounts cannot read each other's rows. Create a record as user B, sign in as user A, and try.</li>
</ul>
<p>"RLS is enabled" in the dashboard is not the same as "the published anon key is locked out."</p>
<h2>5. Check storage, edge functions and auth the same way</h2>
<p>If you use Supabase Storage, confirm the bucket is not public unless the files are meant to be. Open a file URL in a private window while signed out. If you use Edge Functions, confirm they do not return privileged keys or other users' rows to the client. If you use magic links or OAuth, confirm the redirect URLs in the provider console match the production domain, not a preview host.</p>
<h2>6. Look at the files the host will serve</h2>
<p>Request <code>/.env</code> and <code>/.git/config</code> on the production URL. A 200 with real content is a finding. A 200 that just returns your homepage is a single-page-app fallback and means nothing. Source maps (<code>.map</code> files next to your scripts) can reconstruct your source; keep them off production unless you have a reason.</p>
<p>Read response headers quickly: HTTPS should be on, and HSTS is a cheap yes. Missing headers are not a reason to delay launch on their own. A leaked key is.</p>
<h2>7. Run an outside scan on the same URL, then fix, then re-scan</h2>
<p>Paste that production URL into the <a href="https://proofforge.live/check/lovable">Lovable check</a>. The scan is read-only. It looks at public HTML, JavaScript, selected files, headers and supported anonymous backend signals. It does not sign in as your users and it does not return row contents.</p>
<p>You get a grade, every finding's severity, and the first fix in full, free, written as something you can paste back into Lovable. If there is more than one issue, the <a href="https://proofforge.live/pricing">$9 Fix Report</a> unlocks every remaining fix and the builder prompts, once. <a href="https://proofforge.live/pricing">$29 Fix + Guard</a> adds on-demand rechecks after the next deploys. There is no subscription and no account.</p>
<p>Apply the change in Lovable, wait for the publish to finish (and for any CDN to catch up), and run the same check on the same URL again. Do not declare the app ready from the editor's security panel alone.</p>
<h2>8. A two-person pass if anyone else can log in</h2>
<p>If the app has accounts, have a second person (or a second incognito profile) sign up and try to open your records, your upload, and your admin route. The outside scan does not log in as a user. This is the item that catches a broken ownership check the week after you start charging.</p>
<h2>Launch day order</h2>
<p>Do it in this sequence: rotate any leaked key first, fix the policy or the code second, republish third, re-scan the live URL fourth, then share the link. Sharing first and fixing later means the first visitors — and anyone who archived the JavaScript — saw the old value.</p>
<p>If you only have twenty minutes, run items 1, 4 and 7. If a privileged key or an open customer table shows up, you do not launch until those are gone and the live URL proves it.</p>
<p>The leak check for a Lovable app is a check of the URL you are about to ship, with a fix written for Lovable. Start here: <a href="https://proofforge.live/check/lovable">proofforge.live/check/lovable</a>. The first fix is free; the rest are $9 once.</p>
<p><em>Built by</em> <a href="https://x.com/brennanzambo"><em>Brennan Zambo</em></a><em>.</em></p>
]]></content:encoded></item><item><title><![CDATA[How to verify a SaaS before you buy it on Acquire.com]]></title><description><![CDATA[Acquire.com packages the business. You still have to verify the running app, the accounts and the numbers. A step-by-step pass, listing to exclusivity]]></description><link>https://proofforge.hashnode.dev/how-to-verify-a-saas-before-buying-on-acquire-com</link><guid isPermaLink="true">https://proofforge.hashnode.dev/how-to-verify-a-saas-before-buying-on-acquire-com</guid><category><![CDATA[acquire]]></category><category><![CDATA[Due Diligence]]></category><category><![CDATA[acquisitions]]></category><category><![CDATA[SaaS]]></category><category><![CDATA[Security]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 11:39:01 GMT</pubDate><content:encoded><![CDATA[<p>Acquire.com is good at packaging a business: revenue charts, a walkthrough, a seller who has already answered the same ten questions. None of that verifies the product you will actually operate. The listing describes a company. You need to verify the running app, the accounts behind it, and whether the numbers still hold once the seller is gone.</p>
<p>ProofForge is different. It checks the live URL of the app you are buying, not the deck and not the repo. Paste the public site into the <a href="https://proofforge.live/check">free scan</a> before you spend a week in exclusivity. If you want that pass as a signed report you can attach to the deal, use the <a href="https://proofforge.live/due-diligence">$79 buyer due diligence</a>. A <a href="https://proofforge.live/sample-report">sample report</a> shows what that looks like, including what was not tested.</p>
<h2>What "verify" means on Acquire.com</h2>
<p>Acquire's process is built around a conversation, then a letter of intent, then exclusivity, then close. Verification has to happen at the right step, or you pay for access you could have gotten from a browser.</p>
<p><strong>Before you send a message.</strong> You only have the public listing and the public product URL. That is enough to find deal-breakers: a privileged key in the JavaScript, an open <code>.git</code> folder, a database that answers anonymous reads, a demo that is clearly not the listed domain. Do this yourself or with the free scan. You do not need the seller's permission to read what every visitor already receives.</p>
<p><strong>After the first call, before exclusivity.</strong> Ask for a live screen-share of Stripe (or the payment provider), of the host, and of the database project members page. You are verifying two claims: that the revenue is real, and that the seller actually controls the production app, not a lookalike.</p>
<p><strong>During exclusivity.</strong> This is when you confirm accounts, key inventory, customer data location, and a two-account isolation test. Deeper checks belong here, with written authorization. The $79 report's owner-authorization flow is built for that sequence: public surface first, deeper checks after the seller proves they control the domain.</p>
<h2>Verify the product, not the walkthrough</h2>
<p>Sellers on Acquire often record a polished demo. Verify against the production URL in the listing:</p>
<ul>
<li>The domain in the listing, the domain in Stripe's customer receipts, and the domain in DNS should be the same product.</li>
<li>Create a cheap test account if sign-up is public. See what a real user sees, not what the walkthrough showed.</li>
<li>Search the shipped JavaScript for <code>service_role</code>, <code>sb_secret_</code>, <code>sk-</code> and live payment keys.</li>
<li>Note the stack: Lovable, Bolt, Replit, v0, Cursor, Supabase, Firebase. Every name is an account that has to change hands.</li>
</ul>
<p>If the app was built with an AI builder, this step matters more, not less. The code is small. The risk is whatever ended up in the browser and in the database rules. Acquire's own help center will walk you through the deal process; it will not tell you whether the published JavaScript contains a privileged key, or whether a Supabase table answers an anonymous request. That is the gap the <a href="https://proofforge.live/check">free scan</a> is for, and it takes a couple of minutes on the listing URL.</p>
<h2>Verify the business claims against artifacts</h2>
<ul>
<li><strong>Revenue.</strong> Read-only Stripe access or a shared session, not a screenshot. Match payouts to stated MRR. Ask about refunds and disputes for the last 12 months.</li>
<li><strong>Traffic.</strong> Raw analytics with the listing domain as the property, not a PDF. Watch for a single referral spike that will not survive a change of owner.</li>
<li><strong>Churn and support.</strong> A month of inbox or help-desk volume. A quiet inbox on a $15k MRR product is either a blessing or a reporting gap.</li>
<li><strong>Costs.</strong> Hosting, model APIs, email, the database plan. An AI feature with no spend cap is a liability you will inherit.</li>
</ul>
<p>None of this replaces the security pass. A profitable app with a <code>service_role</code> key in the client is a profitable app you cannot safely turn on until that key is rotated.</p>
<h2>Verify that you can actually take the controls</h2>
<p>On Acquire, deals fail late when a workspace cannot be transferred: a Lovable project under the seller's personal login, a Supabase org with no transfer path, a GitHub repo the seller does not own, an Apple or Google OAuth app in a personal account. Get a written inventory, with the email on each account, before you sign exclusivity. Put the transfer of each one, and the removal of the seller as admin, in the purchase agreement, with a holdback until you have made a harmless change in each.</p>
<p>Ask, specifically, whether the production deploy is triggered from the account you are being offered. A repo transfer does not help if the live site is still being published from a personal Vercel or Netlify team the seller forgot to mention.</p>
<h2>How to put findings into the deal</h2>
<p>A leaked key or an open table is not automatically a walk-away. It is a price lever and a closing condition: rotate this key, close this policy, prove it on the live URL, then wire the rest. The public-surface report is the evidence. After you own the app, the $9 Fix Report or $29 Fix + Guard is how you repair what is left; those are not the buying products.</p>
<p>Start with the <a href="https://proofforge.live/check">free scan</a> of the listing URL. If the deal is real, use the <a href="https://proofforge.live/due-diligence">$79 buyer due diligence</a> so the findings are in a form you can send back to the seller. Keep the <a href="https://proofforge.live/sample-report">sample report</a> handy if you need to show what "public surface" means before they authorize anything deeper.</p>
<p><em>Built by <a href="https://x.com/brennanzambo">Brennan Zambo</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[A free Supabase RLS checker should test the live URL, not just the SQL you paste]]></title><description><![CDATA[Most free RLS checkers lint pasted SQL. ProofForge tests the live app: bounded, count-only probes with the anon key you already ship, no row contents.]]></description><link>https://proofforge.hashnode.dev/free-supabase-rls-checker-test-the-live-url</link><guid isPermaLink="true">https://proofforge.hashnode.dev/free-supabase-rls-checker-test-the-live-url</guid><category><![CDATA[supabase]]></category><category><![CDATA[Security]]></category><category><![CDATA[RLS]]></category><category><![CDATA[lovable]]></category><category><![CDATA[SaaS]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 11:10:59 GMT</pubDate><content:encoded><![CDATA[<p><strong>Short answer:</strong> a policy list tells you what you intended. A free checker should tell you what a stranger can actually do with the anon key your live app already ships. Paste the public URL into ProofForge's <a href="https://proofforge.live/tools/supabase-rls-checker">Supabase RLS checker</a>. It runs bounded, count-only probes, never returns row contents, and the scan plus the first fix are free.</p>
<p>Most tools in this category ask you to paste <code>pg_policies</code> output, or they connect to a project and lint the SQL. That is a useful review, and it is not the same as checking the app you shipped. The dashboard and production can disagree. The bundle can hold a different key. A forgotten table can be left open. A <code>USING (true)</code> policy can sit on a table you thought was private. A CDN can still be serving last Tuesday's build.</p>
<p>ProofForge is different. It checks the public URL, not a repo and not a SQL paste. Each builder gets its own pass, because a Lovable app, a Bolt app and a hand-exported Next app leak in different places. If you are buying the app, the <a href="https://proofforge.live/due-diligence">$79 due diligence report</a> is the version written for a deal. For your own app, start with the free checker.</p>
<h2>What a free RLS checker has to prove</h2>
<p>Row Level Security is a Postgres lock. The key your frontend is allowed to use is the anon or publishable key, and that key is supposed to be public. The lock fails when a policy is missing, too broad, or bypassed by a privileged credential that should never have reached the browser.</p>
<p>A checker worth running answers four questions against the live project:</p>
<ol>
<li><strong>Anonymous read.</strong> Can a request with no user token learn that private rows exist, or read them? An empty production table is not proof the policy is correct; it only proves the table is empty today.</li>
<li><strong>Cross-user read.</strong> If user A can see a synthetic row that belongs to user B, isolation is broken.</li>
<li><strong>Anonymous write.</strong> In staging, a disposable insert into a dedicated test table should be rejected. If it succeeds, delete the test row through a trusted admin path and fix the policy before you release.</li>
<li><strong>Unconditional policies.</strong> Flag every policy whose <code>USING</code> or <code>WITH CHECK</code> expression is <code>true</code>. A public catalog can be intentional. The same policy on <code>profiles</code>, <code>orders</code>, <code>messages</code> or storage-linked tables usually is not.</li>
</ol>
<p>ProofForge's URL checker is built around the first of those, with bounded count-only probes and no row contents. Ownership tests use synthetic users. You still review the policy SQL for the fourth question.</p>
<h2>Why a SQL paste is not enough</h2>
<p>A linter that never leaves the SQL editor will miss the failures that show up only in production.</p>
<p><strong>The live bundle may not be using the key you think it is.</strong> Open the published JavaScript and look at the Supabase URL and key. Then <a href="https://proofforge.live/tools/supabase-jwt-role-decoder">decode the JWT role</a>. An <code>anon</code> or <code>authenticated</code> role is expected. A <code>service_role</code> role, or a newer <code>sb_secret_</code> key, bypasses RLS entirely. If that value is in client code, your policies are irrelevant until you <a href="https://proofforge.live/fix/service-role-key-exposed">rotate it and take it out of the frontend</a>.</p>
<p><strong>The project in the dashboard may not be the project in production.</strong> AI-built apps often have a prototype project, a later "real" project, and a leftover <code>.env</code> from the first one. A linter pointed at the project you have open will cleanly miss the database the live app is calling.</p>
<p><strong>A policy change is not a production change</strong> until the client that talks to it is redeployed, and sometimes not even then. A cached bundle can keep calling an old key for hours.</p>
<p><strong>"RLS is enabled" is not "the table is private."</strong> Enabling RLS with no policy typically denies access, which is safe. Enabling RLS and adding <code>USING (true)</code> is the opposite: every role the policy applies to can read every row. Lovable and other builders have shipped this pattern when a prompt asked for a feature and the generated policy was "allow all, we'll tighten later."</p>
<h2>How to run the free ProofForge checker</h2>
<p>Open the <a href="https://proofforge.live/tools/supabase-rls-checker">Supabase RLS checker</a>, paste a public URL you own or are authorized to test, and run the check. It is read-only. It looks at public HTML, JavaScript, selected files, headers and supported anonymous backend signals. It does not sign in as your customers, it does not write to the app, and it does not return row contents.</p>
<p>You get a grade, a score, every finding's severity and impact, and the top fix in full, for free. If there is more than one issue, the <a href="https://proofforge.live/pricing">$9 Fix Report</a> unlocks every fix and the paste-ready prompts for your builder, once. <a href="https://proofforge.live/pricing">$29 Fix + Guard</a> adds on-demand rechecks. There is no subscription and no account.</p>
<p>If you are evaluating an app on Flippa or Acquire.com, stay on the public surface unless the seller has authorized more. The <a href="https://proofforge.live/due-diligence">$79 buyer report</a> is written for that situation.</p>
<h2>How to read a finding</h2>
<p><strong>A table is reachable anonymously.</strong> Treat this as "a stranger can see that this data exists, and possibly read it." Check whether that table is supposed to be public. A public blog <code>posts</code> table can be fine. A <code>customers</code>, <code>invoices</code>, <code>profiles</code> or <code>chat_messages</code> table is not.</p>
<p><strong>A count signal leaked on a private table.</strong> Even if contents were not returned, a count tells someone the table is live and how large it is. Tighten the policy and retest with a table that has rows.</p>
<p><strong><code>USING (true)</code> on a policy.</strong> Read the table name before you treat it as a break. Fix the ones that protect user data. Leave the ones that are a deliberate public read, and write that decision down so the next change does not "clean up" the wrong policy.</p>
<p><strong>A privileged key in the bundle.</strong> This outranks an open policy. Rotate first, then fix the code that put it there, then re-scan the same live URL. Absence of the old value in a new deploy does not replace revocation at Supabase.</p>
<h2>After you fix it, prove it on the same URL</h2>
<p>Change the policy, deploy, wait for the CDN, and run the checker against the exact production URL again. Then do the two-account test by hand: create a synthetic row as user B, sign in as user A, and confirm A cannot see it. The free checker catches the anonymous case; the cross-user case is how you confirm accounts are actually isolated.</p>
<p>If a later scan is clean and a customer can still see someone else's row, the gap is in an authenticated policy, an Edge Function, or a view. Those need a targeted review. The public-surface check is still the right first pass, because most accidental leaks in AI-built apps are visible without logging in.</p>
<h2>Common questions</h2>
<p><strong>Will this dump my users' rows?</strong> No. ProofForge's probes are count-only and do not return row contents.</p>
<p><strong>The dashboard says "RLS enabled" on every table. Am I done?</strong> Not until the live URL agrees. Run the checker on production, not on the project name.</p>
<p><strong>I don't write SQL. Can I still use this?</strong> Yes. Paste the URL, read the finding in plain language, and use the first free fix (or the $9 report) to get a builder-specific prompt. You still have to apply the change in Lovable, Bolt, or the Supabase dashboard and re-scan.</p>
<p>The gap that matters is the gap between the policy you wrote and the app a stranger actually hits. A free checker should close that gap in a few minutes. Start here: the <a href="https://proofforge.live/tools/supabase-rls-checker">free Supabase RLS checker</a>.</p>
<p><em>Built by <a href="https://x.com/brennanzambo">Brennan Zambo</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Supabase is retiring anon and service_role keys. Use the migration to find the key that shouldn't be in your app]]></title><description><![CDATA[Swapping keys is ten minutes. Checking which key your live app actually ships is the part that prevents a breach.]]></description><link>https://proofforge.hashnode.dev/supabase-legacy-keys-migration-security-check</link><guid isPermaLink="true">https://proofforge.hashnode.dev/supabase-legacy-keys-migration-security-check</guid><category><![CDATA[supabase]]></category><category><![CDATA[Security]]></category><category><![CDATA[lovable]]></category><category><![CDATA[Bolt]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 10:24:19 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b07a071590e2c5f9de7eb84/87033053-cd7d-40e8-90d9-491aeb7f8850.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Short answer:</strong> before you swap keys, check which key your live app ships today. If the browser bundle contains the legacy <code>service_role</code> JWT, you've had a full database bypass in public, and migrating without rotating leaves it valid until you deactivate legacy keys. Check, migrate, deactivate, then re-scan.</p>
<p>Supabase is moving every project from the legacy JWT keys (<code>anon</code> and <code>service_role</code>) to publishable (<code>sb_publishable_...</code>) and secret (<code>sb_secret_...</code>) keys. Its docs say the legacy keys are being deprecated, both systems work side by side until you switch the old ones off, and new or recently restored projects may not have legacy keys at all.</p>
<p>Most migration guides stop at "replace the variable and redeploy." That's fine for the anon key. It skips the question that matters: was the wrong key in the browser all along?</p>
<h2>Why this migration is a security moment</h2>
<p>Legacy keys are both long JWTs starting with <code>eyJ</code>. They look almost identical. The only difference is a field inside the token: <code>"role": "anon"</code> or <code>"role": "service_role"</code>. That's why AI builders mix them up: an RLS error appears, someone (or something) swaps in the "other key," the error disappears, and the service_role key ships to every visitor.</p>
<p>The new keys fix that confusion going forward. A <code>sb_secret_</code> key is obviously secret by name, and Supabase rejects it when the request comes from a browser user agent. But that browser check doesn't stop someone who copies a key from your bundle and uses it from a script. The migration is the moment to find out what you shipped before.</p>
<h2>Step 1: find out which key your live app uses</h2>
<p>On your published site:</p>
<ol>
<li>Open DevTools → Network, reload, click any request to <code>supabase.co</code>, read the <code>apikey</code> header.</li>
<li>Open Sources, search all files for <code>eyJ</code>, <code>service_role</code>, <code>sb_secret_</code>.</li>
<li>Decode any <code>eyJ</code> token locally (never paste it into a website):</li>
</ol>
<pre><code class="language-js">const k = 'PASTE_KEY';
JSON.parse(atob(k.split('.')[1].replace(/-/g,'+').replace(/_/g,'/')));
</code></pre>
<p><code>"role":"anon"</code> is expected. <code>"role":"service_role"</code> is the problem. The <a href="https://proofforge.live/tools/supabase-jwt-role-decoder">Supabase JWT role decoder</a> explains each field if you'd rather read it there.</p>
<h2>Step 2: if you found service_role in the browser</h2>
<p>Treat it as compromised. It has been public for as long as that build was live. The <a href="https://proofforge.live/fix/service-role-key-exposed">service_role key exposed fix</a> has the full sequence; in short:</p>
<ol>
<li>Create the new publishable and secret keys (Settings → API Keys).</li>
<li>Move whatever needed elevated access into an Edge Function that reads the secret key from secrets.</li>
<li>Put the publishable key in the browser. If pages break, they were relying on RLS being bypassed. Write proper policies for those tables.</li>
<li><strong>Deactivate the legacy keys.</strong> Until you do, the leaked service_role JWT still works. Deactivating legacy keys disables both old keys, so finish moving every client first.</li>
<li>Check logs for requests you don't recognize from the period the key was public.</li>
</ol>
<h2>Step 3: if you only found the anon key</h2>
<p>Good, but the migration still has two traps:</p>
<ul>
<li><strong>Rename vs. revalue.</strong> In Lovable and Bolt apps, the frontend usually reads one <code>VITE_</code> variable. Put the publishable key in that variable (or update the code to read a new one). Adding a differently named variable does nothing. And because Vite bakes values in at build time, you must redeploy.</li>
<li><strong>Webhooks and pg_net.</strong> Database webhooks that send the legacy service_role key as <code>Authorization: Bearer</code> won't accept a secret key there; Supabase's guide says to send it on the <code>apikey</code> header instead. Fix those before you deactivate legacy keys, or background jobs silently fail.</li>
</ul>
<h2>Step 4: check that RLS still holds</h2>
<p>The publishable key has the same low privileges as anon, so your policies behave the same. That also means any weak policy is still weak. While you're in there:</p>
<pre><code class="language-sql">select tablename, policyname, cmd, qual from pg_policies
where schemaname = 'public' and (qual = 'true' or with_check = 'true');
</code></pre>
<h2>Step 5: re-scan the live app</h2>
<p>After redeploying, confirm from outside that the bundle has only <code>sb_publishable_</code>, no <code>eyJ</code> service_role token and no <code>sb_secret_</code>, and that anonymous reads on private tables return nothing. Paste the URL into the free scan at <a href="https://proofforge.live/">proofforge.live</a>: it decodes Supabase keys it finds in the bundle and runs count-only anonymous reads on your tables. The first full fix is free; the $9 Fix Report unlocks every fix with prompts for your builder.</p>
<h2>A note for AI builders</h2>
<p>If Lovable, Bolt or Cursor did the migration for you, read the diff. Look for the publishable key in the frontend variable, the secret key only in Edge Function secrets, and no <code>eyJ</code> string left anywhere in the client code. Ask the assistant to list every place each key is used; it's faster than searching by hand and it catches webhooks you forgot.</p>
<h2>The order, on one line</h2>
<p>Check the live key → migrate → fix webhooks → deactivate legacy keys → re-scan. The key swap is ten minutes. Skipping the check is how a two-year-old leak survives the migration.</p>
<h2>Common questions</h2>
<p><strong>Will my app break if I do nothing?</strong> Possibly, once Supabase switches legacy keys off for good. Projects restored from a pause may already lack legacy keys, which is a common source of "it worked yesterday" bugs.</p>
<p><strong>Is the publishable key safer than the anon key?</strong> Same privileges, same RLS. What improves is clarity: nobody mistakes <code>sb_publishable_</code> for a secret, or <code>sb_secret_</code> for something safe to ship.</p>
<p><strong>Do I need to rotate the anon key?</strong> Not for security; it was meant to be public. You replace it as part of the migration and deactivate it with the legacy pair.</p>
<p><strong>What about mobile apps?</strong> Shipped app binaries keep the old key until users update. Plan the deactivation date around your app-store release, not your web deploy.</p>
<p><strong>Can a scan tell me if someone used the leaked key?</strong> No. A scan shows what's exposed now. Whether anyone used an old key is a question for your Supabase API logs, and only for the window those logs cover.</p>
<p><strong>Should I create one secret key or several?</strong> Supabase lets you create multiple named secret keys. One per backend component means a future leak forces one rotation, not all of them.</p>
<p><em>Built by <a href="https://x.com/brennanzambo">Brennan Zambo</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[You turned on remixing for your Lovable project. Here's exactly what you exposed]]></title><description><![CDATA[Remix copies your code, not your secrets. That's only good news if your secrets were never in your code.]]></description><link>https://proofforge.hashnode.dev/lovable-remix-what-you-exposed</link><guid isPermaLink="true">https://proofforge.hashnode.dev/lovable-remix-what-you-exposed</guid><category><![CDATA[lovable]]></category><category><![CDATA[Security]]></category><category><![CDATA[supabase]]></category><category><![CDATA[vibe coding]]></category><category><![CDATA[Web Development]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 10:23:33 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b07a071590e2c5f9de7eb84/92f8213a-c3a2-4cf2-b65b-b6314348f724.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Short answer:</strong> a public remix hands anyone a full copy of your project's code. Values stored in Lovable Secrets aren't copied, but anything written into the code is: hard-coded API keys, a pasted service_role key, your Supabase URL and table names, admin emails. If a secret was ever in the code, rotate it.</p>
<p>Remixing is one of Lovable's best features. You build a template, someone clones it and makes it their own. It's also a quiet way to publish your source code, and most people turn it on without thinking about what's in that source.</p>
<h2>What a remix copies</h2>
<p>Per Lovable's documentation, a remix creates a new project from yours, including the code. Lovable Secrets (the values your Edge Functions read) aren't copied. In practice that splits your project into two buckets:</p>
<p><strong>Copied (now visible to whoever remixes):</strong></p>
<ul>
<li>Every component, page and hook</li>
<li>Any key or token written directly in code, including in comments</li>
<li><code>.env</code>-style values that live in the code rather than in Secrets, especially anything with a <code>VITE_</code> prefix</li>
<li>Your Supabase project URL and publishable/anon key (both meant to be public, but they tell people where your database is)</li>
<li>SQL migrations: table names, column names, and every RLS policy you wrote</li>
<li>Hard-coded admin emails, feature flags, test accounts and passwords</li>
</ul>
<p><strong>Not copied:</strong></p>
<ul>
<li>Values in Lovable Secrets / Supabase Edge Function secrets</li>
<li>Your database contents</li>
<li>Your users' accounts</li>
</ul>
<h2>Why the migrations matter more than you'd think</h2>
<p>Your migrations are a map. Someone reading them learns which tables exist, which hold personal data, and exactly which policies protect them. If a policy says <code>USING (true)</code> or only checks that a user is signed in, they don't need to guess. Your live database is still the one your published app talks to, and the anon key in the code points straight at it.</p>
<p>So a public remix turns "a weak policy someone might find" into "a weak policy documented for anyone who looks."</p>
<h2>The 20-minute cleanup</h2>
<p><strong>1. Search the code for secrets.</strong> In Lovable's code view (or the synced GitHub repo) search for: <code>sk_live</code>, <code>sk-</code>, <code>sk-ant-</code>, <code>service_role</code>, <code>sb_secret_</code>, <code>re_</code>, <code>whsec_</code>, <code>AIza</code>, <code>password</code>, <code>token</code>. Also search chat-pasted strings: long random-looking values in constants files.</p>
<p><strong>2. Rotate anything you find.</strong> Removing it from the code isn't enough. Remixes made before you removed it still have it. Create a new key at the provider, move it into Lovable Secrets, read it from an Edge Function, delete the old key.</p>
<p><strong>3. Read your own policies as a stranger would.</strong></p>
<pre><code class="language-sql">select tablename, policyname, cmd, qual, with_check
from pg_policies where schemaname = 'public';
</code></pre>
<p>Anything with <code>true</code> on a table holding user data needs an owner-scoped policy (<code>auth.uid() = user_id</code>) now.</p>
<p><strong>4. Remove hard-coded admin logic.</strong> Replace <code>if (user.email === 'me@...')</code> with a role column checked by RLS, so the remix doesn't tell anyone which email unlocks admin.</p>
<p><strong>5. Decide whether remixing should stay on.</strong> For a template meant to be shared, keep it on but make sure the template has no live keys and points at a demo Supabase project, not production. For a real product with users, turn it off.</p>
<h2>Check the published app too</h2>
<p>Remix exposure is about your code. Your published URL has its own exposure: whatever the build shipped to every visitor. A key that's in the code is usually also in the JavaScript bundle. Check both.</p>
<p>The fastest outside check is the free scan on the <a href="https://proofforge.live/check/lovable">Lovable check page</a>: it reads what your published app sends to a visitor, flags secret keys in the bundle, decodes any Supabase JWT to see if it's a service_role key, and runs count-only anonymous reads on your tables. If you only want the key check, the <a href="https://proofforge.live/tools/exposed-api-key-checker">exposed API key checker</a> does just that. The scan and first full fix are free; the $9 Fix Report unlocks every fix as a paste-ready Lovable prompt.</p>
<h2>A quick self-test</h2>
<p>Open a private window, remix your own project into a throwaway account, and read the copy as if you were a stranger. Anything you'd be uncomfortable seeing there (a key, an admin email, a policy that says <code>true</code>) is what every remixer already sees. Five minutes of reading beats an hour of guessing.</p>
<h2>A template-safe setup</h2>
<p>If you want to share remixable templates without risk:</p>
<ul>
<li>Keep a separate Supabase project for the template, with seed data only.</li>
<li>Store every server key in Secrets from day one; never paste a key into chat.</li>
<li>Put "Never write secret keys in frontend code; server keys go in Supabase secrets" in your project knowledge so Lovable follows it on every prompt.</li>
<li>Before enabling remix, run the search in step 1 one more time.</li>
</ul>
<p>Remixing doesn't leak your secrets. Code does. If the code is clean and the policies are right, a public remix shows people how you built it and nothing more.</p>
<h2>Common questions</h2>
<p><strong>Can I see who remixed my project?</strong> Treat any remix as permanent. Even if you turn remixing off, copies made earlier keep whatever code they had at that moment, which is why rotation, not deletion, is the fix.</p>
<p><strong>Is my Supabase URL in the code a problem?</strong> Not by itself. It's in your published bundle anyway. It becomes a problem only when combined with weak policies or a secret key, which is why steps 2 and 3 matter more than hiding the URL.</p>
<p><strong>Does making the project private undo it?</strong> It stops new remixes and new viewers. It doesn't recall copies that already exist.</p>
<p><strong>Are Lovable Secrets safe from remixes?</strong> Lovable's documentation says secret values aren't copied into a remix. The risk is values that were never put in Secrets: keys pasted into a component, a config file or the chat that later became code.</p>
<p><strong>What about collaborators?</strong> Anyone with edit access to the original project can read the code too. Review the member list at the same time you review remix settings.</p>
<p><em>Built by <a href="https://x.com/brennanzambo">Brennan Zambo</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Your first B2B customer sent a security questionnaire. Honest answers for a Lovable + Supabase app]]></title><description><![CDATA[The 12 questions that always show up, what a small AI-built app can truthfully say, and the evidence to attach]]></description><link>https://proofforge.hashnode.dev/security-questionnaire-answers-lovable-supabase-app</link><guid isPermaLink="true">https://proofforge.hashnode.dev/security-questionnaire-answers-lovable-supabase-app</guid><category><![CDATA[Security]]></category><category><![CDATA[supabase]]></category><category><![CDATA[lovable]]></category><category><![CDATA[SaaS]]></category><category><![CDATA[Startups]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 10:22:31 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b07a071590e2c5f9de7eb84/bfa7c01f-71df-4789-ba64-ac36d528df3b.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Short answer:</strong> answer only what you can prove, attach evidence, and say "not yet" where it's true. Buyers reject vague "yes" answers faster than honest gaps. For a Lovable + Supabase app, most questions map to five facts: where data lives, who can read it, where secrets live, how you test it, and what you'd do in an incident.</p>
<p>The questionnaire arrives as a spreadsheet with 80 rows, half of them about things a two-person company doesn't have (a CISO, SOC 2, a pen test from last quarter). Don't panic and don't bluff. The reviewer on the other side is checking for two things: whether the basics are real, and whether you're the kind of vendor who tells the truth.</p>
<p>Here are the questions that appear in almost every version, with answers you can give if you've done the work.</p>
<h2>1. Where is customer data stored and processed?</h2>
<p>"Customer data is stored in a managed Postgres database hosted by Supabase in [region]. The application frontend is served by [host]. We don't store customer data on employee devices."</p>
<p>Find the region in Supabase project settings. If the customer is in the EU and your project is in us-east-1, say so plainly.</p>
<h2>2. Is data encrypted in transit and at rest?</h2>
<p>"All traffic uses HTTPS with HSTS. Supabase encrypts data at rest." Only claim HSTS if your site sends the header. Check it before you write it.</p>
<h2>3. How is access to customer data controlled?</h2>
<p>This is the one that matters, and the honest answer depends on your Row Level Security policies:</p>
<p>"Each table enforces Postgres Row Level Security. Users can only read and modify rows they own (<code>auth.uid() = user_id</code>). We test this with two accounts and with anonymous requests."</p>
<p>Before writing that, run:</p>
<pre><code class="language-sql">select tablename, policyname, cmd, qual from pg_policies where schemaname = 'public';
</code></pre>
<p>If any customer-data table has <code>qual = 'true'</code>, the true answer is "not yet." Fix it first. It takes an afternoon.</p>
<h2>4. How are secrets and API keys managed?</h2>
<p>"Server-side keys (payment, email, AI) are stored in Supabase Edge Function secrets and never shipped to the browser. The only key in client code is Supabase's publishable key, which is designed to be public and is constrained by RLS."</p>
<p>Then prove it. A scan of the live URL that shows no secrets in the bundle is the evidence.</p>
<h2>5. Do you perform security testing?</h2>
<p>Honest small-company answer:</p>
<p>"We run an automated external scan of the production URL after each release (secrets in client code, database exposure, exposed files, security headers) and fix findings before release. We run Lovable's built-in security check on the project. We have not yet commissioned a third-party penetration test; we plan to before [milestone]."</p>
<p>That last sentence is fine. Reviewers see it constantly. What they don't accept is "yes" with nothing behind it.</p>
<h2>6. Can you share a recent security assessment?</h2>
<p>Attach a dated report of the external scan with findings and fixes. A <a href="https://proofforge.live/sample-report">sample report</a> shows what that looks like: findings, evidence, coverage, and what wasn't tested. Never send a report that claims more than it checked.</p>
<h2>7. Do you have an incident response plan?</h2>
<p>Write one page: who gets alerted, how you contain (rotate keys, close tables), how you scope (logs), and when you notify customers (within 72 hours of confirming a breach affecting their data, or whatever your contract says). Attach it. A one-page plan you'd actually follow beats a 20-page template.</p>
<h2>8. Who has access to production?</h2>
<p>"Two named people with MFA on Supabase, hosting, GitHub and the domain registrar." Turn on MFA everywhere before you send this.</p>
<h2>9. Do you use subprocessors?</h2>
<p>List them: Supabase, your host, your email provider, your AI provider, your payment processor. Link each one's security or DPA page.</p>
<h2>10. How do you handle data deletion?</h2>
<p>"Customers can request deletion; we delete their rows and auth user within [N] days. Backups expire after [Supabase's retention for your plan]." Check your plan's backup retention.</p>
<h2>11. Are dependencies monitored for vulnerabilities?</h2>
<p>"We run <code>npm audit</code> and dependency updates monthly and on each release." Then actually do it.</p>
<h2>12. Do you have SOC 2 / ISO 27001?</h2>
<p>"Not yet. Our infrastructure providers (Supabase, [host]) hold SOC 2 Type II reports, available on request from them." True, useful, and expected.</p>
<h2>The evidence pack</h2>
<p>Attach four things and most reviewers stop asking:</p>
<ol>
<li>A dated external scan report of production with zero high or critical findings. Run the free scan on the <a href="https://proofforge.live/check/lovable">Lovable check page</a>: the scan and the first fix are free, and the $9 Fix Report gives paste-ready Lovable prompts for every other finding so you can get to clean before you send it.</li>
<li>The <code>pg_policies</code> output for customer-data tables.</li>
<li>The one-page incident plan.</li>
<li>A list of subprocessors.</li>
</ol>
<h2>What not to do</h2>
<ul>
<li>Don't call a scan a "pen test" or a "certification."</li>
<li>Don't say "all data is private" if a single table is readable by the anon key.</li>
<li>Don't paste report links that contain private tokens into shared documents without checking who can see them.</li>
</ul>
<p>A small vendor that answers precisely, attaches proof and admits gaps gets through procurement more often than one that ticks every box. Do the afternoon of fixes first, then answer.</p>
<h2>Common questions</h2>
<p><strong>Can I say "we follow OWASP" if I haven't read it?</strong> No. Name the specific practices you follow instead; reviewers ask follow-ups.</p>
<p><strong>The customer wants a pen test. What do I say?</strong> Offer your dated scan report and a date for a third-party test, ideally tied to the contract value. Many buyers accept "within 90 days of signing" for a first deal.</p>
<p><strong>Should I fill in every row?</strong> Yes, even if the answer is "N/A, no on-premise infrastructure." Blank rows look like evasion.</p>
<p><strong>How often should I refresh the evidence?</strong> Rerun the scan and re-export policies before each new questionnaire, and date everything. A report from four months and twenty deploys ago doesn't describe the app they're buying today.</p>
<p><em>Built by <a href="https://x.com/brennanzambo">Brennan Zambo</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[You bought an AI-built app. Here's how to make sure the seller can't still get in]]></title><description><![CDATA[The 48-hour lockout checklist for Lovable, Bolt and Supabase apps bought on Flippa or Acquire.com]]></description><link>https://proofforge.hashnode.dev/bought-an-ai-built-app-make-sure-the-seller-cant-still-get-in</link><guid isPermaLink="true">https://proofforge.hashnode.dev/bought-an-ai-built-app-make-sure-the-seller-cant-still-get-in</guid><category><![CDATA[Security]]></category><category><![CDATA[supabase]]></category><category><![CDATA[Startups]]></category><category><![CDATA[SaaS]]></category><category><![CDATA[acquisitions]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 10:20:51 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6b07a071590e2c5f9de7eb84/ea79a1c5-be2b-443a-bf50-b097e5cac6eb.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Short answer:</strong> probably, yes, until you change it. Transferring a domain and a Supabase project doesn't revoke the seller's keys, sessions, OAuth grants or deploy access. In the first 48 hours, rotate every secret, remove them from every account and admin table, and then check the live app from outside.</p>
<p>Marketplaces move ownership. They don't move trust. The transfer checklist on Flippa or Acquire.com is about getting <em>you</em> access, and almost nothing on it takes access away from the person who built the app. With an AI-built app the gap is wider, because the builder platform, the database, the host and the payment provider are four separate accounts, each with its own keys.</p>
<p>Here's the order that closes it.</p>
<h2>Hour 0–2: take ownership of every account</h2>
<p>Make a list before you touch anything. For a typical Lovable or Bolt app it looks like this:</p>
<ul>
<li>Builder workspace (Lovable, Bolt, Replit, Base44)</li>
<li>GitHub repository, if one is connected</li>
<li>Supabase or Firebase project</li>
<li>Hosting (Netlify, Vercel, Lovable hosting, Replit deployments)</li>
<li>Domain registrar and DNS</li>
<li>Stripe or PayPal</li>
<li>Email sending (Resend, SendGrid, Postmark)</li>
<li>AI providers (OpenAI, Anthropic, Google)</li>
<li>Analytics, error tracking, auth providers (Google OAuth client, Apple sign-in)</li>
</ul>
<p>For each one, confirm three things: you're the owner, you can make a harmless change, and the seller isn't listed as owner, admin or collaborator anymore. A Supabase project can be transferred to your organization, but the seller may still be a member of the old org or have a personal access token that touched it. Check the members page, not just the project name.</p>
<h2>Hour 2–6: rotate every secret, even the ones that "weren't exposed"</h2>
<p>The seller has seen every key the app uses. Assume they kept a copy. That's not an accusation; it's how <code>.env</code> files and password managers work.</p>
<p>Rotate in this order, highest damage first:</p>
<ol>
<li><strong>Supabase secret / service_role key.</strong> It bypasses Row Level Security. Create a new secret key, update Edge Functions and any server, then delete the old one. If the project still uses legacy JWT keys, migrating to the new publishable and secret keys is a clean way to retire everything the seller had.</li>
<li><strong>Payment keys and webhook secrets.</strong> Roll the Stripe secret key and the webhook signing secret. A seller with an old webhook secret can forge "payment succeeded" events.</li>
<li><strong>AI provider keys.</strong> New key, delete old, set a hard monthly spend limit.</li>
<li><strong>Email sending keys.</strong> An old key lets someone send mail as your domain.</li>
<li><strong>OAuth client secrets</strong> for Google or GitHub sign-in.</li>
<li><strong>Database password</strong> and any direct connection strings.</li>
</ol>
<p>Then search the repository's full history for the old values. A key deleted from the code is still in old commits, and if the repo was ever public, it's in someone's clone.</p>
<h2>Hour 6–12: remove the seller from inside the app</h2>
<p>Account access isn't the only door. Check the app's own data:</p>
<ul>
<li><strong>Admin users table.</strong> Search your <code>profiles</code> or <code>users</code> table for the seller's email and any test accounts. AI-built apps often have an <code>is_admin</code> flag or a role column; make sure only you hold it.</li>
<li><strong>Auth sessions.</strong> In Supabase Auth, sign out all sessions for the seller's accounts and delete those users if they aren't real customers.</li>
<li><strong>Hard-coded admin emails.</strong> Search the code for <code>@gmail.com</code>, <code>admin</code>, and the seller's name. A common pattern is <code>if (user.email === 'seller@...')</code> to unlock an admin page.</li>
<li><strong>Hidden routes.</strong> Load <code>/admin</code>, <code>/dashboard/admin</code>, <code>/debug</code>, <code>/test</code> in a private window while signed out.</li>
</ul>
<h2>Hour 12–24: check what the live app exposes now</h2>
<p>Rotation fixes what the seller could do. It doesn't tell you what <em>anyone</em> can do. Before you announce the new ownership, check the public surface:</p>
<ul>
<li>Is any secret still in the JavaScript bundle (old build cached on a CDN, or a new key pasted in the wrong variable)?</li>
<li>Can the anon key read tables it shouldn't?</li>
<li>Are <code>.env</code>, <code>.git</code> or source maps served?</li>
</ul>
<p>You can do this by hand with DevTools, or paste the live URL into the free scan on <a href="https://proofforge.live/">proofforge.live</a>. The scan and the first full fix are free; if it finds more than one issue, the $9 Fix Report unlocks every fix written for the app's builder. If you haven't closed yet, the <a href="https://proofforge.live/due-diligence">$79 buyer due diligence</a> report covers the public surface first and runs database and private-file checks only after the seller verifies control of the domain, so findings can still change the price.</p>
<h2>Hour 24–48: write it down</h2>
<p>Keep a one-page record:</p>
<table>
<thead>
<tr>
<th>Item</th>
<th>Done</th>
<th>Date</th>
<th>Proof</th>
</tr>
</thead>
<tbody><tr>
<td>Seller removed from all accounts</td>
<td>✓</td>
<td></td>
<td>Screenshot of members pages</td>
</tr>
<tr>
<td>All secrets rotated, old ones deleted</td>
<td>✓</td>
<td></td>
<td>Provider key lists</td>
</tr>
<tr>
<td>Seller admin accounts removed</td>
<td>✓</td>
<td></td>
<td>SQL result</td>
</tr>
<tr>
<td>Public scan clean or findings fixed</td>
<td>✓</td>
<td></td>
<td>Report link (keep private)</td>
</tr>
</tbody></table>
<p>If something goes wrong in month three, this page is the difference between "the seller must have done it" and knowing they couldn't have.</p>
<h2>What to ask for before closing next time</h2>
<p>If you're still negotiating, put these in the deal: a full list of services and keys, the seller's written confirmation they'll rotate nothing themselves (you'll do it), a handover call where you change the passwords while they watch, and a holdback until you've confirmed the app works on your new keys.</p>
<p>The seller isn't the threat in most deals. Their old laptop, their password manager and the keys pasted into a builder chat six months ago are. Lock all of it out in the first two days.</p>
<h2>Common questions</h2>
<p><strong>Is it rude to rotate everything the seller set up?</strong> No. Any experienced seller expects it, and most will tell you to. Rotating protects them too: if something goes wrong later, nobody can point at their old keys.</p>
<p><strong>What if rotating a key breaks the app?</strong> That's information. It means the key was used somewhere you didn't know about, often in the browser, which is a finding in itself. Fix the caller, don't restore the old key.</p>
<p><strong>Do I need to tell users the app changed hands?</strong> Check your privacy policy and local law; if the policy names the old owner as the data controller, it needs updating either way.</p>
<p><em>Built by <a href="https://x.com/brennanzambo">Brennan Zambo</a>.</em></p>
]]></content:encoded></item><item><title><![CDATA[Found a security problem in the app you're about to buy? How to turn each finding into a price adjustment]]></title><description><![CDATA[Found a security problem in an app you are about to buy? Turn each finding into a price adjustment or closing condition.]]></description><link>https://proofforge.hashnode.dev/found-a-security-problem-in-the-app-you-re-about-to-buy-how-to-turn-each-finding-into-a-price-adjustment</link><guid isPermaLink="true">https://proofforge.hashnode.dev/found-a-security-problem-in-the-app-you-re-about-to-buy-how-to-turn-each-finding-into-a-price-adjustment</guid><category><![CDATA[Security]]></category><category><![CDATA[startup]]></category><category><![CDATA[AI]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 03:23:11 GMT</pubDate><content:encoded><![CDATA[<p>You ran a security check on the app you want to buy and it found something. Now what? Walking away is rarely the right answer, and paying the full price isn't either. Most findings in AI-built apps are fixed with a setting, a key rotation or a short code change. What matters is who pays, who does it, and whether data was already exposed.</p>
<p>This is how to sort what you found, with the amount of work each item usually means and the term to ask for. The effort figures are rough planning numbers for a small app. Replace them with your developer's quote.</p>
<h2>Step 1: Sort findings into three buckets</h2>
<p><strong>Bucket A: cheap to fix, no history question.</strong> Fix before close, at the seller's cost.
<strong>Bucket B: fix required, and you need to know if it was used.</strong> Ask for the fix plus evidence, or a price reduction.
<strong>Bucket C: structural.</strong> Reprice or walk.</p>
<h2>Step 2: Common findings and where they land</h2>
<table>
<thead>
<tr>
<th>Finding</th>
<th>Bucket</th>
<th>Typical work</th>
<th>What to ask for</th>
</tr>
</thead>
<tbody><tr>
<td>Missing security headers (HSTS, CSP, X-Frame-Options)</td>
<td>A</td>
<td>An hour to add in hosting config</td>
<td>Seller adds them before close. <a href="https://proofforge.live/fix/missing-security-headers">Fix</a></td>
</tr>
<tr>
<td>Source maps served in production</td>
<td>A</td>
<td>Config change, redeploy</td>
<td>Seller disables and redeploys. <a href="https://proofforge.live/fix/source-maps-exposed">Fix</a></td>
</tr>
<tr>
<td>CORS allows any origin on data routes</td>
<td>A or B</td>
<td>An hour to a day, depending on how many routes</td>
<td>Fix before close. <a href="https://proofforge.live/fix/cors-wildcard">Fix</a></td>
</tr>
<tr>
<td>Supabase RLS off on a table with no personal data</td>
<td>A</td>
<td>A migration</td>
<td>Fix before close</td>
</tr>
<tr>
<td>Supabase RLS off, or <code>USING (true)</code>, on a table with user data</td>
<td>B</td>
<td>A day to design owner policies, plus a test</td>
<td>Fix, plus a written statement of how long it was open and the API logs for that period. <a href="https://proofforge.live/fix/supabase-rls-using-true">Fix</a></td>
</tr>
<tr>
<td>Firebase rules <code>allow read, write: if true</code></td>
<td>B</td>
<td>A day to write and test rules</td>
<td>Same as above. <a href="https://proofforge.live/fix/firebase-open-rules">Fix</a></td>
</tr>
<tr>
<td>Secret key in the JavaScript bundle</td>
<td>B</td>
<td>Rotate the key, move the call server-side, redeploy: a few hours to a couple of days</td>
<td>Seller rotates; you verify the old key is dead. <a href="https://proofforge.live/fix/vite-env-secrets">Fix</a></td>
</tr>
<tr>
<td>Supabase service role key in the client</td>
<td>B/C</td>
<td>Rotation plus a re-architecture if client code depends on it</td>
<td>Treat the whole database as exposed for the period it was live. <a href="https://proofforge.live/fix/service-role-key-exposed">Fix</a></td>
</tr>
<tr>
<td><code>.env</code> or <code>.git</code> served publicly</td>
<td>B</td>
<td>Remove, rotate everything inside, check history</td>
<td>Seller rotates every key in the file. <a href="https://proofforge.live/fix/env-file-exposed">Fix</a></td>
</tr>
<tr>
<td>No way to transfer a key, or the seller can't list the accounts</td>
<td>C</td>
<td>Unknown</td>
<td>Walk or hold back a larger share until resolved</td>
</tr>
</tbody></table>
<h2>Step 3: Decide who pays</h2>
<p>Three common structures:</p>
<ol>
<li><strong>Fix before close.</strong> The seller does it, you re-check, then you close. Cleanest for Bucket A. Set a date.</li>
<li><strong>Price reduction.</strong> For Bucket B and C where the buyer will do the work. Use your developer's estimate in hours times their rate, plus a buffer for the unknown.</li>
<li><strong>Holdback or escrow.</strong> A share of the price released when a re-check on your side confirms the fix. Works when the fix is in progress at signing.</li>
</ol>
<p>Don't trade a finding for a vague promise. "We'll fix it after close" without a number or a holdback leaves you holding it.</p>
<h2>Step 4: The question a scan can't answer</h2>
<p>A report shows a door was open today. It doesn't say who used it. For Bucket B items, ask the seller to:</p>
<ul>
<li>State in writing how long the exposure existed, if they know.</li>
<li>Share the relevant logs: Supabase API logs, hosting logs, provider usage pages for any leaked AI or payment key.</li>
<li>Disclose any prior incident or notification.</li>
</ul>
<p>If the app holds personal data from people in the EU, UK or California, ask your lawyer whether a past exposure creates obligations that transfer to you. Put the seller's disclosure in the contract as a representation.</p>
<h2>Step 5: Re-check on the day</h2>
<p>Run the same outside check right before transfer and right after. If the first and the last differ, the seller changed something, and you need to know what. Every fix in the table is visible from outside, so a re-scan is the proof.</p>
<p><a href="https://proofforge.live/due-diligence">A buyer report on the live URL</a> is a fixed price, doesn't need repository access, and stays within what a visitor can see. <a href="https://proofforge.live/sample-report">The sample report</a> shows how findings are laid out, so you can see how they map to the table above before you order one.</p>
<h2>What to say to the seller</h2>
<blockquote>
<p>The outside check found [finding]. I'd like it fixed before close, with the key rotated if one is involved, and I'll re-run the same check before transfer. If you can't fix it before close, I'd like [amount or holdback] until it's verified. Can you also send [logs] for the period it was live?</p>
</blockquote>
<p>Plain, specific and checkable. Most sellers don't know the issue exists, and the sellers who respond well are the ones you want to buy from.</p>
<h2>When to walk</h2>
<ul>
<li>Customer records readable by anyone, and the seller won't share logs or discuss it.</li>
<li>The seller won't show the database rules or the repository at all.</li>
<li>Keys can't be rotated because they belong to accounts the seller won't transfer.</li>
<li>The same problem comes back after a fix.</li>
</ul>
<p>Everything else is a negotiation, and the findings give you the numbers for it.</p>
<p>Built by Brennan Zambo. <a href="https://proofforge.live">ProofForge</a></p>
]]></content:encoded></item><item><title><![CDATA[You moved your Lovable or Bolt app into Cursor, Claude Code, Windsurf or Codex. Which security checks still apply?]]></title><description><![CDATA[Moved your Lovable or Bolt app to Cursor, Claude Code, Windsurf or Codex? Which security checks still apply.]]></description><link>https://proofforge.hashnode.dev/you-moved-your-lovable-or-bolt-app-into-cursor-claude-code-windsurf-or-codex-which-security-checks-still-apply</link><guid isPermaLink="true">https://proofforge.hashnode.dev/you-moved-your-lovable-or-bolt-app-into-cursor-claude-code-windsurf-or-codex-which-security-checks-still-apply</guid><category><![CDATA[Security]]></category><category><![CDATA[AI]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Next.js]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 03:22:46 GMT</pubDate><content:encoded><![CDATA[<p>Builders ship their own checks. Lovable has a Security view, Bolt has Run security audit in the Publish menu, Base44 has a security scan. They run inside the builder, on the project the builder holds.</p>
<p>Then you export to GitHub and carry on in Cursor, Claude Code, Windsurf or Codex. You change database queries, add an edge function, paste in a new key. The builder's scan didn't see any of it, because the changes never passed through the builder. Its "up to date" status describes the project at the last time it looked.</p>
<p>This isn't a criticism of those checks: they do what they say. It's about what's left uncovered once the editing happens somewhere else, and what to run instead.</p>
<h2>What stops being checked</h2>
<ul>
<li><strong>Changes made outside the builder.</strong> The built-in scan covers the project it holds. New tables created by a migration you wrote by hand, a service role key added to an edge function, an <code>.env</code> copied into a public folder: none of that goes through the builder's scan unless it syncs back and the scan is rerun.</li>
<li><strong>The deployed output.</strong> A scan of source isn't a request to your live URL. Hosting, build tooling and caches decide what is served.</li>
<li><strong>Time.</strong> A scan result is a snapshot of one moment.</li>
</ul>
<h2>A five-part replacement that works in any editor</h2>
<p><strong>1. Secrets in the code and history</strong></p>
<pre><code class="language-bash">gitleaks detect --source . --log-opts="--all"
</code></pre>
<p>Run it in CI on every push, so it applies whichever tool wrote the code. <a href="https://github.com/gitleaks/gitleaks">Gitleaks</a> has a GitHub Action.</p>
<p><strong>2. Dependencies</strong></p>
<pre><code class="language-bash">npm audit --omit=dev
</code></pre>
<p><strong>3. Database rules as code</strong></p>
<p>Keep your Supabase policies as migrations in the repo and run the tests Supabase documents: write SQL assertions for <code>anon</code> and <code>authenticated</code> on select, insert, update and delete, then run <code>supabase test db</code>. Supabase's docs put it plainly: until the suite passes, you don't know whether the policies do what you intended. If you use Firebase, keep <code>firestore.rules</code> and <code>storage.rules</code> in the repo and test them with the emulator.</p>
<p><strong>4. The deployed site, as a stranger</strong></p>
<pre><code class="language-bash">APP=https://your-app.example
curl -s $APP | grep -oE '(src|href)="[^"]+\.js"'
curl -s $APP/assets/index-AbC123.js -o bundle.js
grep -oE 'sk-[A-Za-z0-9_-]{20,}|sk_live_[A-Za-z0-9]+|AKIA[0-9A-Z]{16}|sb_secret_[A-Za-z0-9_-]+|service_role' bundle.js | sort -u
for p in .env .git/HEAD; do printf "%s -&gt; " $p; curl -s -o /dev/null -w "%{http_code}\n" $APP/$p; done
</code></pre>
<p>This is the step none of the other four replace. It's also the one that can be automated into the agent's own workflow: the <a href="https://proofforge.live/mcp-server">MCP setup</a> lets Claude Code, Cursor and Windsurf run a read-only scan of the live URL and report the grade before they say a deploy is done. Without an editor, <a href="https://proofforge.live">the free scan</a> does the same from a URL, and the <a href="https://proofforge.live/check/lovable">builder pages</a> cover each platform's specifics.</p>
<p><strong>5. Agent rules</strong></p>
<p>Tell the agent your boundaries in its rules file (<code>CLAUDE.md</code>, <code>.cursor/rules</code>, <code>.windsurfrules</code> or <code>AGENTS.md</code>):</p>
<pre><code class="language-markdown">- Never put secrets in client code or variables prefixed VITE_ or NEXT_PUBLIC_.
- Every new table gets RLS enabled and owner-scoped policies in the same migration.
- Never write a policy using (true) for a table with user data.
- After deploying, report what the public URL exposes, not what changed in the code.
</code></pre>
<p>These work, but they're instructions to a model, so they reduce mistakes without preventing them. That's why the deploy-time check exists.</p>
<h2>Which tool covers what</h2>
<table>
<thead>
<tr>
<th>Check</th>
<th>Builder scan</th>
<th>CI scanners</th>
<th>Outside scan of the live URL</th>
</tr>
</thead>
<tbody><tr>
<td>Project settings and code the builder holds</td>
<td>Yes</td>
<td>No</td>
<td>No</td>
</tr>
<tr>
<td>Secrets in git history</td>
<td>Not described as covered</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>Dependencies</td>
<td>Yes (Lovable)</td>
<td>Yes</td>
<td>No</td>
</tr>
<tr>
<td>Keys in the served JavaScript</td>
<td>Not described as covered</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td><code>.env</code>, <code>.git</code>, source maps served by the host</td>
<td>Not described as covered</td>
<td>No</td>
<td>Yes</td>
</tr>
<tr>
<td>Tables answering an anonymous request</td>
<td>Reads config</td>
<td>Only with tests</td>
<td>Yes (count-only)</td>
</tr>
<tr>
<td>Behavior behind login</td>
<td>Partly</td>
<td>With tests</td>
<td>No</td>
</tr>
</tbody></table>
<p>No row has a "yes" in every column, which is the point.</p>
<h2>If you moved from Firebase Studio</h2>
<p>Firebase Studio is being shut down on March 22, 2027, and your rules, keys and authorized domains are in the Firebase project, not the workspace. <a href="https://proofforge.live/check/firebase-studio">The migration checks are here</a>.</p>
<h2>A minimal habit</h2>
<p>Before every release: gitleaks, <code>npm audit</code>, your RLS tests, and one outside scan of the production URL. Keep the outputs with the release tag. It takes less time than the prompt that created the bug.</p>
<p>Built by Brennan Zambo. <a href="https://proofforge.live">ProofForge</a></p>
]]></content:encoded></item><item><title><![CDATA[Handing over a Lovable or Bolt app to a client: the security pack that protects you]]></title><description><![CDATA[Handing over a Lovable or Bolt app to a client: the security pack that documents what you checked and protects you.]]></description><link>https://proofforge.hashnode.dev/handing-over-a-lovable-or-bolt-app-to-a-client-the-security-pack-that-protects-you</link><guid isPermaLink="true">https://proofforge.hashnode.dev/handing-over-a-lovable-or-bolt-app-to-a-client-the-security-pack-that-protects-you</guid><category><![CDATA[Security]]></category><category><![CDATA[startup]]></category><category><![CDATA[AI]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 03:22:18 GMT</pubDate><content:encoded><![CDATA[<p>If you build apps for clients in Lovable, Bolt, Replit, v0 or Base44, you ship fast, and you also ship whatever the tool decided about access rules and keys. When the client's data leaks six months later, "the AI built it" doesn't protect you. A written record of what you checked and what you didn't does.</p>
<p>This is a handoff pack you can assemble in an hour. Each piece is a file or a command output you can attach to the delivery email.</p>
<h2>1. Put the accounts in the client's name before you build</h2>
<p>The cleanest handoff is no handoff: the client owns the hosting, database, domain and AI provider accounts from day one, and you're a collaborator. If you started on your own accounts, transfer in this order and record the date of each:</p>
<ul>
<li>Domain registrar and DNS</li>
<li>Hosting (Netlify, Vercel, Replit deployments)</li>
<li>Database project (Supabase or Firebase)</li>
<li>AI provider, payment, email-sender accounts</li>
<li>Code repository</li>
<li>The builder project itself</li>
</ul>
<p>Then create fresh keys in the client's accounts, set them in the new environment, and rotate the old ones. Keys you created are keys you still hold. Write down each service, its owner, and the rotation date.</p>
<h2>2. Test the app as a stranger, and keep the output</h2>
<p>Run these against the production URL. They take five minutes, and the output goes in the pack.</p>
<pre><code class="language-bash">APP=https://client-app.example
curl -s $APP | grep -oE '(src|href)="[^"]+\.js"'
curl -s $APP/assets/index-AbC123.js -o bundle.js            # real filename
grep -oE 'sk-[A-Za-z0-9_-]{20,}|sk_live_[A-Za-z0-9]+|AKIA[0-9A-Z]{16}|sb_secret_[A-Za-z0-9_-]+|service_role' bundle.js | sort -u
for p in .env .git/HEAD; do printf "%s -&gt; " $p; curl -s -o /dev/null -w "%{http_code}\n" $APP/$p; done
curl -sI $APP | grep -iE 'strict-transport|content-security|x-frame|x-content-type'
</code></pre>
<p>Save the terminal output with a date. For a dated, shareable version, run <a href="https://proofforge.live">the free scan</a> on the production URL and attach the result. <a href="https://proofforge.live/sample-report">Here's what that report looks like</a>.</p>
<h2>3. Export the database rules</h2>
<p>For Supabase:</p>
<pre><code class="language-sql">select tablename, rowsecurity from pg_tables where schemaname = 'public' order by tablename;
select tablename, policyname, roles, cmd, qual, with_check from pg_policies where schemaname = 'public' order by tablename, cmd;
</code></pre>
<p>Attach the output as <code>rls-policies.txt</code>. Read it first: any <code>qual</code> or <code>with_check</code> of <code>true</code> on a private table is a finding <a href="https://proofforge.live/fix/supabase-rls-using-true">you need to fix before delivery</a>. Then run the two-account test, because the SQL shows configuration, not behavior: create two users, make a row as user A, and request it as user B. <a href="https://proofforge.live/tools/supabase-rls-checker">The four tests</a> are written out in order.</p>
<p>For Firebase, attach the deployed Firestore, Realtime Database and Storage rules, and confirm none contain <code>if true</code>: <a href="https://proofforge.live/fix/firebase-open-rules">fix guide</a>.</p>
<h2>4. Scan the history for secrets and dependencies</h2>
<pre><code class="language-bash">gitleaks detect --source . --log-opts="--all" --report-path gitleaks.json
npm audit --omit=dev --json &gt; npm-audit.json
</code></pre>
<p>You don't need zero findings. You need the high and critical ones fixed or listed with a reason.</p>
<h2>5. Write the one-page scope statement</h2>
<p>This is what protects you. It states what was done, so nobody can later assume more.</p>
<pre><code class="language-markdown"># Security review - &lt;client app&gt; - &lt;date&gt;

## Reviewed
- Public-surface checks on &lt;production URL&gt; (output attached)
- Database access rules for &lt;list of tables&gt; (export attached)
- Secrets in the repository history (report attached)
- Dependency audit (report attached)

## Fixed before delivery
- &lt;finding&gt; - &lt;fix&gt;

## Known and accepted
- &lt;finding&gt; - &lt;reason&gt;, &lt;who accepted&gt;

## Not reviewed
- Authenticated business logic beyond the two-account test
- Penetration testing
- Third-party services' own security
- Anything added after &lt;date&gt;

## Client responsibilities after handoff
- Key rotation schedule, access reviews, dependency updates
- Re-run these checks after each material change
</code></pre>
<p>"Not reviewed" matters most. A short contract clause that says the delivery covers the checks listed and nothing beyond them turns an open-ended duty into a defined one. Have your lawyer word it for your jurisdiction.</p>
<h2>6. Tell the client what changes with every new feature</h2>
<p>Every prompt that adds a table or a form can add a hole. Give the client a three-line routine:</p>
<ol>
<li>After adding a table, check that RLS is on and it has an owner policy.</li>
<li>After adding a key, confirm it's in server settings, not in code.</li>
<li>Re-run the scan on the live URL after each publish.</li>
</ol>
<p>If you're keeping the maintenance contract, put those three in your own release checklist and keep the output each time.</p>
<h2>7. Remove your access, and show that you did</h2>
<p>Retained seller or developer credentials are the most commonly missed item at a handoff. After delivery, remove your own access to each service, and ask the client to confirm in writing that they can deploy a change without you. Then there's no question later about who could reach what.</p>
<h2>What you can say on the invoice</h2>
<p>"Delivered with a dated outside-in security scan, database access-rule export, secrets and dependency reports, and a scope statement of what was and wasn't reviewed." That's accurate, it's specific, and it's checkable. A status badge from a scan, <a href="https://proofforge.live/badge">like this one</a>, is useful as a pointer to that report, not as a certification, and shouldn't be described as one.</p>
<p>Built by Brennan Zambo. <a href="https://proofforge.live">ProofForge</a></p>
]]></content:encoded></item><item><title><![CDATA[You got a leaked-key email from GitHub, OpenAI or Google. Rotate it, then check the three places it's still live]]></title><description><![CDATA[Leaked-key email from GitHub, OpenAI or Google? Rotate the key, then check the three places it may still be live.]]></description><link>https://proofforge.hashnode.dev/you-got-a-leaked-key-email-from-github-openai-or-google-rotate-it-then-check-the-three-places-it-s-still-live</link><guid isPermaLink="true">https://proofforge.hashnode.dev/you-got-a-leaked-key-email-from-github-openai-or-google-rotate-it-then-check-the-three-places-it-s-still-live</guid><category><![CDATA[Security]]></category><category><![CDATA[Devops]]></category><category><![CDATA[AI]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 03:21:53 GMT</pubDate><content:encoded><![CDATA[<p>An email that says your API key was found in public is not a drill, and it isn't solved by deleting the key from your code. The key was copied the moment it became public. Here's the order that works, and the three places a rotated key keeps causing trouble.</p>
<h2>The first ten minutes: rotate before you investigate</h2>
<ol>
<li><strong>Revoke the exposed key at its provider.</strong> Don't wait to find out where it leaked.<ul>
<li>OpenAI: platform.openai.com → the project → API keys → delete the key.</li>
<li>Google (Gemini, Maps, Firebase): console.cloud.google.com → APIs &amp; Services → Credentials → delete or regenerate the key.</li>
<li>GitHub tokens: github.com → Settings → Developer settings → revoke.</li>
<li>Stripe: Developers → API keys → roll the secret key.</li>
</ul>
</li>
<li><strong>Create a replacement and put it where the browser can't read it.</strong> A server-side environment variable or your builder's secrets store. Not in a file under <code>src/</code>, and not in a variable starting with <code>VITE_</code> or <code>NEXT_PUBLIC_</code>.</li>
<li><strong>Check the usage page for charges you don't recognize.</strong> OpenAI's Usage page and Google Cloud's Billing reports show spikes by day. Set a hard monthly spending limit on the new key.</li>
</ol>
<p>A short outage is safer than a live compromised key. Deleting a key from your repository doesn't revoke it: GitHub's remediation guidance says to treat any exposed credential as compromised and rotate it.</p>
<h2>Place 1: your deployed JavaScript</h2>
<p>After rotating, the old key is dead, but if your app still ships the new key to the browser, you've made the same mistake again. Check the live site:</p>
<pre><code class="language-bash">APP=https://your-app.example
curl -s $APP | grep -oE '(src|href)="[^"]+\.js"'
curl -s $APP/assets/index-AbC123.js -o bundle.js      # use the real filename
grep -oE 'sk-[A-Za-z0-9_-]{20,}|sk_live_[A-Za-z0-9]+|AIza[0-9A-Za-z_-]{35}|ghp_[A-Za-z0-9]{36}|sb_secret_[A-Za-z0-9_-]+|service_role' bundle.js | sort -u
</code></pre>
<p>Expect no output for secrets. One exception: a Google <code>AIza...</code> key can be legitimate in a browser app if it's a Firebase web key restricted to the right APIs. A key with the same prefix that can call Gemini or other paid APIs is a billing risk. In Credentials, open the key and check "API restrictions" and "Application restrictions". <a href="https://proofforge.live/leaked-keys/gemini">Gemini key guide</a>.</p>
<p>Check every JavaScript file, not just the main one, and check preview URLs and old deployments too. Hosts keep old builds reachable at their own URLs, and an old build that contains the key stays public until you delete the deployment.</p>
<p>Or run <a href="https://proofforge.live/tools/exposed-api-key-checker">the free exposed-key checker</a> on your URL, which does the same sweep for many key shapes.</p>
<h2>Place 2: git history</h2>
<p>Removing a key from the latest commit leaves it in every earlier one:</p>
<pre><code class="language-bash">git log --all -S 'sk-proj-' --oneline
</code></pre>
<p>Replace the string with the first characters of your old key. Any commit listed still contains it. A full history scan:</p>
<pre><code class="language-bash">gitleaks detect --source . --log-opts="--all"
</code></pre>
<p>With the key already revoked, history cleanup is about hygiene and about not training the next scanner to find live-looking strings. Use <code>git filter-repo</code> if you want it gone, then force-push, and know that anyone who cloned earlier still has a copy. That's why rotation comes first.</p>
<p>If a forked repo or a pasted chat transcript also held the key, those copies exist too. Rotation covers them all.</p>
<h2>Place 3: files your host or builder keeps</h2>
<ul>
<li><strong>Environment files in the public folder.</strong> A file named <code>.env</code> served from your site's root is a one-request leak. Check <code>$APP/.env</code>, <code>$APP/.env.production</code> and <code>$APP/.git/config</code>. <a href="https://proofforge.live/fix/env-file-exposed">Exposed .env fix</a>.</li>
<li><strong>Source maps.</strong> <code>index-*.js.map</code> files rebuild your source, comments and any inlined value. <a href="https://proofforge.live/fix/source-maps-exposed">Fix</a>.</li>
<li><strong>Builder chat and project history.</strong> If you pasted the key into an AI builder's chat to get it to "fix" something, it may sit in project history, shared snapshots or exported code. Rotate again if you pasted a replacement there.</li>
</ul>
<h2>What kind of key it was changes what to do next</h2>
<table>
<thead>
<tr>
<th>Key</th>
<th>Worst case</th>
<th>Extra step</th>
</tr>
</thead>
<tbody><tr>
<td>OpenAI / Anthropic / Gemini</td>
<td>Someone runs up your bill</td>
<td>Spending limit, review usage by key</td>
</tr>
<tr>
<td>Stripe secret</td>
<td>Charges, refunds, customer data</td>
<td>Roll the key, review recent API activity, check webhooks</td>
</tr>
<tr>
<td>Supabase service role</td>
<td>Full database read and write, ignores RLS</td>
<td>Rotate, then review your data and <a href="https://proofforge.live/fix/service-role-key-exposed">fix guide</a></td>
</tr>
<tr>
<td>GitHub token</td>
<td>Read or write to your repos</td>
<td>Revoke, review the security log for the token</td>
</tr>
<tr>
<td>Email sender (Resend, SendGrid)</td>
<td>Spam from your domain</td>
<td>Revoke, check sending reputation</td>
</tr>
</tbody></table>
<h2>Prove the fix</h2>
<p>Don't stop at "the email stopped". Run the three checks from a terminal or the free scan, as a stranger would:</p>
<ol>
<li>The key in the email is dead: call the provider with it and expect an authentication error.</li>
<li>The live bundle contains no secret.</li>
<li>The files in place 3 return a 404 or your normal page.</li>
</ol>
<p>Re-check after your next deploy. A rebuild from an old environment is the common way a key comes back.</p>
<p>Built by Brennan Zambo. <a href="https://proofforge.live">ProofForge</a></p>
]]></content:encoded></item><item><title><![CDATA[Supabase says a table is "publicly accessible". A 30-minute fix, and how to prove it worked]]></title><description><![CDATA[Supabase flags a table as publicly accessible. A 30-minute fix and a way to prove the table is locked down.]]></description><link>https://proofforge.hashnode.dev/supabase-says-a-table-is-publicly-accessible-a-30-minute-fix-and-how-to-prove-it-worked</link><guid isPermaLink="true">https://proofforge.hashnode.dev/supabase-says-a-table-is-publicly-accessible-a-30-minute-fix-and-how-to-prove-it-worked</guid><category><![CDATA[Security]]></category><category><![CDATA[supabase]]></category><category><![CDATA[webdev]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 03:21:26 GMT</pubDate><content:encoded><![CDATA[<p>If Supabase's Security Advisor, or an email from it, flags a table as publicly accessible or <code>rls_disabled_in_public</code>, it's telling you something specific: a table in your <code>public</code> schema has row level security (RLS) switched off, so anyone who has your project URL and public key can read it, and possibly change it. Both of those values are in your app's JavaScript. Visitors don't need to hack anything.</p>
<p>You don't need to be a developer to fix it. You do need to do it in the right order and then check it from outside, because the warning disappearing in the dashboard isn't the same as the data being private.</p>
<h2>Step 1: List what's open (2 minutes)</h2>
<p>Supabase dashboard → SQL Editor → run:</p>
<pre><code class="language-sql">select tablename
from pg_tables
where schemaname = 'public' and rowsecurity = false
order by tablename;
</code></pre>
<p>Each table listed is open. Note which ones hold real information: users, orders, messages, customers, anything with an email, an API key or a token.</p>
<h2>Step 2: Turn RLS on (1 minute per table)</h2>
<pre><code class="language-sql">alter table public.orders enable row level security;
</code></pre>
<p>Turning RLS on with no policies blocks all access through the public API for that table. That's the safe default. Your app may stop showing data until you add policies, which is what step 3 is for. If a table isn't used by the browser at all, such as a table only your server functions use, leave it blocked. The service role used by server code bypasses RLS.</p>
<h2>Step 3: Add the policy your app actually needs</h2>
<p>Decide who should see each row. The most common case is "each user sees only their own rows", which needs a column that stores the owner, typically <code>user_id</code>:</p>
<pre><code class="language-sql">create policy "users read own orders" on public.orders
  for select to authenticated
  using ((select auth.uid()) = user_id);

create policy "users add own orders" on public.orders
  for insert to authenticated
  with check ((select auth.uid()) = user_id);

create policy "users change own orders" on public.orders
  for update to authenticated
  using ((select auth.uid()) = user_id)
  with check ((select auth.uid()) = user_id);

create policy "users delete own orders" on public.orders
  for delete to authenticated
  using ((select auth.uid()) = user_id);
</code></pre>
<p>If your owner column is named something else, change <code>user_id</code>. If a table has no owner column, you can't write this policy yet: the table needs one.</p>
<p>For content that's meant to be public, like a blog or a product list:</p>
<pre><code class="language-sql">create policy "anyone can read products" on public.products
  for select using (true);
</code></pre>
<p><code>using (true)</code> is right here and wrong anywhere else. Never use it on the policy for a table with private data: <a href="https://proofforge.live/fix/supabase-rls-using-true">why it leaks</a>.</p>
<p>If you're using an AI builder, ask it for exactly this, in these words: "Enable RLS on <code>orders</code> and add owner-only select, insert, update and delete policies using <code>auth.uid() = user_id</code>. Don't use <code>using (true)</code>. Show me the SQL before applying it." Then read the SQL it shows.</p>
<h2>Step 4: Prove it from outside (5 minutes)</h2>
<p>Get your project reference and public key from the app's code or from Settings → API (the public one, labeled <code>anon</code> or <code>publishable</code>). In a terminal:</p>
<pre><code class="language-bash">URL=https://YOURREF.supabase.co
ANON=your-public-key

# Count rows an anonymous visitor can see, without reading them
curl -s -D - -o /dev/null "$URL/rest/v1/orders?select=*&amp;limit=0" \
  -H "apikey: $ANON" -H "Prefer: count=exact" | grep -i content-range
</code></pre>
<p><code>content-range: */0</code> or a permission error is what you want for a private table. A number above zero means visitors can still see rows.</p>
<p>No terminal? <a href="https://proofforge.live/tools/supabase-rls-checker">The free Supabase check</a> takes your app's URL, finds the same public endpoint and runs the count-only probe. <a href="https://proofforge.live/fix/supabase-rls-disabled">The RLS-disabled fix page</a> goes through the same steps for a specific app.</p>
<p>Then do the check most people skip: sign in as a normal user in your app, and confirm you see your own data and not anyone else's. If you have two test accounts, confirm account B can't see account A's.</p>
<h2>Step 5: Think about what already happened</h2>
<p>Fixing the table closes the door. It doesn't tell you whether someone walked through it.</p>
<ul>
<li>Check Logs → API in the Supabase dashboard for requests to the table from unfamiliar sources during the period it was open.</li>
<li>If the table held secrets (API keys, tokens, passwords), rotate them. <a href="https://proofforge.live/leaked-keys">Leaked key guides</a> cover the common ones.</li>
<li>If it held personal data, find out whether you have a duty to notify people. That depends on where they live.</li>
</ul>
<h2>Step 6: Keep it from happening again</h2>
<ul>
<li>Every new table needs RLS and policies the day it's created. Make that the first thing you ask for when an AI builder adds a table.</li>
<li>Open the Security Advisor after every batch of changes.</li>
<li>Re-run step 4 before each launch.</li>
</ul>
<p>Supabase's own <a href="https://supabase.com/docs/guides/security/production-checklist">production checklist</a> says the same thing in fewer steps: enable RLS on every table, and use SSL enforcement and MFA on your account.</p>
<h2>Quick reference</h2>
<table>
<thead>
<tr>
<th>Symptom</th>
<th>Meaning</th>
<th>Do</th>
</tr>
</thead>
<tbody><tr>
<td><code>rls_disabled_in_public</code></td>
<td>RLS off on a public table</td>
<td>Steps 1–3</td>
</tr>
<tr>
<td>RLS on, app shows no data</td>
<td>No policy yet</td>
<td>Step 3</td>
</tr>
<tr>
<td>RLS on, everything visible to everyone</td>
<td>A <code>true</code> policy</td>
<td>Replace it with an owner policy</td>
</tr>
<tr>
<td><code>42501</code> permission denied from outside</td>
<td>Blocked, as intended</td>
<td>Done</td>
</tr>
</tbody></table>
<p>Built by Brennan Zambo. <a href="https://proofforge.live">ProofForge</a></p>
]]></content:encoded></item><item><title><![CDATA[Make Claude Code, Cursor or Windsurf scan your app before it says "deployed": a free MCP setup]]></title><description><![CDATA[Set up a free MCP server so Claude Code, Cursor or Windsurf scans your app before it reports that it deployed.]]></description><link>https://proofforge.hashnode.dev/make-claude-code-cursor-or-windsurf-scan-your-app-before-it-says-deployed-a-free-mcp-setup</link><guid isPermaLink="true">https://proofforge.hashnode.dev/make-claude-code-cursor-or-windsurf-scan-your-app-before-it-says-deployed-a-free-mcp-setup</guid><category><![CDATA[Security]]></category><category><![CDATA[AI]]></category><category><![CDATA[Devops]]></category><category><![CDATA[webdev]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 03:20:59 GMT</pubDate><content:encoded><![CDATA[<p>AI coding agents are good at shipping and bad at looking at what they shipped. The agent edits files, runs the build, reports "deployed", and never fetches the public URL as a stranger. That's the step where leaked keys, open Supabase tables and exposed <code>.env</code> files show up.</p>
<p>MCP (Model Context Protocol) lets you give the agent a tool for that step. This post sets one up in about two minutes, shows what the agent calls, and adds a project rule so it uses the tool every time. The server is free, needs no API key, and is passive: it requests public pages and count-only database probes, and it never logs in or writes. Only use it on apps you own or are authorized to test.</p>
<h2>Install</h2>
<p>The endpoint is <code>https://proofforge.live/mcp</code>, a Streamable HTTP server.</p>
<p><strong>Claude Code</strong></p>
<pre><code class="language-bash">claude mcp add --transport http proofforge https://proofforge.live/mcp
</code></pre>
<p><strong>Cursor</strong> (<code>.cursor/mcp.json</code>)</p>
<pre><code class="language-json">{ "mcpServers": { "proofforge": { "url": "https://proofforge.live/mcp" } } }
</code></pre>
<p><strong>Windsurf</strong> (<code>mcp_config.json</code>)</p>
<pre><code class="language-json">{ "mcpServers": { "proofforge": { "serverUrl": "https://proofforge.live/mcp" } } }
</code></pre>
<p><strong>VS Code</strong> (<code>.vscode/mcp.json</code>)</p>
<pre><code class="language-json">{ "servers": { "proofforge": { "type": "http", "url": "https://proofforge.live/mcp" } } }
</code></pre>
<p>Restart the editor or run <code>/mcp</code> in Claude Code and confirm three tools are listed: <code>scan_url</code>, <code>get_report</code> and <code>explain_finding</code>.</p>
<h2>What the tools do</h2>
<table>
<thead>
<tr>
<th>Tool</th>
<th>Arguments</th>
<th>Returns</th>
</tr>
</thead>
<tbody><tr>
<td><code>scan_url</code></td>
<td><code>url</code>, <code>owner_confirmed: true</code></td>
<td>Queues a passive scan and returns a scan ID</td>
</tr>
<tr>
<td><code>get_report</code></td>
<td><code>scan_id</code></td>
<td>Status, grade, score, severity counts, first finding, coverage notes</td>
</tr>
<tr>
<td><code>explain_finding</code></td>
<td><code>scan_id</code>, <code>finding</code></td>
<td>Plain-language impact and what to check next</td>
</tr>
</tbody></table>
<p><code>owner_confirmed</code> is deliberate. The agent has to assert that you own the app or are authorized to test it, so the instruction in your project should say when that's true.</p>
<h2>Try it by hand first</h2>
<p>Ask the agent:</p>
<blockquote>
<p>Scan <a href="https://your-app.example">https://your-app.example</a> with the proofforge scan_url tool (I own this app, so owner_confirmed is true), then call get_report and tell me the grade and every finding.</p>
</blockquote>
<p>You'll get a grade, severity counts, and a private <code>report_url</code> for the full report. The first finding's fix is free; the rest are in the report page.</p>
<p>You can also call the server directly without an editor, which is useful for checking it works in CI:</p>
<pre><code class="language-bash">curl -s https://proofforge.live/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"0"}}}'
</code></pre>
<p>A valid <code>result</code> with the server's capabilities means the endpoint is up. The protocol methods after it, <code>tools/list</code> and <code>tools/call</code>, follow the MCP spec.</p>
<h2>Make the agent do it every time</h2>
<p>A tool the agent can use isn't a tool it will use. Put the instruction in the file your agent reads at the start of each session: <code>CLAUDE.md</code> for Claude Code, <code>.cursor/rules/security.mdc</code> for Cursor, <code>.windsurfrules</code> for Windsurf, <code>AGENTS.md</code> for Codex and others.</p>
<pre><code class="language-markdown">## Before saying a deploy is done

After any change that is deployed to https://your-app.example:

1. Call the proofforge `scan_url` tool on https://your-app.example with owner_confirmed true.
   This is my own app.
2. Call `get_report` with the returned scan_id until status is "done".
3. If grade is below B, or any finding is high or critical, report each finding, call
   `explain_finding` for it, and do not describe the deploy as finished.
4. Never paste a secret you find into chat or commit it. Tell me to rotate it.
</code></pre>
<p>Step 3 is where this earns its keep. Without the rule, the agent summarizes what it changed. With it, the agent reports what a visitor can see.</p>
<h2>What a scan from outside will and won't catch</h2>
<p>It looks at the public surface: HTML, JavaScript bundles, source maps, headers, TLS, CORS, <code>.env</code> and <code>.git</code> paths, and, for Supabase and Firebase apps, whether tables or rules answer an anonymous request.</p>
<p>It doesn't log in, so it can't test what happens behind authentication: whether user A can read user B's rows needs two accounts and the <a href="https://proofforge.live/tools/supabase-rls-checker">four-test method</a>. It's also not a code audit or a penetration test, so keep your dependency audit and secret scan in CI.</p>
<h2>Where it fits in the workflow</h2>
<ul>
<li><strong>After each deploy,</strong> through the rule above.</li>
<li><strong>Before a release,</strong> as a pass/fail gate: ask the agent to fail the task when the grade is under B.</li>
<li><strong>After switching tools.</strong> An app moved from a builder into an editor loses the builder's own checks. This one reads the live URL, so it doesn't care how the app was built. <a href="https://proofforge.live/check/lovable">The builder-specific pages</a> cover Lovable, Bolt, Replit, v0, Base44 and Firebase Studio.</li>
</ul>
<p>The full tool reference and a <a href="https://proofforge.live/mcp-server">server description page</a> list every parameter, and the same scan is available without MCP from <a href="https://proofforge.live">the web form</a>.</p>
<p>Built by Brennan Zambo. <a href="https://proofforge.live">ProofForge</a></p>
]]></content:encoded></item><item><title><![CDATA[Firebase Studio shuts down March 22, 2027: the security checks to run before you migrate]]></title><description><![CDATA[Firebase Studio shuts down March 22, 2027. The security checks to run on your app before you migrate it.]]></description><link>https://proofforge.hashnode.dev/firebase-studio-shuts-down-march-22-2027-the-security-checks-to-run-before-you-migrate</link><guid isPermaLink="true">https://proofforge.hashnode.dev/firebase-studio-shuts-down-march-22-2027-the-security-checks-to-run-before-you-migrate</guid><category><![CDATA[Security]]></category><category><![CDATA[Firebase]]></category><category><![CDATA[webdev]]></category><category><![CDATA[Devops]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 03:20:32 GMT</pubDate><content:encoded><![CDATA[<p>Check the live URL (free): paste it at <a href="https://proofforge.live/check">https://proofforge.live/check</a>. The scan and first fix are free. All remaining fixes are <a href="https://proofforge.live/pricing">$9</a> once. <a href="https://proofforge.live/pricing">$29</a> Fix + Guard adds on-demand rechecks. Pay with PayPal.</p>
<p>Firebase Studio is sunsetting on March 22, 2027. Google's migration page says new workspace creation and signup were disabled on June 22, 2026, existing workspaces keep working until the shutdown, and then "all remaining data is permanently deleted and cannot be recovered." Projects go to Google AI Studio (prompt-built apps) or Google Antigravity (code-first projects).</p>
<p>Most migration guides cover moving the code. This one covers what the move doesn't fix: the security state of the app you're carrying over. Google states that core services like Cloud Firestore, Authentication and App Hosting aren't affected, so everything configured in your Firebase project, rules included, comes along unchanged. If something was open in Firebase Studio, it's open after the move.</p>
<h2>Before you move: inventory the project</h2>
<p>From the repo or workspace terminal:</p>
<pre><code class="language-bash">firebase projects:list
firebase use YOUR_PROJECT_ID
ls firestore.rules storage.rules database.rules.json firebase.json 2&gt;/dev/null
</code></pre>
<p>If a rules file isn't in the repo, pull what's deployed:</p>
<pre><code class="language-bash">firebase init firestore
firebase init storage
</code></pre>
<p>Don't overwrite your existing rules without reading them. Look at the generated file first, then decide.</p>
<h2>Check 1: open rules</h2>
<pre><code class="language-bash">grep -nE 'if true|allow (read|write)[^:]*;|\.read.*true|\.write.*true|request\.time *&lt;' firestore.rules storage.rules database.rules.json 2&gt;/dev/null
</code></pre>
<p><code>allow read, write: if true</code> and <code>".read": true</code> are open to the internet. A <code>request.time &lt; timestamp.date(...)</code> rule is test mode: open until the date passes. If you find any of these, fix them now: <a href="https://proofforge.live/fix/firebase-open-rules">the fix guide with replacement rules</a> and <a href="https://proofforge.live/tools/firebase-rules-checker">the three curl tests</a> for Firestore, Realtime Database and Storage.</p>
<h2>Check 2: what's in the deployed JavaScript</h2>
<p>An app moved to a new environment gets rebuilt and redeployed, which is when secrets slip in. Check the production bundle:</p>
<pre><code class="language-bash">APP=https://your-app.web.app
curl -s $APP | grep -oE '(src|href)="[^"]+\.js"'
curl -s $APP/main.js -o bundle.js   # use the real filename
grep -oE 'AIza[0-9A-Za-z_-]{35}|sk-[A-Za-z0-9_-]{20,}|sk_live_[A-Za-z0-9]+|BEGIN (RSA |EC )?PRIVATE KEY' bundle.js | sort -u
</code></pre>
<p>A Firebase web API key (<code>AIza...</code>) in the bundle is normal: it identifies your project and isn't a secret. A Gemini or other AI provider key with the same prefix is a different thing: it grants usage billed to you. Google's page mentions recreating the Gemini key as an App Hosting environment variable when moving, which is the right idea. Keep model keys on the server side, not in client code. <a href="https://proofforge.live/leaked-keys">What to do about a leaked key</a>.</p>
<p>Also check the web API key's restrictions in Google Cloud Console → APIs &amp; Services → Credentials. Restrict it to your domains and to the APIs you use.</p>
<h2>Check 3: Firestore and Storage as an anonymous visitor</h2>
<pre><code class="language-bash">PROJECT=your-project-id
curl -s "https://firestore.googleapis.com/v1/projects/$PROJECT/databases/(default)/documents/users?pageSize=1"
curl -s "https://$PROJECT-default-rtdb.firebaseio.com/.json?shallow=true"
curl -s "https://firebasestorage.googleapis.com/v0/b/$PROJECT.firebasestorage.app/o?maxResults=3"
</code></pre>
<p>You want <code>403</code> or "Permission denied" on each. Replace <code>users</code> with your real collections. If your Storage bucket is <code>PROJECT.appspot.com</code>, use that host instead.</p>
<h2>Check 4: App Check and auth settings</h2>
<p>These are settings, not code, so they don't move with the repo:</p>
<ul>
<li><strong>Authentication → Settings → Authorized domains.</strong> Remove the Firebase Studio preview domains you no longer use.</li>
<li><strong>Authentication → Sign-in method.</strong> Turn off providers you don't use. If anonymous sign-in is on, <code>request.auth != null</code> is true for everyone who opens the app, which defeats rules that rely on it alone.</li>
<li><strong>App Check.</strong> Enforce it for Firestore, Storage and any Cloud Functions that call a paid API, so requests need to come from your actual app.</li>
</ul>
<h2>Check 5: the new environment's leftovers</h2>
<p>After exporting, look for things the old environment kept private and the new project may expose:</p>
<pre><code class="language-bash">git ls-files | grep -E '^\.env|serviceAccount|firebase-adminsdk'
grep -rnE 'BEGIN (RSA )?PRIVATE KEY|"private_key"' --include='*.json' --include='*.js' --include='*.ts' . | grep -v node_modules
</code></pre>
<p>A service account JSON in the repo is a full credential for your Firebase project. If it's been committed, rotate it in Google Cloud Console → IAM → Service Accounts → Keys, then purge it from history.</p>
<h2>After you move: repeat from outside</h2>
<p>Once the app is deployed from its new home (AI Studio or Antigravity plus App Hosting), run checks 2 and 3 against the new URL. The URL and hosting changed, so anything you verified on the old one doesn't count. <a href="https://proofforge.live/check/firebase-studio">The Firebase Studio check</a> runs the outside checks from your live URL, free and read-only.</p>
<h2>A dated checklist</h2>
<ul>
<li><strong>Now:</strong> run checks 1 and 3. Fix open rules before they travel.</li>
<li><strong>Before the move:</strong> rotate any key that has been in client code or chat. Export your data.</li>
<li><strong>At the move:</strong> recreate secrets as environment variables on the new host. Don't copy <code>.env</code> into a client build.</li>
<li><strong>After the move:</strong> rerun the outside checks on the new URL. Keep rules in git with the emulator tests.</li>
<li><strong>Before March 22, 2027:</strong> confirm nothing still depends on the old workspace, because what's left there will be deleted.</li>
</ul>
<p>Check your live app the way a stranger would: <a href="https://proofforge.live/tools/firebase-rules-checker">free scan</a> (grade, every finding's severity, top fix free; all fixes $9 once).</p>
<p>Built by Brennan Zambo. <a href="https://proofforge.live">ProofForge</a></p>
]]></content:encoded></item><item><title><![CDATA[Supabase RLS is on but your data is still public: USING (true), CVE-2025-48757 and the Lovable pattern]]></title><description><![CDATA[RLS is enabled but data is still public: the USING (true) policy, CVE-2025-48757 and the Lovable pattern, with the fix.]]></description><link>https://proofforge.hashnode.dev/supabase-rls-is-on-but-your-data-is-still-public-using-true-cve-2025-48757-and-the-lovable-pattern</link><guid isPermaLink="true">https://proofforge.hashnode.dev/supabase-rls-is-on-but-your-data-is-still-public-using-true-cve-2025-48757-and-the-lovable-pattern</guid><category><![CDATA[Security]]></category><category><![CDATA[supabase]]></category><category><![CDATA[webdev]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 03:20:04 GMT</pubDate><content:encoded><![CDATA[<p>Check the live URL (free): paste it at <a href="https://proofforge.live/check">https://proofforge.live/check</a>. The scan and first fix are free. All remaining fixes are <a href="https://proofforge.live/pricing">$9</a> once. <a href="https://proofforge.live/pricing">$29</a> Fix + Guard adds on-demand rechecks. Pay with PayPal.</p>
<p>In March 2025 a researcher scanned the homepages of 1,645 apps from Lovable's showcase and found 303 endpoints across 170 projects, about 10.3%, with row level security that let anonymous requests read, and in some cases write, data. The writeup was filed as CVE-2025-48757. Lovable disputes the CVE, and the researcher's account is <a href="https://mattpalmer.io/posts/2025/05/statement-on-CVE-2025-48757/">public</a>.</p>
<p>Whatever you think of the label, the mechanism is real and is still the most common way a Lovable or Supabase app leaks. It isn't an exposed key. The Supabase anon key is public by design. The researcher's own conclusion was that the issue "was not an exposed public API key" but missing or misaligned RLS.</p>
<p>This post covers the two ways it happens and how to test for each in your own app.</p>
<h2>Failure 1: RLS is off</h2>
<p>Tables in the <code>public</code> schema are reachable through the REST API. If RLS is off on a table, the anon key can read it. Check:</p>
<pre><code class="language-sql">select tablename, rowsecurity from pg_tables
where schemaname = 'public' and rowsecurity = false;
</code></pre>
<p>Anything listed that holds user data needs RLS enabled with real policies. This is the case most scanners look for.</p>
<h2>Failure 2: RLS is on, and a policy says <code>true</code></h2>
<p>This is the one that passes a check for "does a policy exist". The generated policy looks like this:</p>
<pre><code class="language-sql">create policy "Allow all" on public.orders
  for select using (true);
</code></pre>
<p>The table has RLS, and it has a policy. The policy lets everyone read everything. The same shape appears for writes:</p>
<pre><code class="language-sql">create policy "Anyone can insert" on public.orders
  for insert with check (true);
create policy "Anyone can update" on public.orders
  for update using (true) with check (true);
</code></pre>
<p>It tends to appear because an AI assistant resolves a "permission denied" error by making the error go away. The app starts working, and nobody looks again.</p>
<p>Two rules from PostgreSQL make this worse:</p>
<ol>
<li>Policies are <strong>permissive by default and combined with OR</strong>. A careful <code>auth.uid() = user_id</code> policy next to a <code>using (true)</code> policy protects nothing.</li>
<li>A policy with no <code>TO</code> clause applies to every role, including <code>anon</code>.</li>
</ol>
<h2>Find them</h2>
<pre><code class="language-sql">select schemaname, tablename, policyname, roles, cmd, qual, with_check
from pg_policies
where schemaname = 'public'
  and (qual = 'true' or with_check = 'true')
order by tablename, cmd;
</code></pre>
<p>For each row, decide whether the table is intentionally public. A product catalog or a public blog posts table can be. Users, orders, messages, profiles with email and anything with a token can't. Also look for near-misses that behave the same:</p>
<pre><code class="language-sql">select tablename, policyname, cmd, qual
from pg_policies
where schemaname = 'public'
  and (qual ilike '%auth.role()%authenticated%' or qual is null);
</code></pre>
<p><code>auth.role() = 'authenticated'</code> means "any logged-in account", which on a public sign-up app is everyone.</p>
<h2>Fix them</h2>
<p>Drop the open policy and replace it with an owner check:</p>
<pre><code class="language-sql">drop policy "Allow all" on public.orders;

create policy "owners read their orders" on public.orders
  for select to authenticated
  using ((select auth.uid()) = user_id);

create policy "owners insert their orders" on public.orders
  for insert to authenticated
  with check ((select auth.uid()) = user_id);

create policy "owners update their orders" on public.orders
  for update to authenticated
  using ((select auth.uid()) = user_id)
  with check ((select auth.uid()) = user_id);
</code></pre>
<p>Wrapping <code>auth.uid()</code> in <code>select</code> lets Postgres evaluate it once per query rather than per row. Match <code>user_id</code> to whatever your owner column is actually called, because a copied policy with the wrong column will either block everyone or match nothing.</p>
<p>Apply it as a migration so it's in version control, not as an edit in the dashboard. <a href="https://proofforge.live/fix/supabase-rls-using-true">Step-by-step fix</a>.</p>
<h2>Test the fix as a stranger</h2>
<p>Don't trust the SQL. Ask the API the way an attacker would:</p>
<pre><code class="language-bash">URL=https://YOURREF.supabase.co
ANON=your-anon-key

# 1. Anonymous read - want [] or a permission error on private tables
curl -s "$URL/rest/v1/orders?select=*&amp;limit=1" -H "apikey: $ANON"

# 2. Count only, without reading data - want content-range: */0
curl -s -D - -o /dev/null "$URL/rest/v1/orders?select=*&amp;limit=0" \
  -H "apikey: $ANON" -H "Prefer: count=exact" | grep -i content-range

# 3. Anonymous write - want a policy error
curl -s -X POST "$URL/rest/v1/orders" -H "apikey: $ANON" \
  -H "Content-Type: application/json" -d '{"user_id":"00000000-0000-0000-0000-000000000000"}'
</code></pre>
<p>Then the test most people skip: sign in as user B and request a row that belongs to user A. If it comes back, you still have the pattern. <a href="https://proofforge.live/tools/supabase-rls-checker">The full four-test method</a> covers reads, cross-user reads and writes.</p>
<h2>What Lovable's scanner covers</h2>
<p>Lovable's Security view (More → Security) runs checks on the project. In the CVE writeup, the researcher said the scanner at the time checked for the existence of an RLS policy and not its correctness. Lovable's current documentation describes its database checks as covering tables without RLS and policies that let everyone in, so the tool has moved since. Even so, a check of project settings and a request from outside are different observations. The first says what the configuration says. The second says what the API answers.</p>
<p>Use both. <a href="https://proofforge.live/check/lovable">The Lovable check</a> requests the published URL, finds the Supabase endpoint your app already calls and probes with count-only requests, so you can see what a stranger sees without exposing row contents.</p>
<h2>What to do if the data was open</h2>
<p>Open policies don't tell you whether anyone used them. Treat the data as exposed for the period the policy existed. Rotate anything secret stored in rows (tokens, API keys in a settings table), and check your Supabase API logs for requests that used the anon key against that table. If the table held personal data, find out whether notification rules apply to you.</p>
<p>Check your live app the way a stranger would: <a href="https://proofforge.live/check/lovable">free scan</a> (grade, every finding's severity, top fix free; all fixes $9 once).</p>
<p>Built by Brennan Zambo. <a href="https://proofforge.live">ProofForge</a></p>
]]></content:encoded></item><item><title><![CDATA[How to check if your Supabase database is exposed: four tests with curl and SQL]]></title><description><![CDATA[Four curl and SQL tests to check whether your Supabase database is exposed to anyone with the public anon key.]]></description><link>https://proofforge.hashnode.dev/how-to-check-if-your-supabase-database-is-exposed-four-tests-with-curl-and-sql</link><guid isPermaLink="true">https://proofforge.hashnode.dev/how-to-check-if-your-supabase-database-is-exposed-four-tests-with-curl-and-sql</guid><category><![CDATA[Security]]></category><category><![CDATA[supabase]]></category><category><![CDATA[webdev]]></category><category><![CDATA[AI]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 03:19:36 GMT</pubDate><content:encoded><![CDATA[<p>"Is my Supabase app safe?" usually gets answered with "turn on RLS". That's one of four things to check, and it isn't the one that most often fails. Here are four tests that together tell you whether a stranger can read or change your data. Each takes a minute.</p>
<p>The anon key in your frontend is meant to be public. What it can reach depends on Row Level Security and grants. So the work is testing what that key can do.</p>
<p>Only test projects you own, and run write tests against a staging copy or rows you create for the purpose.</p>
<h2>Setup</h2>
<pre><code class="language-bash">REF=your-project-ref
URL=https://$REF.supabase.co
ANON=your-anon-or-publishable-key        # the public one from your frontend
TABLE=profiles                            # repeat for each table
</code></pre>
<p>Your table names are in your code: look for <code>supabase.from('...')</code>.</p>
<h2>Test 1: Is RLS on, and what do the policies say?</h2>
<p>In the SQL editor:</p>
<pre><code class="language-sql">select tablename, rowsecurity
from pg_tables
where schemaname = 'public'
order by rowsecurity, tablename;

select tablename, policyname, roles, cmd, qual, with_check
from pg_policies
where schemaname = 'public'
order by tablename, cmd;
</code></pre>
<p><code>rowsecurity = false</code> on a table that holds user data is the classic exposure. Fix it with <code>alter table public.profiles enable row level security;</code> plus policies, because enabling RLS with no policies blocks everything.</p>
<p>Then scan the policy output for <code>qual = 'true'</code> or <code>with_check = 'true'</code>. A policy like that is open to the roles it names, and PostgreSQL combines permissive policies with OR, so one open policy defeats a careful one beside it. <a href="https://proofforge.live/fix/supabase-rls-using-true">Details and fix</a>.</p>
<p>This test is the only one that reads your configuration. The other three read behavior.</p>
<h2>Test 2: Can an anonymous visitor read rows?</h2>
<pre><code class="language-bash">curl -s "$URL/rest/v1/$TABLE?select=*&amp;limit=1" -H "apikey: $ANON"
</code></pre>
<p>A row back means anonymous read works. <code>[]</code> is ambiguous: empty table or hidden rows. To tell the difference without reading data, ask for a count:</p>
<pre><code class="language-bash">curl -s -D - -o /dev/null "$URL/rest/v1/$TABLE?select=*&amp;limit=0" \
  -H "apikey: $ANON" -H "Prefer: count=exact" | grep -i content-range
</code></pre>
<p><code>content-range: */0</code> means no visible rows. <code>*/1482</code> means the anonymous role can see 1,482 of them. Seeing a count above zero on a table that should be private is the finding. This is also how <a href="https://proofforge.live/tools/supabase-rls-checker">ProofForge's RLS checker</a> probes, so it never needs to read row contents.</p>
<h2>Test 3: Can user B read user A's rows?</h2>
<p>Anonymous-safe isn't enough. Create two test users and sign both in:</p>
<pre><code class="language-bash">login() {
  curl -s "$URL/auth/v1/token?grant_type=password" \
    -H "apikey: $ANON" -H "Content-Type: application/json" \
    -d "{\"email\":\"$1\",\"password\":\"$2\"}" | python3 -c 'import sys,json; print(json.load(sys.stdin)["access_token"])'
}
TOKEN_B=$(login userb@test.example 'test-password-B')
</code></pre>
<p>Have user A create a row through your app, note its id, then request it as B:</p>
<pre><code class="language-bash">curl -s "$URL/rest/v1/$TABLE?id=eq.ROW_ID_OWNED_BY_A&amp;select=*" \
  -H "apikey: $ANON" -H "Authorization: Bearer $TOKEN_B"
</code></pre>
<p>You want <code>[]</code>. A row means any logged-in user can read any other user's data. This is the most common failure for apps whose only rule is "the user must be logged in", expressed as <code>auth.role() = 'authenticated'</code> or <code>using (true)</code>. The correct form ties the row to the user:</p>
<pre><code class="language-sql">create policy "owner reads own rows" on public.profiles
  for select to authenticated
  using ((select auth.uid()) = user_id);
</code></pre>
<h2>Test 4: Can anyone write?</h2>
<p>Writes are where a leak becomes damage. Test insert, update and delete, as anonymous and as the wrong user.</p>
<pre><code class="language-bash"># Insert as anonymous
curl -s -X POST "$URL/rest/v1/$TABLE" -H "apikey: $ANON" \
  -H "Content-Type: application/json" -H "Prefer: return=representation" \
  -d '{"note":"write-test"}'

# Update A's row as B
curl -s -X PATCH "$URL/rest/v1/$TABLE?id=eq.ROW_ID_OWNED_BY_A" \
  -H "apikey: $ANON" -H "Authorization: Bearer $TOKEN_B" \
  -H "Content-Type: application/json" -H "Prefer: return=representation" \
  -d '{"note":"changed by B"}'
</code></pre>
<p>Read the response body, not the status code. With RLS blocking an update, PostgREST can return a success status and an empty array <code>[]</code>, meaning zero rows were changed. A returned row means the write went through. Check that anonymous insert fails with a policy error, and delete your test rows when done.</p>
<p>An <code>insert</code> policy needs <code>with check</code>, an <code>update</code> policy needs both <code>using</code> and <code>with check</code>. Missing <code>with check</code> is why a user can update a row to point at someone else's id.</p>
<h2>Beyond the four tests</h2>
<p>These aren't covered by the four tests above, so check them separately:</p>
<ul>
<li><strong>Functions (RPC).</strong> Anything in <code>rpc/</code> runs with its own rules. A function marked <code>security definer</code> runs as its owner and can bypass RLS. <code>select proname, prosecdef from pg_proc p join pg_namespace n on n.oid = p.pronamespace where n.nspname = 'public';</code></li>
<li><strong>Storage buckets.</strong> Public buckets serve files to anyone with the URL. Check the buckets' policies in the dashboard.</li>
<li><strong>The service role key.</strong> If a bundle contains <code>service_role</code> or an <code>sb_secret_</code> key, none of the tests above matter, because that key bypasses RLS. <a href="https://proofforge.live/fix/service-role-key-exposed">Fix</a>.</li>
</ul>
<h2>Reading the results</h2>
<table>
<thead>
<tr>
<th>Test</th>
<th>Passing looks like</th>
<th>Failing means</th>
</tr>
</thead>
<tbody><tr>
<td>1. RLS and policies</td>
<td>RLS on; no <code>true</code> policies on private tables</td>
<td>Config is open before any request is made</td>
</tr>
<tr>
<td>2. Anonymous read</td>
<td>Count <code>0</code> on private tables</td>
<td>Public read</td>
</tr>
<tr>
<td>3. Cross-user read</td>
<td><code>[]</code></td>
<td>Any account reads everyone's rows</td>
</tr>
<tr>
<td>4. Writes</td>
<td>Policy error or empty result</td>
<td>Anyone can insert or change data</td>
</tr>
</tbody></table>
<p>A pass on all four covers these paths. It doesn't prove the whole backend is safe.</p>
<p>To run test 2 across the tables your public app exposes without writing the script, <a href="https://proofforge.live/tools/supabase-rls-checker">the free checker</a> takes your app URL and uses the count-only request above. If the result is a finding, <a href="https://proofforge.live/fix/supabase-rls-disabled">the RLS-disabled fix guide</a> has the migration.</p>
<p>Built by Brennan Zambo. <a href="https://proofforge.live">ProofForge</a></p>
]]></content:encoded></item><item><title><![CDATA[Bolt's "Run security audit" passed. Here's what it doesn't tell you about your published site]]></title><description><![CDATA[Bolt's security audit passed, but it does not test your published site. What it misses and how to check it yourself.]]></description><link>https://proofforge.hashnode.dev/bolt-s-run-security-audit-passed-here-s-what-it-doesn-t-tell-you-about-your-published-site</link><guid isPermaLink="true">https://proofforge.hashnode.dev/bolt-s-run-security-audit-passed-here-s-what-it-doesn-t-tell-you-about-your-published-site</guid><category><![CDATA[Security]]></category><category><![CDATA[AI]]></category><category><![CDATA[webdev]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 03:19:09 GMT</pubDate><content:encoded><![CDATA[<p>Bolt's Publish menu has a Run security audit button. Per Bolt's help center, it reviews your whole project, code and database, fixes what it can and lists what you need to handle yourself. That's worth running before every publish.</p>
<p>It answers a question about the project. This post is about a different question: what does the site at your public URL hand a stranger? The two can differ, because the published site is built output, served by a host, in front of a database that has its own settings.</p>
<p>Only run these against apps you own.</p>
<h2>What Bolt's audit looks at, in Bolt's words</h2>
<p>From the help center, the audit checks who can see and change your data, what your app makes public, sign-in and sessions, misuse of app logic, input handling, and "that private keys and passwords aren't stored in your project's code or sent to visitors' browsers". That's a review of the project as Bolt sees it.</p>
<p>What isn't described: requesting your live URL the way an anonymous visitor does, then looking at what comes back. The checks below do that.</p>
<h2>Check 1: what's in the published JavaScript</h2>
<pre><code class="language-bash">APP=https://your-app.example   # your published URL, not the editor preview
curl -s $APP | grep -oE '(src|href)="[^"]+\.js"'
curl -s $APP/assets/index-AbC123.js -o bundle.js   # use the real filename
grep -oE 'sk-[A-Za-z0-9_-]{20,}|sk_live_[A-Za-z0-9]+|AKIA[0-9A-Z]{16}|sb_secret_[A-Za-z0-9_-]+|service_role' bundle.js | sort -u
</code></pre>
<p>Expect no output. Bolt apps are Vite builds: anything named <code>VITE_*</code> is compiled into this file. Naming a variable <code>VITE_STRIPE_SECRET</code> doesn't make it private. It makes it public with a longer name.</p>
<p>Check every chunk, not only <code>index-*.js</code>. Split bundles hide values in lazily loaded files:</p>
<pre><code class="language-bash">for f in $(curl -s $APP | grep -oE '/assets/[^"]+\.js'); do
  curl -s $APP$f | grep -oE 'sk-[A-Za-z0-9_-]{20,}|sk_live_[A-Za-z0-9]+|service_role' | sed "s|^|$f: |"
done | sort -u
</code></pre>
<p>If something shows up: <a href="https://proofforge.live/fix/vite-env-secrets">fix for secrets in a Vite bundle</a>. Rotate the key first, then change the code. Deleting the line doesn't un-leak it.</p>
<h2>Check 2: files the host serves that the project doesn't show</h2>
<pre><code class="language-bash">for p in .env .env.local .env.production .git/HEAD .git/config package.json; do
  printf "%-14s " "$p"; curl -s -o /dev/null -w "%{http_code} %{size_download}b\n" "$APP/$p"
done
</code></pre>
<p>Single-page apps often return the HTML shell with a <code>200</code> for any path. So look at the size and compare it to the home page's size. If <code>/.env</code> returns the same byte count as <code>/</code>, that's the shell. If it returns a small file, read it:</p>
<pre><code class="language-bash">curl -s $APP/.env | head -5
</code></pre>
<p><a href="https://proofforge.live/fix/env-file-exposed">Exposed .env fix</a> · <a href="https://proofforge.live/fix/git-folder-exposed">exposed .git fix</a></p>
<h2>Check 3: source maps</h2>
<pre><code class="language-bash">curl -s -o /dev/null -w "%{http_code}\n" $APP/assets/index-AbC123.js.map
</code></pre>
<p>A <code>200</code> means anyone can download your original source. Not a breach on its own, but it makes every other bug easier to find. <a href="https://proofforge.live/fix/source-maps-exposed">Fix</a>.</p>
<h2>Check 4: the database, from outside the app</h2>
<p>This is the one that matters most for Bolt apps on Supabase. In your browser's DevTools → Network, reload your published site and filter for <code>supabase.co</code>. Copy one request as cURL and delete any <code>Authorization</code> header so it runs as an anonymous visitor:</p>
<pre><code class="language-bash">curl -s "https://YOURREF.supabase.co/rest/v1/profiles?select=*&amp;limit=1" \
  -H "apikey: YOUR_ANON_KEY"
</code></pre>
<p><code>[]</code> or a permission error: fine for a private table, though an empty table also returns <code>[]</code>, so test with a table that has rows. A row back means any visitor can read it. Run it for every table your app uses, and again with a second real user's token to confirm user A can't read user B's rows. <a href="https://proofforge.live/tools/supabase-rls-checker">The four-test version of this</a> is what to run before you trust a result.</p>
<h2>Check 5: headers and CORS</h2>
<pre><code class="language-bash">curl -sI $APP | grep -iE 'strict-transport|content-security|x-frame|x-content-type|referrer'
curl -s -I -H "Origin: https://evil.example" $APP/api/anything | grep -i access-control
</code></pre>
<p>You want <code>Strict-Transport-Security</code> on HTTPS, and no <code>Access-Control-Allow-Origin: *</code> on endpoints that return private data. Missing headers are low severity on their own; a wildcard CORS on a data route isn't. <a href="https://proofforge.live/fix/missing-security-headers">Missing headers</a> · <a href="https://proofforge.live/fix/cors-wildcard">CORS wildcard</a>.</p>
<h2>Why the audit and the outside check disagree</h2>
<ul>
<li><strong>Build and deploy are separate steps.</strong> A fix in the project isn't a fix on the public URL until the deploy finishes, and a cached or second deployment can keep serving the old bundle.</li>
<li><strong>Hosting adds behavior.</strong> Redirects, headers and static file serving come from the host, not from your code.</li>
<li><strong>The database has its own state.</strong> Policies live in the database. If something changed there outside Bolt, the project doesn't show it.</li>
<li><strong>Time.</strong> The audit marks "up to date" when run. The risky change is the prompt after it.</li>
</ul>
<h2>A routine that takes two minutes</h2>
<ol>
<li>Run Run security audit in Publish. Apply what it fixes.</li>
<li>Publish.</li>
<li>Run the outside check on the production URL: <a href="https://proofforge.live/check/bolt">the Bolt check</a> runs checks 1 to 5 from your URL, free and read-only, and flags anything the visitor can see.</li>
<li>Repeat after every feature you ship, not only the first.</li>
</ol>
<p>Neither tool is a penetration test. Together they look at the project from both sides, which is what a stranger and the builder each need.</p>
<p>Built by Brennan Zambo. <a href="https://proofforge.live">ProofForge</a></p>
]]></content:encoded></item><item><title><![CDATA[Firebase allow read, write: if true: how to find it in your app and fix it in 10 minutes]]></title><description><![CDATA[Find and fix Firebase rules that allow read and write for everyone, test them as a stranger, and prove the fix worked.]]></description><link>https://proofforge.hashnode.dev/firebase-allow-read-write-if-true-how-to-find-it-in-your-app-and-fix-it-in-10-minutes</link><guid isPermaLink="true">https://proofforge.hashnode.dev/firebase-allow-read-write-if-true-how-to-find-it-in-your-app-and-fix-it-in-10-minutes</guid><category><![CDATA[Security]]></category><category><![CDATA[Firebase]]></category><category><![CDATA[webdev]]></category><category><![CDATA[JavaScript]]></category><dc:creator><![CDATA[ProofForge]]></dc:creator><pubDate>Thu, 26 Nov 2026 03:18:41 GMT</pubDate><content:encoded><![CDATA[<p>If your Firebase project has this in its rules, anyone on the internet can read and write that data:</p>
<pre><code>allow read, write: if true;
</code></pre>
<p>It's the line most often left behind by a quick start, a generated app, or a "just get it working" prompt. It also isn't visible in the app UI. Everything works, which is why it survives.</p>
<p>This is how to check whether you have it, from outside and from the console, and what to replace it with. If you built the app in Firebase Studio, the same applies, and there's a deadline attached, covered at the end.</p>
<h2>Why the Firebase config being public isn't the problem</h2>
<p>Your <code>apiKey</code>, <code>projectId</code> and <code>appId</code> are in your JavaScript bundle by design. Firebase Security Rules, not secrecy, are what decide who can do what. So an open rule is the vulnerability: the config just tells a stranger where to knock.</p>
<h2>Check 1: ask from outside</h2>
<p>Take your <code>projectId</code> from the bundle's <code>firebaseConfig</code>.</p>
<p><strong>Firestore:</strong></p>
<pre><code class="language-bash">PROJECT=your-project-id
curl -s "https://firestore.googleapis.com/v1/projects/$PROJECT/databases/(default)/documents/users?pageSize=1"
</code></pre>
<p>If your rules are locked, you get <code>"code": 403</code> and <code>PERMISSION_DENIED</code>. If you get back a <code>documents</code> array, anyone can read that collection. Replace <code>users</code> with your real collection names.</p>
<p><strong>Realtime Database:</strong></p>
<pre><code class="language-bash">curl -s "https://$PROJECT-default-rtdb.firebaseio.com/.json?shallow=true"
</code></pre>
<p><code>{"error":"Permission denied"}</code> is the answer you want. A JSON object of keys means the root is open. Your database URL may use a region host like <code>-default-rtdb.europe-west1.firebasedatabase.app</code>, so use the one from your config.</p>
<p><strong>Storage:</strong></p>
<pre><code class="language-bash">BUCKET=your-project.firebasestorage.app   # or your-project.appspot.com
curl -s "https://firebasestorage.googleapis.com/v0/b/$BUCKET/o?maxResults=3"
</code></pre>
<p>A listing of <code>items</code> means anyone can enumerate your files. A <code>403</code> is the answer you want.</p>
<p>Only run this against projects you own. The calls ask for one page and read no more than the rules allow any stranger.</p>
<p>You can run the same checks without the terminal: <a href="https://proofforge.live/tools/firebase-rules-checker">the free Firebase rules checker</a> takes your app URL. <a href="https://proofforge.live/check/firebase-studio">The Firebase Studio check</a> covers that builder's specifics.</p>
<h2>Check 2: read the deployed rules</h2>
<p>In the console: Firestore Database → Rules, Realtime Database → Rules, Storage → Rules. Or from the CLI:</p>
<pre><code class="language-bash">firebase init firestore    # pulls firestore.rules
cat firestore.rules
</code></pre>
<p>Search for these:</p>
<ul>
<li><code>if true</code></li>
<li><code>allow read, write;</code> (no condition)</li>
<li>A <code>request.time &lt; timestamp.date(...)</code> rule with a date in the future. This is "test mode": it expires, but until then it's open.</li>
<li>A recursive <code>match /{document=**}</code> with a broad <code>allow</code>. It grants everything under it.</li>
</ul>
<p>Realtime Database rules use <code>".read": true</code> and <code>".write": true</code> instead. Same problem.</p>
<h2>Fix: replace it with ownership checks</h2>
<p>The smallest useful pattern for per-user data:</p>
<pre><code>rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {

    // Each user owns their own document and nothing else
    match /users/{userId} {
      allow read, update, delete: if request.auth != null &amp;&amp; request.auth.uid == userId;
      allow create: if request.auth != null &amp;&amp; request.auth.uid == userId;
    }

    // Data shared by everyone signed in, writable only by its author
    match /posts/{postId} {
      allow read: if request.auth != null;
      allow create: if request.auth != null
                    &amp;&amp; request.resource.data.authorId == request.auth.uid;
      allow update, delete: if request.auth != null
                    &amp;&amp; resource.data.authorId == request.auth.uid;
    }

    // Everything else: closed
    match /{document=**} {
      allow read, write: if false;
    }
  }
}
</code></pre>
<p>Two things matter here. The final catch-all denies anything you didn't think of, and <code>request.auth != null</code> alone is never enough when users should only see their own data, because any signed-in account passes it.</p>
<p>Storage follows the same idea:</p>
<pre><code>rules_version = '2';
service firebase.storage {
  match /b/{bucket}/o {
    match /users/{userId}/{allPaths=**} {
      allow read, write: if request.auth != null &amp;&amp; request.auth.uid == userId;
    }
  }
}
</code></pre>
<h2>Test it before you deploy</h2>
<p>Use the emulator so you don't test against production:</p>
<pre><code class="language-js">import { initializeTestEnvironment, assertFails, assertSucceeds } from '@firebase/rules-unit-testing';
import { readFileSync } from 'fs';

const env = await initializeTestEnvironment({
  projectId: 'demo-rules-test',
  firestore: { rules: readFileSync('firestore.rules', 'utf8') },
});

const alice = env.authenticatedContext('alice').firestore();
const bob   = env.authenticatedContext('bob').firestore();
const anon  = env.unauthenticatedContext().firestore();

await assertSucceeds(alice.doc('users/alice').set({ name: 'A' }));
await assertFails(bob.doc('users/alice').get());     // other user
await assertFails(anon.doc('users/alice').get());    // not signed in
await assertFails(anon.doc('users/alice').set({ name: 'x' }));
</code></pre>
<p>Run it with <code>firebase emulators:exec --only firestore "node rules.test.mjs"</code>. Three outcomes to verify: the owner works, another signed-in user fails, and an anonymous request fails.</p>
<p>Then deploy and repeat Check 1:</p>
<pre><code class="language-bash">firebase deploy --only firestore:rules,storage
</code></pre>
<p>The curl results should now be <code>403</code>. Open your app, sign in as a normal user, and confirm it still works. If the app breaks, a rule is narrower than a feature needs. Widen that one path, not the whole database.</p>
<h2>If an open rule was live</h2>
<p>The rule alone doesn't prove anyone used it. Treat it as exposed anyway: check Firestore usage in the console for unexpected spikes, rotate any secrets stored in documents, and review whether personal data was stored. <a href="https://proofforge.live/fix/firebase-open-rules">The fix guide</a> lays out the order.</p>
<h2>If you used Firebase Studio</h2>
<p>Google's documentation says Firebase Studio is being sunset on March 22, 2027, with new workspace creation already disabled, and points existing projects to Google AI Studio or Google Antigravity. Moving the app doesn't move your rules: they live in your Firebase project, so an open rule survives the migration unless you fix it first. Do the three checks above before you migrate, not after.</p>
<p>Built by Brennan Zambo. <a href="https://proofforge.live">ProofForge</a></p>
]]></content:encoded></item></channel></rss>