# Building MVP — complete article corpus Source: https://buildingmvp.com Author: MVP Strategic Consulting (Marvin Varnphruk) Articles: 17 Generated: 2026-10-28 Writing on building and shipping software with AI coding assistants: the security and reliability failures that actually bite small apps, why they happen, and how to close them. Free to quote and cite with attribution and a link to the source URL of the individual article. ## Contents 1. The clearest legal template on GitHub has no licence on it — https://buildingmvp.com/articles/open-source-legal-templates 2. You need a privacy policy. You probably do not need a EULA. — https://buildingmvp.com/articles/privacy-policy-and-eula 3. Anthropic ships four security tools. One excludes the thing that costs you most. — https://buildingmvp.com/articles/anthropic-official-security-tooling 4. The package your AI recommended may not have existed last week — https://buildingmvp.com/articles/the-package-your-ai-recommended 5. waitUntil is not a queue, and pg_net is not one either — https://buildingmvp.com/articles/waituntil-is-not-a-queue 6. 111 things you don't know. Most of them are not your problem. — https://buildingmvp.com/articles/111-things-most-are-not-your-problem 7. Your SDK already retries. That is how you get charged twice. — https://buildingmvp.com/articles/your-sdk-already-retries 8. Your logs expire in an hour and your database has no backup — https://buildingmvp.com/articles/your-logs-expire-in-an-hour 9. You can undo the deploy. You cannot undo the migration. — https://buildingmvp.com/articles/you-can-undo-the-deploy-not-the-migration 10. Your vibe coded app is slow. Here is where to look. — https://buildingmvp.com/articles/your-vibe-coded-app-is-slow-here-is-where-to-look 11. Nobody wants your data. They want your API key. — https://buildingmvp.com/articles/nobody-wants-your-data-they-want-your-api-key 12. Your app works. That is not the same as it scaling. — https://buildingmvp.com/articles/your-app-works-that-is-not-the-same-as-scaling 13. Your row level security is correct. Your app is still wide open. — https://buildingmvp.com/articles/your-rls-is-correct-your-schema-is-the-hole 14. Press F12. Your app is telling on itself. — https://buildingmvp.com/articles/press-f12-your-app-is-telling-on-itself 15. Securing Supabase: what actually matters — https://buildingmvp.com/articles/securing-supabase-what-actually-matters 16. Lock a whole app behind a login in 20 minutes with Cloudflare — https://buildingmvp.com/articles/cloudflare-access-for-vibe-coders 17. Vibe hacking: the other half of vibe coding — https://buildingmvp.com/articles/vibe-hacking-the-other-half-of-vibe-coding ============================================================================== # The clearest legal template on GitHub has no licence on it > Real companies have open sourced their production legal documents, and the licence on the file decides whether you can use it more than the writing does. What is actually out there, what CC0 and ShareAlike mean for your terms, and three searches that work on your own draft. **Published:** 2026-10-22 · **Topic:** Legal · **Reading time:** 8 min read **Source:** https://buildingmvp.com/articles/open-source-legal-templates **Author:** MVP Strategic Consulting (buildingmvp.com) --- **The most readable plain-English contract template on GitHub describes itself as open source, has 311 stars, and carries no licence file at all.** No licence means default copyright, which means all rights reserved, which means you are not actually permitted to copy it. The clearest legal document in the search results is the one you are least able to use, and the problem is in a file nobody opens. That is the thing worth understanding before you go looking for a template. The quality of the writing is not what decides whether you can use it. The licence is. > **Note.** **I am not a lawyer and this is not legal advice.** Star counts and licences below were read from the GitHub API on 22 October 2026 and can change. A permissive licence tells you that copying is allowed. It tells you nothing about whether the document is right for your business, your jurisdiction, or your risk. ## What is actually out there Searching GitHub for legal templates returns mostly noise: unrelated awesome-lists, scraped HTML, abandoned experiments. The genuinely useful repositories are ones where a real company open sourced its own production legal documents. - **github/site-policy**, 2,186 stars, **CC0-1.0**. GitHub's own terms, privacy statement and related policies, kept under version control. CC0 is a public domain dedication, so this is the most permissively licensed serious legal text in the list. It also has 780 forks, which tells you people are in fact using it this way. - **Automattic/legalmattic**, 876 stars, **CC BY-SA 4.0**. The source of several WordPress.com legal documents, including the terms of service. The README is unusually direct about intent: they want their legal documents to be “open and accessible” and invite you to re-use and edit them. - **basecamp/policies**, 127 stars, **CC BY 4.0**. Smaller and the most useful of the three for a different reason, covered below. - **jackmorgan/the-plain-contract**, 311 stars, **no licence**. A freelance contract written in plain language. It is also distributed as a single Word document rather than text, which makes it hard to diff and hard to track. - **tosdr/tosdr.org**, 453 stars, **archived**. Terms of Service Didn't Read, the project that grades the terms of major services. This repository has not been pushed to since January 2021 and is marked archived, so treat anything you read about it as historical. - **LexPredict/lexpredict-lexnlp**, 794 stars, **AGPL-3.0**. A different kind of tool: natural language processing for legal text, for extracting clauses, dates and parties from documents at scale. Relevant if you are building something, not if you are writing one policy. ## The licence is the product Four different answers, and the differences matter more than they look. **CC0** is as close to public domain as a licence gets. Take it, change it, ship it, no attribution required. For legal boilerplate this is the easiest possible position to be in. **CC BY** permits the same reuse but requires credit. Workable, though crediting a source inside your own terms of service is slightly awkward and worth deciding deliberately rather than discovering later. **CC BY-SA** adds ShareAlike, and this is the one to think about. Adapted material must be released under the same licence. Applied to marketing copy that is unremarkable. Applied to your terms of service it means your adapted terms carry a licence allowing others to reuse them too. That may be entirely fine with you, and it may not be what you assumed when you copied the file. **No licence** is not permission. It is the absence of permission, and the default is that the author keeps every right. A repository being public, and even describing itself as open source in its own description, does not grant you anything. There is a mild irony worth sitting with. The risk you take by copying an unlicensed template is a copyright risk, created by the act of acquiring a document whose purpose is to reduce your legal risk. ## Use them for structure, not for sentences The highest value in these repositories is not the prose. It is the answer to a question most people never ask, which is *how many documents am I supposed to have*. Look at how basecamp/policies is organised. The top level is a set of directories: privacy, security, abuse, cancellation, refund, copyright, and ownership. That listing is a far better starting checklist than any article, because it is the actual set a real subscription business found it needed. Most people building an app think about one document, maybe two. A company that has been running a paid product for twenty years keeps seven. You probably do not need all seven on day one. You do need to know which ones you have decided to skip. The same applies to github/site-policy. Being able to read a large platform's policies as plain files, with history, is genuinely instructive about what a mature version of this looks like. ## Reading the language, which is also how you check your own The most watched explainer on this subject is a short piece from The Verge, with about 141,000 views, which asks two privacy specialists how they actually read a policy. Their method is a set of searches, and it is more useful than it sounds. **Search for “control”.** It leads you to the settings you can actually change, which is the part of a policy with practical consequences rather than legal ones. **Search for “not”.** The logic here is the clever part: companies avoid the word because it binds them. Where it does appear, it is a genuine commitment rather than a description. **Search for “such as”.** This is the tell. An open-ended list means the policy is giving examples rather than the full set, and the full set is what you wanted. One of them, Nate Cardozo of the Electronic Frontier Foundation, is sceptical that AI will solve this, on the grounds that a system looking for those phrases could be gamed by writing around them. The other hopes for standardised machine-readable policies. Neither thinks the current situation is good. **Now invert it.** Those three searches are a review tool for your own draft. Run them against the policy you are about to publish: - If `such as` appears repeatedly, you have written a document full of open-ended lists, which means you have not finished deciding what you collect. - If `not` never appears, your policy commits to nothing. It describes behaviour without ruling anything out. - If `control` leads nowhere, you have promised rights without building the mechanism for exercising them. That last one is the one that turns into engineering work rather than editing work, and it is the one people discover latest. ## So what should you actually do - **Do not start from a blank page.** You will produce something vague, and vague is the failure mode that matters. - **Do not start from a template you cannot licence.** Check for a LICENSE file before you read the content, not after. - **Use the structure first.** Decide which documents you need before you write a sentence of any of them. - **Use a generator for the scaffolding** if you want, and understand that it produces the document and not the answers. The answers are decisions about your own system. - **Get advice for anything regulated.**Health, financial or children's data is not a template exercise. - **Keep them in version control.** Every repository here demonstrates the same quiet point: legal documents change, and a document with no history is one nobody can audit. Both GitHub and Automattic treat their policies as code, and that is the habit worth stealing even if you never reuse a word. For what has to be inside the document once you start writing, the requirements and the store rules are in a [separate article](https://buildingmvp.com/articles/privacy-policy-and-eula). This one is only about where the raw material comes from and what you are permitted to do with it. ## What I could not check I wanted to survey the most widely read guides on writing these documents and compare their advice. My web search budget was exhausted before I got there, so that comparison is not in this article. What is here comes from the GitHub API, which I queried directly, and from the video named above. Licences and star counts are a snapshot. Check both yourself before relying on either, and note that a repository can change its licence while keeping the same files. --- *Originally published at https://buildingmvp.com/articles/open-source-legal-templates. Free to quote with attribution.* ============================================================================== # You need a privacy policy. You probably do not need a EULA. > Google Play requires one from every app, including apps that collect nothing. What the stores actually check, the Article 13 list you can treat as a specification, the format rules that get submissions rejected, and why deletion is a build task rather than a paragraph. **Published:** 2026-10-21 · **Topic:** Legal · **Reading time:** 9 min read **Source:** https://buildingmvp.com/articles/privacy-policy-and-eula **Author:** MVP Strategic Consulting (buildingmvp.com) --- **Google Play requires every app to publish a privacy policy, including apps that collect no personal data at all.** Their policy says it in those words: apps that do not access any personal and sensitive user data must still submit one. Most people building an app worry about the wrong document. They think about the long agreement nobody reads and nobody asked them for, and skip the short one that is a hard requirement for shipping and a legal obligation in most of the world. > **Note.** **I am not a lawyer and this is not legal advice.** Everything below is sourced to the actual store policies and the text of the regulation so you can check it yourself, and it is written to help you arrive at a lawyer, or at a generator, already knowing what you are being asked. If you process health data, financial data, or data about children, stop reading listicles and get advice. ## Three documents that get confused - **Privacy policy.** A disclosure. It tells people what you do with their data. Required by both app stores, and required by law in the EU, the UK, California and many other places. **This is the one you actually need.** - **Terms of service.** A contract between you and your user about the service: acceptable use, payment, cancellation, your liability. Not usually mandated, genuinely useful once money changes hands. - **EULA.** A licence to use a copy of software. It exists because you are not selling the software, you are licensing it. For most modern web apps this is the least relevant of the three, and on iOS you may not need to write one at all. The ranking is the point. A missing privacy policy blocks your release and creates legal exposure. A missing EULA usually does neither. ## What the stores will actually stop you on **Apple.** Guideline 5.1.1 requires a link to your privacy policy in *two* places: the App Store Connect metadata field and somewhere easily accessible inside the app. The policy itself must clearly and explicitly identify what data the app collects, how it collects it, and all uses of that data. It must confirm that any third party you share data with provides equal protection, and it names the usual suspects: analytics tools, advertising networks, third-party SDKs, and any parent or subsidiary with access. It must also explain your retention and deletion policy and how someone revokes consent or requests deletion. **Google.** Same requirement, plus a few specifics that trip people up. The policy must disclose how the app accesses, collects, uses and shares data, name the same entity as your store listing, and include developer contact information. Separately, you must complete a Data safety section for every app, which is displayed on your store page. ## The format rules nobody reads until they are rejected Google is unusually prescriptive about the page itself. The privacy policy URL must be: - **Active and publicly accessible.** Not behind a login. - **Not geofenced.** Reachable from anywhere, which rules out region-restricted hosting. - **Not a PDF.** Stated explicitly. - **Non-editable.** Which in practice rules out a shared document link, the thing a lot of people reach for first. If you have a website, the answer is a plain page at `/privacy`. That satisfies all four conditions without any thought, which is the main reason to do it that way. ## What has to be in it Here is the useful part, and it is more concrete than people expect. The GDPR does not describe a vibe. Its Article 13 is a list of things you must tell someone when you collect data from them, and a developer can treat it as a specification. When you collect data directly from a person, you must provide: - **Who you are.** The identity and contact details of the controller, and of a representative if you have one. - **Your data protection officer**, where applicable. Most small apps do not have one. - **Why you are processing the data, and your legal basis for doing so.** Both, not just the first. - **The legitimate interests you are relying on**, if that is the basis you chose. - **Who receives the data.** Recipients or categories of recipients. Your analytics provider and your email sender both belong here. - **Transfers outside the region**, and what safeguards cover them. - **How long you keep it**, or if you cannot say, the criteria you use to decide. - **Their rights:** access, correction, deletion, restriction, portability, and objection. - **The right to withdraw consent**, where consent is your basis. - **The right to complain to a supervisory authority.** - **Whether providing the data is required** by statute or contract, and what happens if they refuse. - **Any automated decision-making or profiling**, including the logic involved and the consequences. Read that back as a form to fill in. Every item is a question about your own system, and you can answer most of them in an afternoon by looking at your code. ## The part you cannot outsource A generator produces the document. It cannot produce the answers, and the answers are the work. The most commonly skipped one is the **legal basis**. Under the GDPR you need a lawful reason to process someone's data before you process it, and there are six to choose from: consent, necessity for a contract, legal obligation, vital interests, public interest, and legitimate interests. In a conference talk aimed at developers, Johannes Brodwall calls legitimate interests one of the biggest traps in the whole regulation, and the reason is that it sounds like a way to avoid asking. It is not. It requires you to have actually weighed your interest against the person's rights, and to be able to show that you did. Where consent is your basis, the bar is specific. The same talk makes the point with an example anyone at a conference will recognise: a badge gets scanned, and the person whose badge it was never found out what the data would be used for. Consent has to be **informed and freely given**, and consent collected without telling someone the purpose is not valid consent, however many people clicked the button. The practical consequence for a small app is that your privacy policy cannot be written before you have decided a few things. Which third parties receive data. How long rows live. Who inside your company can read them. If you do not know, the document will be vague in exactly the places that matter, and the vagueness is the liability. ## Deletion is a build task, not a paragraph This is the requirement most likely to need actual engineering, and it has crept up in strictness. **Apple:** if your app supports account creation, you must offer account deletion within the app. Not a support email. Not a web form you link to. In the app. **Google:** deletion must be available both inside the app and through a web resource. And they close the obvious loophole: deleting an account on request means deleting the user data associated with it, and temporary deactivation does not count as deletion. So before you write the sentence promising deletion, make sure the sentence is true. That usually means a real cascade across your tables, a decision about what happens to data you are legally required to retain such as invoices, and a plan for your backups. ## So when do you need a EULA? Less often than the internet suggests. Two things worth knowing. **On iOS, Apple provides a standard EULA** that applies to your app unless you supply your own. It covers the usual ground: a non-transferable licence to use the app on devices the user owns, restrictions on reverse engineering and redistribution, automatic termination on breach, an as-is warranty disclaimer, and a liability cap. For a straightforward consumer app, using Apple's default is a legitimate choice rather than a shortcut. **You write your own when the default does not describe your deal.** Per-seat licensing, a trial that converts, restrictions on competitive use or benchmarking, anything you distribute outside a store, anything installed on a customer's own infrastructure. If you are a web app with a subscription, what you actually want is terms of service, not a EULA. > **Note.** A detail worth noticing in Apple's standard agreement, because it applies to you as the developer rather than to your user: it contemplates the licensor collecting technical data to support updates and services. A default agreement still describes behaviour you are responsible for, so read the one you are adopting. ## A sane order to do this in - **Write down what you collect.** Open your schema and your third-party integrations and list every field and every recipient. This is the artefact everything else is generated from. - **Pick a legal basis per purpose**, and write the purpose in plain words. Analytics and billing are different purposes with potentially different bases. - **Decide retention.** An actual number, or the rule you use to derive one. - **Build deletion before you promise it.** In-app for Apple, in-app and web for Google. - **Then generate or draft the document**, working through the Article 13 list as a checklist. - **Publish it as a real page** at a stable URL. Not a PDF, not a shared doc, not behind a login, not geofenced. - **Link it twice**, in the store listing and inside the app. - **Complete Google's Data safety section** so that it matches the policy you just wrote. Two descriptions of the same system that disagree is a worse position than one. ## What this article does not cover Jurisdictions beyond the ones named here, and the thresholds that decide whether a specific law applies to you, which depend on where your users are rather than where you are. California, Brazil, Canada and others each add requirements, and some add a right to opt out of sale or sharing that has no direct equivalent above. Cookie consent is a separate regime from the privacy policy and is not solved by having one. Children's data is its own legal world. And none of this addresses the security obligations that sit alongside the disclosure obligations, where saying you keep data secure and actually doing so are judged separately. The honest summary: a privacy policy is mandatory, it is mostly a form, and the hard part is deciding the answers rather than writing the prose. A EULA is optional more often than not. If you only do one thing after reading this, go and check whether your app has a deletion path that actually deletes. --- *Originally published at https://buildingmvp.com/articles/privacy-policy-and-eula. Free to quote with attribution.* ============================================================================== # Anthropic ships four security tools. One excludes the thing that costs you most. > There is a built-in command, two marketplace plugins and a GitHub Action, and most people know about none of them. How the verification architecture works, what one hands-on test actually caught, and why rate limiting is filtered out of the default report. **Published:** 2026-10-20 · **Topic:** Security · **Reading time:** 9 min read **Source:** https://buildingmvp.com/articles/anthropic-official-security-tooling **Author:** MVP Strategic Consulting (buildingmvp.com) --- **Anthropic ships four separate security tools for Claude Code, and the official GitHub Action excludes rate limiting from its findings by default.** For a team reviewing pull requests, that exclusion is correct: rate limiting findings are noisy and rarely prove impact. For an AI-built app with an unauthenticated endpoint calling a paid model, it removes the single most expensive thing that can happen to you. That gap is not a flaw in the tooling. It is a tool built for a different problem than the one you have, and knowing which is which is the whole point of this article. ## The four things, because most people know about one - **`/security-review`** is built into Claude Code. Nothing to install. It is also now discoverable by the model itself, so you can ask for a security review in plain words and it will reach for the command. - **claude-security**is a plugin from the official marketplace, and it is substantial: one skill, eight agents, hooks, workflows, and Python scripts. It is the in-session version of Anthropic's hosted security product. - **security-guidance** is a second plugin, and the one most relevant to this site, because it is explicitly aimed at reviewing *Claude-generated* code as it is written. - **claude-code-security-review** is a GitHub Action that reviews pull request diffs and comments inline. Install the plugins with `/plugin install claude-security@claude-plugins-official` and the same for `security-guidance`. While you are in there, it is worth knowing the official marketplace carries around forty plugins. Most people have never opened it. ## How the big one is built The architecture of claude-security is worth reading even if you never run it, because it is a serious answer to the problem that makes AI security review unreliable: a model asked whether code is secure tends to say yes. Its own description of the answer: > every finding challenged before it is reported and the verification tally computed in code > > — claude-security plugin, Anthropic Three design decisions sit behind that, and each one is aimed at a specific failure. **Findings are challenged by someone else.** Candidates go to independent verifiers whose job is to disprove them, working from the code rather than from the report of it, and instructed to call a finding a false positive unless they can confirm a real path to exploitation. The researcher does not get to mark its own work. **The rigor claim is computed, not asserted.** The record of how thoroughly a run was verified is produced in code rather than written by the model that produced the findings. A finding also cannot claim more confidence than its verification earned. This closes the obvious hole where a model writes both the findings and the paragraph saying how carefully it checked them. **The repository is evidence, not instruction.** Code, comments and any `CLAUDE.md` in the tree are read as data under review, so text addressed to the scan is noted rather than obeyed. That is a prompt injection defence, and the documentation is careful about how far it goes: it is explicitly not a defence against a hostile repository, and for scanning code you do not trust they recommend running the whole session in a sandbox. The patching side is held to the same standard. Fixes are developed in a scratch copy, never your working tree, and reviewed by agents independent of the one that wrote the patch. A patch is only written when the review can vouch that it addresses that one finding, introduces nothing new, and leaves behaviour otherwise unchanged. Nothing is applied, committed or pushed for you. > **Note.** A detail worth stealing regardless of whether you use the tool: a change to which inputs the code accepts counts as a behaviour change. That is a tighter definition than most people apply when reviewing a security fix, and it catches the classic case where tightening validation quietly breaks a caller. ## What it looks like in practice One hands-on test worth reporting, with the caveat that it is one person, one project, and a single run. A developer built a small Laravel app with two deliberate flaws, a raw SQL query taking unfiltered input and a comment field rendered without escaping, then ran `/security-review` with no arguments. It found both. Each came back with the specific line, a severity, the input that would trigger it, the concrete exploit scenario, and a framework-appropriate recommendation. The whole run took roughly three to five minutes, with individual findings taking up to two minutes each to validate. The third result is the interesting one. He had also left a Stripe-shaped key hardcoded in a controller. The scan *detected* it, then *dismissed*it during validation. His reading was that the variable name contained “public” and the value contained “test,” so the verifier concluded it was not a real credential. Which is the verification layer working exactly as designed, and also the cost of it. The instruction to discard anything you cannot prove is what keeps the reports short and trustworthy. It is the same instruction that threw away a hardcoded key. ## The exclusion list Here is the part that matters most for anyone building the kind of app this site is about. The GitHub Action documents what it filters out by default to reduce noise: - Denial of service vulnerabilities - **Rate limiting concerns** - Memory and CPU exhaustion issues - Generic input validation without proven impact - Open redirects Read that list against a vibe-coded app. The realistic worst case for a small AI-built product is not a breach, it is an invoice: an unauthenticated endpoint that calls a paid model, hit in a loop. The attack is resource exhaustion. The control is a rate limit. **Both are on the exclusion list.** This is a reasonable default and a bad fit for this audience. Those findings genuinely are noisy in a mature codebase with an infrastructure team and a WAF in front of it, where a missing application-level rate limit is usually somebody else's layer. On a solo project where nothing sits in front of the endpoint and the provider bills per call, it is the finding you most needed. The filtering is tunable, which is the actual answer: the Action takes custom false-positive filtering instructions. If you use it on an app with metered endpoints, override the default and say so. ## The second plugin, which almost nobody mentions security-guidance deserves more attention than it gets, because it is the only one of the four that works while the code is being written rather than after. It runs in three layers: - **Pattern warnings on every edit.** Instant regex checks for around twenty-five known-dangerous patterns, the unsafe deserialisation and raw HTML family. - **A diff review when Claude finishes a turn.** High-severity findings are fed back to Claude so it can fix them before the response reaches you. - **An agentic review on commit** that reads related files to trace data flow across the codebase, aimed at the multi-file problems pattern matching cannot see: insecure direct object references, auth bypass, cross-file request forgery. That second layer is the one to notice. It is a correction loop that runs before you ever see the output, which is a meaningfully different intervention point from scanning a finished repository. It also costs an extra model call on every turn, so it is a real trade rather than a free win. ## What the documentation is honest about Three admissions in the official material that you should carry. **Scans are nondeterministic.**Two scans of the same code can surface different findings. The documentation's own conclusion is that running scans regularly builds coverage, which is a polite way of saying one clean scan proves less than you would like. **It complements rather than replaces.** The stated position is that this reasons about code the way a human researcher does, alongside static analysis, dependency scanning and code review. Nobody is claiming it is a substitute for the boring tools. **The Action is not hardened against prompt injection.** Stated plainly in the repository, with the recommendation to only use it on trusted pull requests and to require approval for external contributors. A security reviewer that reads attacker-supplied text is itself an attack surface, and they say so rather than leaving you to work it out. ## What I would actually do - **Turn on `/security-review` now.** It is already installed and it demonstrably catches the textbook injection and escaping flaws with usable detail. - **Install security-guidance** if most of your code is model-written. Catching a problem in the turn that created it is worth more than catching it in a scan next week. - **Run claude-security before a release** rather than continuously. It is the heavier tool and the verification is what you are paying for. - **Override the exclusion list** if you use the Action and your app has endpoints that cost money per call. - **Keep checking the things a scanner structurally cannot see.** Whether entitlements sit on a row the user can write. Whether a spend cap actually halts rather than emails. Whether a table created by migration has access control switched on. Those are not code flaws, they are design and configuration decisions, and the most expensive one on that list passed review by two different AI tools before it cost somebody their AI bill. The honest summary: the official tooling is better engineered than anything you would assemble yourself, and its verification design is the right answer to the problem of models agreeing with you. It is also tuned for code review in an organisation, which means the category that empties a solo builder's bank account is filtered out of the default report. Use it. Just know what it is not looking for. --- *Originally published at https://buildingmvp.com/articles/anthropic-official-security-tooling. Free to quote with attribution.* ============================================================================== # The package your AI recommended may not have existed last week > Slopsquatting is the first attack genuinely specific to how AI-built software gets made: a model invents a package name, an attacker registers it, and your scanner has nothing to flag. Plus the incident where malicious install scripts hijacked AI coding tools that had been told to stop asking permission. **Published:** 2026-10-20 · **Topic:** Security · **Reading time:** 8 min read **Source:** https://buildingmvp.com/articles/the-package-your-ai-recommended **Author:** MVP Strategic Consulting (buildingmvp.com) --- **Ask a model for a library and it will sometimes name one that does not exist. If an attacker has noticed which names it invents, that package exists by the time you ask.** This has a name now, **slopsquatting**, and it is the first attack in a while that is genuinely specific to how AI-built software gets made. Everything else on this site assumes the attacker is hitting your deployed app. This one targets the act of building it, and the machine you build on. ## How it works Typosquatting is decades old: register `reqeusts` and wait for someone to mistype `requests`. It relies on human error, which is rare and random. Slopsquatting relies on model error, which is neither. - An attacker prompts a model for code in some domain and records every package name it suggests. - They check which of those names are unregistered. Hallucinated names are frequently plausible and well-formed, because the model is pattern-matching real naming conventions. - They register the unclaimed ones, with whatever code they like inside. - You ask a similar question, get the same invented name, and install it. The package now exists, so nothing errors. The difference that matters: a typo is a one-off, but **a hallucination is reproducible**. Models asked similar questions invent similar names. The attacker is not waiting for a mistake, they are waiting for a behaviour they have already observed. > **Note.** This came out of a talk by Sonya Moisset of Snyk at OWASP London, who described a researcher registering a plausible-looking hallucinated package as a proof of concept and reporting roughly thirty thousand installs over three months, with no malicious code in it. I could not independently verify that figure before publishing, so treat the number as reported rather than established. The mechanism needs no statistics to be obviously workable, which is the part worth acting on. ## Why your normal defences do not see it A vulnerability scanner compares what you installed against a database of known-bad packages. A package registered last week by someone targeting model output is not in that database. It has no CVE. It is not a vulnerable version of a real library, it is a new library that is entirely the attack. Lockfiles do not help either. A lockfile faithfully records the thing you installed, including this. It guarantees you keep getting the same package, which is the opposite of what you want here. The check that does work takes about fifteen seconds and nothing automates it for you: **before you install a package a model suggested, look it up.** Does the registry page exist? How old is it? How many versions? Does it link to a repository, and does that repository have history and people in it? A package created three weeks ago with one version and no source link is not a library, whatever it is named. ## The second half: your own machine The same talk described an incident with a set of malicious npm packages that were live for about five hours. What they did on install is the interesting part. The post-install scripts went looking for AI coding CLIs that were already present, and invoked them with their **permission prompts disabled**. The flags vary by tool and are generally described as trust-all or auto-approve. Then they used that borrowed authority to inventory and exfiltrate credentials: repository tokens, registry credentials, cryptocurrency wallets. Read what that chain requires. It does not need a vulnerability in your app, or in your agent, or even meaningful privileges of its own. It needs you to have already installed a tool that can read your filesystem and run commands, and to have already told that tool to stop asking. > Your AI native IDE can be turned into malware. > > — Sonya Moisset, OWASP London That is the sentence to sit with, because the convenience that creates it is one almost everybody has opted into. Auto-approve exists because confirming every file write is tedious. The cost of removing that friction is that any code which reaches your machine inherits an agent that does not ask questions. ## What to actually do about it - **Do not run an agent with approvals disabled on your main machine.** If you want that mode, run it in a container or a VM with no credentials in it. The whole value of the permission prompt is that it is the one thing standing between arbitrary installed code and your session. - **Treat a package name from a model as a suggestion, not a fact.** Look it up before installing. - **Disable install scripts where you can.** Most packages do not need them. `npm config set ignore-scripts true` is blunt and will break a few things that genuinely compile something, but it removes the entire category of install-time execution. - **Keep credentials out of the environment your agent runs in.** If a token is in a shell your agent can read, assume the agent can be made to read it. - **Separate CI from your laptop.** Workflows triggered by outside contributions must not have access to production secrets. ## Gate the deploy, not just the review One genuinely good idea from an unexpected place. In a Replit stream about their security tooling, the single piece of advice they pushed hardest was a per-project setting called *block publishing of critical vulnerabilities*. If a critical dependency flaw is present, publishing stops. The principle generalises off their platform entirely, and it is the difference between a check and a control. A scan that reports is advice you can ignore at two in the morning. A scan that blocks the deploy is a decision made in advance by a calmer version of you. Wire your dependency audit into the step that ships, not the step that lints. > **Note.** A small operational trap from the same stream, and it is the kind of thing that only ever gets mentioned offhand: fixing a vulnerability in your code does nothing to your live application until you redeploy. People apply the fix, see the scanner go green, and leave the vulnerable build serving traffic. Check what is actually deployed, not what is in your repository. ## Write the requirements into the prompt Worth stating because this site has spent a lot of words on auditing code after the fact and almost none on generating it better in the first place. Compare “create a login function that checks an email and password against the database” with the same request that also specifies rate limiting, parameterised queries, and the authentication practices you want followed. Same feature, and the second one does not need most of the audit. Better still, put it where you do not have to remember it. Every serious coding agent reads a persistent instructions file from your repository. Security requirements belong in that file rather than in your memory: the rule that every database table gets an access policy, that entitlements never live on a user-writable row, that no secret is ever given a client-visible prefix. A rule that runs on every task beats a review you do when you remember to. You can go one step further and make the rule run a scanner after any code change and iterate until it comes back clean. That turns the audit from something you do into something that happens. ## The thing that has actually changed Every other piece of security advice here is about the gap between your app and the internet. This one is about a different gap, and it is newer. Your development environment now contains a process that reads your files, runs commands, installs dependencies, and holds your credentials, which you have possibly configured not to ask permission. That is an enormously useful thing to have and an enormously useful thing to compromise. The defences are unglamorous and mostly free. Verify a package before you install it. Leave the permission prompt on. Keep secrets out of the agent's reach. Block the deploy rather than reporting on it. None of that slows you down in any way you will notice, and all of it is cheaper than finding out which of your tokens went somewhere. --- *Originally published at https://buildingmvp.com/articles/the-package-your-ai-recommended. Free to quote with attribution.* ============================================================================== # waitUntil is not a queue, and pg_net is not one either > The three things people reach for to move work out of a web request are each missing a guarantee they are assumed to have. What the docs actually say about durability, dead letter queues, and picking a realtime transport. **Published:** 2026-10-19 · **Topic:** Architecture · **Reading time:** 9 min read **Source:** https://buildingmvp.com/articles/waituntil-is-not-a-queue **Author:** MVP Strategic Consulting (buildingmvp.com) --- **The three things people reach for to move work out of a web request on this stack are each missing a guarantee they are assumed to have.** `waitUntil` is cancelled when your function times out. `pg_net` has no retry at all. Cron can skip a run and can run twice. None of that is hidden. It is all in the documentation, stated once, in the place you look only after something has gone wrong. ## waitUntil is not a queue The pattern is everywhere: return a response immediately, then finish the slow work in `waitUntil`, or in Next.js `after()`, which is built on it. The shape is right. The belief that it buys you a longer or safer window is not. > Promises passed to waitUntil() will have the same timeout as the function itself. If the function times out, the promises will be cancelled. > > — Vercel documentation, Functions API reference One budget, shared. No retry. No durability. If the function is killed at its limit, work in flight is simply gone, and nothing records that it was supposed to happen. Supabase's equivalent, `EdgeRuntime.waitUntil`, has the same property: it keeps the instance alive but the maximum duration is still capped by the wall clock, CPU and memory limits. It buys no extra budget either. Use both for things you can afford to lose. Analytics, logging, cache warming. For anything you cannot lose, the work has to be written down somewhere before you return. ## pg_net is not a queue either On Supabase, the common homegrown pattern is a trigger or a scheduled job calling `pg_net` to fire an HTTP request at an Edge Function. Database Webhooks are the same thing with a nicer interface; the documentation describes them as a convenience wrapper around triggers using `pg_net`. Read the extension's own page and the guarantees are not what people assume: - It is **in beta**, with the docs noting function signatures may change. - The default timeout is **2000 milliseconds**, which is shorter than many Edge Functions legitimately take. - Both the request queue and response tables are `UNLOGGED`, which means they are not preserved through a crash or unclean shutdown. - Responses are kept for **six hours** by default. - It is intended to handle at most 200 requests per second, with the docs warning that exceeding that introduces instability. And the part that settles it: the page contains **no mention of retries or delivery guarantees at all**. There is no retry mechanism. A failed request is dropped, and the only record of the failure lives in a crash-non-durable table that expires within the day. So it is a fire-and-forget HTTP client that happens to live in your database. That is a useful thing. It is not a job queue, and building billing or email delivery on it means losing work silently. Supabase's own docs point at their queue product instead. > **Note.** If you do use it, the documented way to find out what you lost is to query `net._http_response` for rows where `status_code >= 400` or `error_msg` is not null. Do that on a schedule, within the six hour window, or the evidence ages out. ## Neither platform gives you a dead letter queue A dead letter queue is where a message goes after failing too many times, so one poisoned item stops blocking and starts being visible. It is item 20 on that list of 111, and on this stack you have to build it. **Vercel Queues** says so directly: there is no built-in dead letter queue, and you handle poisoned messages at the application level. The default that makes this urgent is `maxDeliveries`, which defaults to **unlimited**. Combine that with how delivery is billed and you have a slow leak that never stops: > Every delivery to a push consumer is a function invocation. If a delivery fails by timing out, it is billed for the function's full maxDuration at its configured memory. > > — Vercel documentation, Queues concepts A message that always times out therefore bills your maximum duration, at your configured memory, forever. Set `maxDeliveries`. There is also a genuinely surprising deployment trap documented on the same page: promoting or rolling back to a different deployment does not stop deliveries to the old one. A deployment that was live for a few minutes can keep processing messages for as long as the retention period, 24 hours by default. The documented remedy is to delete the deployment, not to roll back past it. **Supabase Queues**, built on pgmq, has no dead letter concept either. Its delivery claim needs reading carefully: exactly once delivery *within a customisable visibility window*. Across windows, that is at-least-once, which is the normal and correct guarantee, but it is not what the phrase sounds like. The hook for building your own is `read_ct`, which increments every time a message is read. Cap it, and move anything past the cap to an archive or a separate queue. Notably, Supabase's own flagship example implementation does not cap it, so it will retry a poison message indefinitely. One framing worth borrowing, from a talk on the subject: > This is a safety net and it's not a retry mechanism. Meaning if a message ends up in a dead letter queue, it's actually a very bad practice to put them back into the queue. > > — Software Developer Diaries, Deep dive into Dead-Letter Queues And the cost nobody budgets for, from the same talk: a dead letter queue only works if somebody looks at it. ## Picking a realtime transport Start with a correction, because the most repeated fact here is now wrong. **Vercel supports WebSockets.** It went to public beta in June 2026 and is available on all plans, requiring Fluid compute. For Next.js specifically there is still no native upgrade API, and the documented approach is described as a workaround, so expect the API to move. The constraint that does survive, and that governs the decision, is that both WebSocket and SSE connections die when the function hits its maximum duration. On Hobby that is a **five minute hard ceiling on any connection**. Reconnect handling is not polish, it is the feature. Which is what decides it: - **Polling every 30 to 60 seconds.** Unglamorous and correct more often than people admit. No long-lived connection, so the duration ceiling never applies. - **Server-Sent Events,**for anything one-directional: streaming model output, job progress, notifications. The browser reconnects automatically, which directly answers the duration ceiling. It is text only, and MDN's well-known six connection limit applies only when not using HTTP/2. - **WebSockets,** when the client genuinely sends messages mid-stream: collaboration, multiplayer, interactive sessions. You write the reconnect logic yourself, and state must live outside the function, because a new connection is not guaranteed to reach the same instance. ## If you are on Supabase, use Broadcast Supabase Realtime has two mechanisms that look interchangeable and are not. Postgres Changes listens to the database. Broadcast sends messages. The documentation is unusually direct about why that matters: > Postgres Changes authorizes every event against each subscriber, so throughput scales with the number of subscribers, not the write rate. Changes are also processed on a single thread, which means larger compute add-ons don't meaningfully increase Postgres Changes throughput. > > — Supabase documentation, Postgres Changes Throughput scaling with your audience rather than your workload is the opposite of what you want, and paying for a bigger database does not fix it. Their published benchmark has a small instance with row level security on and 3,000 clients handling five database changes per second. Billing follows the same shape: one database change seen by five subscribers counts as five messages. The free tier allows 200 concurrent connections and two million messages a month, which a busy table with a couple of hundred listeners will consume faster than you expect. Supabase's own threshold for switching is around 3,000 concurrent subscribers, but the architectural reason to prefer Broadcast applies well below that. > **Note.** A related trap for anyone reaching for Postgres primitives. `LISTEN` and `NOTIFY`are a real pub/sub mechanism, but Supabase's recommended connection mode for serverless is transaction mode through the pooler, and the docs list `listen` and `notify` among the session state that is lost between transactions. Session-level advisory locks are on that list too, which is why advisory locks in this environment must be the transaction-scoped variety. ## One thing nobody can answer Free Supabase projects pause after a period of low activity. The documentation describes the threshold as seven days, and every time it defines activity it qualifies it the same way: *user* database activity, *user* queries, a few *user* requests. The popular workaround is a scheduled job that pings your own database to keep it awake. Whether that counts is **addressed nowhere in the documentation**. The repeated word “user” points against it. It is not stated either way. Which makes it a bad thing to depend on. If your project genuinely needs to stay up, the answer is a paid plan, not a trick that rests on an undocumented interpretation. Worth knowing the restore window is now a year rather than the ninety days most community posts still quote. ## The shape that works - **Write it down before you acknowledge it.** A row in a table is durable; `waitUntil` is not. - **Cap retries explicitly,** because the default on Vercel Queues is unlimited and every failed delivery bills a full function duration. - **Build the dead letter queue yourself.** Neither platform has one. Then actually read it. - **Treat pg_net as fire and forget,** because that is what it is. Poll the response table for failures within six hours or lose them. - **Make every job safe to run twice and safe to skip.** Cron on this platform does both. - **Prefer polling, then SSE.** Reach for WebSockets when the client genuinely needs to talk back. - **Use Broadcast rather than Postgres Changes** unless you have a specific reason not to. --- *Originally published at https://buildingmvp.com/articles/waituntil-is-not-a-queue. Free to quote with attribution.* ============================================================================== # 111 things you don't know. Most of them are not your problem. > A list of everything vibe coders supposedly don't know has been going around. I sorted all 111 against a normal stack: thirty are already done for you, forty-four need scale you don't have, and thirty-seven will genuinely bite. Including one you should check tonight. **Published:** 2026-10-19 · **Topic:** Triage · **Reading time:** 11 min read **Source:** https://buildingmvp.com/articles/111-things-most-are-not-your-problem **Author:** MVP Strategic Consulting (buildingmvp.com) --- A list has been going around titled *“Who's gonna tell vibe coders about...”*, followed by 111 numbered engineering concepts. Rate limiting, Kubernetes, CAP theorem, saga pattern, clock skew, Helm charts, on down to postmortems. It is saved and shared heavily, which tells you it lands. **I went through all 111 against a normal stack, Next.js and Supabase deployed on Vercel. Thirty of them are already done for you. Forty-four do not apply until you are far bigger than you are. Thirty-seven will genuinely bite a small app.** The list is not wrong. It is unsorted, and unsorted is the thing that makes it feel like drowning rather than like a plan. ## The sorting matters more than the list There is research on where developers using AI assistance actually produce insecure code. It consistently points at one area: **access control and secrets handling**. Studies out of NYU and Stanford, and Veracode's testing, converge on roughly the same picture, including the finding that developers using assistants were measurably more confident in code that was measurably less secure. None of that research points at sharding, CAP theorem or distributed transactions. The failures are unglamorous and they cluster. Which is the case for triage over enumeration. A list of 111 items weighted equally implies the risk is spread evenly across all of them. The evidence says it is concentrated in a handful. Sorting the list is not softening it, it is pointing it at the right targets. ## Pile one: already done, roughly thirty items These are on the list, and on this stack you get them by deploying. Not as a paid upgrade, not as a setting you forgot. **The headline is item 70, JWT rotation.** It has the most intimidating name on the list and it is completely automatic. Supabase rotates refresh tokens, detects reuse of an already-spent token, and revokes the session when that happens. That is a serious piece of security engineering and you get it by calling `signInWithPassword`. Others worth naming, because people genuinely worry about them: - **DDoS protection** is on by default on every plan including free, across Vercel, Netlify and Cloudflare. Vercel publishes a P99 time to mitigation of 3.5 seconds. - **TLS** is issued and renewed for you, weeks before expiry. Nobody on this stack has let a certificate lapse since 2017. - **Autoscaling and horizontal scaling**are the platform's job. Vercel scales to tens of thousands of concurrent executions on the free plan. - **CDN, edge caching, load balancing, reverse proxies, HTTP/2 and HTTP/3** are what a deploy target is. You are not going to configure nginx. - **Encryption at rest and in transit, connection pooling, replication, rolling deployments, rollbacks and build caching** are all defaults. Thirty items you can cross off without learning anything. That is a quarter of the list, and the reason the list feels unfair. > **Note.** One caveat on this pile. It is strongest on Vercel. Next.js's own documentation notes that the Cloudflare and Netlify integrations are not verified by the Next.js team and that feature support may vary. If you are not on Vercel, verify rather than assume. ## Pile two: not at your scale, roughly forty-four items The useful thing here is that most have a documented threshold. You do not have to guess whether you have arrived. - **On-call, items 109 to 111.**Google's SRE Book: “The minimum number of engineers needed for on-call duty from a single-site team is eight.” A rotation of one is not a rotation. - **Read replicas, item 29.**Supabase's own guidance puts these after you have reached their largest compute size, 64 vCPUs and 256GB of memory. If you are on the free tier you are roughly a thousand times away from that conversation. - **Helm charts, item 106.**The prerequisites list begins “A Kubernetes cluster.” That settles items 8 and 106 together. - **CAP theorem, item 34.**Worth knowing the twist: Eric Brewer, who formulated it, later wrote that the “two of three” framing everyone teaches “was always misleading.” The version on most lists is the version its author disowned. - **Sharding, leader election, distributed transactions, the saga pattern, service discovery, chaos engineering, multi-region deployment, gRPC.** These solve problems created by having many services and many machines. You have one of each. This is not permission to be ignorant forever. It is permission to learn them when something forces you to, which is how everybody actually learned them. ## Pile three: these will bite you, roughly thirty-seven items The short version, if you read nothing else. These are small-app problems, not big-company problems, and several are things the platform explicitly tells you to handle yourself. ## The one I would fix tonight Row level security on Supabase behaves differently depending on how the table was created, and the difference is not advertised. Create a table through the dashboard and RLS is enabled for you. Create it by running SQL and it is not. The documentation is explicit that when you create a table with SQL you must enable it yourself. **An AI agent writes SQL.** It does not click through the dashboard. So the generated path is the one where the protection is off, and the table works perfectly in testing either way, because the difference only shows up when somebody who is not you queries it. Lovable's own documentation calls misconfigured row level security the single most common cause of data exposure in Supabase-backed applications. That is a vendor describing the most common way their users get hurt. Go and check which of your tables have it on. It takes two minutes and it is the highest value item on this entire page. ## Where the platform tells you to build it yourself These are the ones people miss, because the documentation says it quietly and only once. **Cron jobs, item 21.** Vercel documents cron delivery as best effort. It can miss a run. It can also invoke the same run more than once. There are no retries. Their guidance is to use both locks and idempotent reconciliation. So a nightly job that charges subscriptions or sends a digest needs to be safe to run twice and safe to skip, and nothing warns you if it is not. **Backups, item 84.**Supabase's pricing page lists backups for the free plan as not included. Not “less frequent.” Not included. The documented remedy is to run `db dump` yourself on a schedule. **Logging, item 59.** Vercel retains runtime logs on the free plan for one hour, and log drains start at Pro. You cannot debug yesterday. ## The rest of pile three, grouped Each of these has its own article, because each one took more evidence than a bullet point can carry. - **Money and limits.** Rate limiting, cost optimization, serverless limits. A public endpoint that calls a paid model with no rate limit is a billing vulnerability, not a performance one. [Why your spend cap does not stop your spend](https://buildingmvp.com/articles/nobody-wants-your-data-they-want-your-api-key). - **The database.** Indexing, query optimization, N+1 queries. Postgres does not index foreign keys for you. [Where to look when it is slow](https://buildingmvp.com/articles/your-vibe-coded-app-is-slow-here-is-where-to-look). - **Migrations and schema versioning.** Supabase has no down migration, so the only rollback is a second migration you wrote in advance. [What you can and cannot undo](https://buildingmvp.com/articles/you-can-undo-the-deploy-not-the-migration). - **Talking to other services.** Timeouts, retries, backoff, idempotency, webhooks. Your API clients already retry by default, which is a problem rather than a solution. [How that becomes a double charge](https://buildingmvp.com/articles/your-sdk-already-retries). - **Queues, cron and background work.** Dead letter queues, pub/sub, WebSockets against Server-Sent Events. [Why waitUntil is not a queue](https://buildingmvp.com/articles/waituntil-is-not-a-queue). - **Monitoring, logging and backups.** On the free tier there is no alerting, logs last an hour, and nothing is backing you up. [The thirty minute fix](https://buildingmvp.com/articles/your-logs-expire-in-an-hour). - **Correctness under concurrency.** Race conditions, idempotency, optimistic locking. Two requests arriving at once is not a scale problem. Two users is enough. - **The usual web vulnerabilities.** CORS, CSRF, SQL injection, XSS, SSRF, secrets management. This is the cluster the research says you are most likely to get wrong, which is why it deserves more of your attention than the exotic items. [Find them with the tool an attacker uses](https://buildingmvp.com/articles/press-f12-your-app-is-telling-on-itself). ## Steelmanning the list It would be easy to dismiss the whole genre as gatekeeping, and that would be wrong. The list is pointing at something real. There is a genuine gap between an app that works when you use it and an app that holds up when other people do. The research on AI-assisted code finds real, measurable security problems, and it finds that the people writing it were *more confident* than the people who were not. Confidence without the corresponding competence is exactly the failure mode a list like this is reacting to. Where I part company is the implication that all 111 are equally your problem. They are not, and the evidence on which ones matter is more specific than the list is. If the research says the failures cluster in access control and secrets, then an honest version of this list puts those at the top rather than at numbers 67 through 80, behind Kubernetes. ## What I could not verify A few notes in the interest of not doing the thing I am complaining about. I have not independently verified the engagement figures on the original post, so I have not quoted them. I also went looking for an organised backlash to this genre of content, because it would have made a tidier argument, and could not find one. There may not be a backlash. There may just be a lot of people saving the post and feeling bad. My bucket counts are a judgment call applied to one specific stack. Someone on Fly.io or a VPS would sort them differently, and more items would land in pile three. The counts are a way of making the shape of the problem visible, not a precise measurement. Two things I had wrong in an earlier draft and corrected. Vercel does support WebSockets natively, on all plans, as of October 2026, so item 22 is not the problem it used to be. And the widely circulated story of a $104,000 Netlify bill is usually told without its ending: the bill was waived, confirmed on the record by Netlify's chief executive. That forgiveness is not written into any policy, so it is not something to rely on, but the version of the story that ends in financial ruin is not what happened. ## What to actually do Four things, in order. All of them today. - **Check row level security on every table.** If you made any of them with SQL, assume it is off. - **Schedule a database dump.** Nothing is backing you up. Then restore it once so you know it works. - **Rate limit anything that costs money per call.** Especially a model endpoint without authentication. - **Make your scheduled jobs safe to run twice.** The platform documents that they sometimes do. That is four items from a list of 111. It is not that the other 107 are worthless. It is that these four are the ones that will cost you data, money or a weekend, and the other 107 can wait until something makes them urgent. --- *Originally published at https://buildingmvp.com/articles/111-things-most-are-not-your-problem. Free to quote with attribution.* ============================================================================== # Your SDK already retries. That is how you get charged twice. > The OpenAI and Anthropic clients retry twice by default and wait ten minutes before giving up, which is six times longer than your function is allowed to live. What happens at the boundary with someone else's API, in both directions. **Published:** 2026-10-19 · **Topic:** Reliability · **Reading time:** 12 min read **Source:** https://buildingmvp.com/articles/your-sdk-already-retries **Author:** MVP Strategic Consulting (buildingmvp.com) --- **If you call OpenAI or Anthropic from your app, their SDK retries failed requests twice by default, and waits ten minutes before deciding a request has failed.** You did not write that retry. It is on. That combination is three attempts of up to ten minutes each. Your Vercel function is killed at five minutes. The retry budget your SDK ships with exceeds the platform ceiling it runs on by a factor of six. This article is about what happens at the boundary between your app and somebody else's, in both directions. It is the least glamorous part of building on other people's services and the part that charges a customer twice. ## What your SDKs actually do These are defaults read from the published source on 19 October 2026, not from documentation, because several of the docs are out of date about their own behaviour. - **openai** and **@anthropic-ai/sdk**: 2 retries, 600,000ms timeout. Both retry on connection errors, 408, 409, 429 and anything 500 or above. - **Vercel AI SDK**: 2 retries, no timeout at all. - **stripe**: 2 retries, 80,000ms timeout. Its own README still says 1, which has been wrong since 2024. - **twilio**: retries off by default, 30,000ms timeout. - **resend**: no retries, no timeout. It is bare `fetch`, so both are yours to set. There is no consistency here, which is the point. You cannot reason about your app's behaviour under failure without checking each client you installed. ## Why an automatic retry is dangerous Because a timeout does not tell you the operation failed. It tells you that you stopped hearing about it. Stripe's engineering blog puts the ambiguity precisely: the call can succeed, and the connection can break before the server gets to tell you. So a retry after a timeout is a request to do the thing again, sent in ignorance of whether it has already been done. For anything that charges money or sends a message, that is a second charge or a second email. The HTTP specification is directive about this, and it is a standard rather than an opinion: > A client SHOULD NOT automatically retry a request with a non-idempotent method unless it has some means to know that the request semantics are actually idempotent, regardless of the method, or some means to detect that the original request was never applied. > > — RFC 9110, section 9.2.2 Stripe's client is the well-behaved one here. It generates idempotency keys automatically when it retries a POST, which is why most people never discover this problem through Stripe. Your own retry loop around anything else has no such protection. ## Idempotency keys, and the way people get them wrong An idempotency key tells the provider “if you have already seen this exact operation, return the original result rather than doing it again.” The mistake is generating the key inside the retry. A fresh UUID per attempt means every attempt is a new operation, which defeats the entire mechanism while appearing to use it. The key has to be a function of the business operation, so it is identical across every attempt. `await stripe.paymentIntents.create(params, { idempotencyKey: `order-charge:${orderId}` })` Retention varies and is worth knowing before you rely on it. Stripe v1 keeps keys for at least 24 hours, v2 for 30 days, Resend for 24 hours, Adyen for 7 to 14 days. Square does not publish a number. Two Stripe behaviours worth building around. Replays come back with an `Idempotent-Replayed: true` header, which is a free signal you can log to find out whether this is happening to you. And errors raised before the operation starts, including rate limits, are not cached against the key, so a 429 does not burn it. > **Note.** The IETF draft for an `Idempotency-Key`header is widely described as “the standard.” It expired and was archived without ever becoming an RFC. What exists is a set of vendor implementations that mostly agree. Check each provider rather than assuming a shared spec. ## The part almost nothing teaches Here is the failure that survives a correct-looking implementation, and it is the reason this article exists. The standard advice is to add a table of processed event IDs with a unique constraint, so a duplicate request hits the constraint and stops. That advice is correct. It is also insufficient, and nobody says so. Your unique constraint protects your database. The call to the payment provider happens outside that transaction, over a network, to a system your transaction cannot roll back. So the order of operations on a duplicate request is: charge the card again, then fail on the unique constraint. You end up with one order row and two charges, and your logs show an error that looks like the duplicate was successfully prevented. Derek Comartin states the boundary exactly: > That inbox table protects our internal state. But the moment we cross that network boundary to the payment gateway, all bets are off. We kind of went from exactly once to at least once. > > — Derek Comartin, CodeOpinion, Why External APIs Break Idempotency Brandur Leach calls the underlying thing a **foreign state mutation**: once you have pushed data into a system outside your boundary, you are committed, because you cannot roll it back and you must not lose track of it. The fixes, in the order to try them: - **Let the provider deduplicate.** An idempotency key derived from your own entity. Best option whenever it exists. - **Look it up first.** Query the provider for a charge carrying your reference before creating one. Still racy, often sufficient. - **Serialise per business key.** `SELECT ... FOR UPDATE` on the order row so only one attempt is in flight for that order. - **Reconcile anyway.**A job that compares your records against the provider's. Shopify runs exactly this and tracks the mismatches as a named anomaly. And the framing to take away, from the same talk: > I don't think the goal is exactly once. A better goal is building a system and designing it that's effectively once. > > — Derek Comartin, CodeOpinion ## The other direction: your webhook endpoint A webhook route is a public, unauthenticated POST endpoint that changes your billing state. Stripe also tells you to exempt it from CSRF protection, which means the signature check is not one layer of defence. It is the only authentication on that route. > Without verification, an attacker could send fake webhook events to your endpoint to trigger actions like fulfilling orders, granting account access, or modifying records. > > — Stripe documentation, Webhooks Four ways this breaks specifically in Next.js: - **Parsed body.** Verification runs over the exact bytes received. Use `await request.text()` in the App Router and read it once, then parse from that string. - **Middleware.** A matcher that catches your webhook path can consume or alter the body first. Exclude it. - **Wrong function on edge.** `constructEvent` is synchronous and fails on Web Crypto runtimes. Use `await stripe.webhooks.constructEventAsync(...)`. - **Scheme downgrade.** Stripe sends a fake `v0` signature for test events. Ignore any scheme that is not `v1`. Replay protection is not universal, which surprises people. Stripe and Svix sign a timestamp and enforce a five minute tolerance. **GitHub, Shopify and Twilio sign only the body**, with no timestamp in the scheme at all, so a captured request stays valid indefinitely. ## Your handler is slower than its deadline Providers give you a response deadline far shorter than most people assume, and exceeding it is counted as a failure: - **Slack: 3 seconds.** Disabled entirely if more than 95% fail in an hour. - **Shopify: 5 seconds.** Eight retries over four hours, then your subscription is removed. - **GitHub: 10 seconds, and no retries at all.** - **Twilio: 15 second read timeout**, one retry by default. - **Svix and Resend: 30 seconds.** Eight retries over about ten hours. GitHub is the one that inverts the risk. Everywhere else a slow handler causes duplicate work. On GitHub it causes **permanent event loss**, because nothing is coming back. One more trap: a redirect counts as a failure. Stripe says so explicitly. If your webhook path picks up a trailing-slash or `www` redirect, deliveries fail silently while your route looks healthy. ## The fix that is wrong on Vercel The standard advice is to return 200 immediately and finish the work afterwards. The shape is right. The usual implementation on Vercel is not. Doing the work in `waitUntil`, or in Next.js `after()`which is built on it, does not buy you a longer window. From Vercel's own reference: promises passed to `waitUntil()` have the same timeout as the function, and if the function times out the promises are cancelled. So it shares one budget, has no retry, and has no durability. It is correct for logging and cache warming. It is wrong for “acknowledge, then do the real work,” which is exactly what everyone reaches for it to do. The shape that actually works is to make the acknowledgement durable before returning: - Verify the signature. Reject immediately if it fails. - Insert the event into a table keyed by the *provider's* event ID. If that hits a unique violation, you have seen it before: return 200 and stop. - Hand the ID to a queue, or leave the row for a worker to pick up. - Return 200. Deduplicate on the provider's ID, not yours: `event.id` for Stripe, `X-GitHub-Delivery`, `X-Shopify-Webhook-Id`, `svix-id`. And do not sort by the event timestamp. Stripe records `created` in whole seconds, so distinct events share one, and the documentation tells you directly to track IDs rather than using the timestamp to detect duplicates. > **Note.** Scheduled jobs have the same property and it is easy to miss. Vercel documents cron delivery as best effort, including occasionally invoking the same run twice. Their own illustration is the clearest version of the rule. Safe: “set user status to active.” Unsafe: “increment user credit by 10,” because running twice doubles the credit. ## Retries multiply down a stack Worth knowing even though it mostly bites larger systems, because the arithmetic is unintuitive. From Google's SRE Book: if four layers each retry three times, one user action becomes 4³, that is **64 attempts**on the database. AWS's version with five layers reaches 243 times the load. At solo scale the realistic version is smaller and still real: the AI SDK's two built-in retries inside your own retry loop is up to nine calls per user action, on a metered API. Jitter is the standard mitigation, and the canonical source is Marc Brooker's AWS post. His later correction is the more useful half: backoff helps in the short term, but is only valuable long term if it reduces total work. A million users pressing refresh do not benefit from each other's backoff. His summary is worth keeping: *backoff is not a substitute for a good retry policy*. Bound the number of attempts and stop. ## Skip circuit breakers A circuit breaker trips after a threshold of failures and fails fast instead of calling the dependency. It is on every systems-design list. A solo builder should not build one, and the evidence for that is unusually strong because it comes from the people who popularised it. - **Netflix retired Hystrix**, the canonical implementation. It is in maintenance mode, and the stated reason is a move toward adaptive approaches rather than pre-configured thresholds, which is precisely the model every tutorial teaches. - **AWS cautions against them by name**, saying breakers introduce modal behaviour that is difficult to test and can add significant time to recovery, and that they limit retries with a token bucket instead. - **They can make things worse.**Marc Brooker's objection is structural: circuit breakers are designed to turn partial failures into complete ones. - **It is a code path that never runs.**AWS's writing on fallback logic makes the decisive point for small apps: this code may not execute for years, and then executes for the first time during an incident. Their worked example turned a partial outage into a full site outage. Do the four cheaper things instead. Set timeouts. Bound retries. Add jitter to anything periodic. Make operations idempotent, which is what makes every other mechanism safe. ## What I could not establish I wanted to claim this cluster is the most likely source of money-losing bugs in small apps. There is no ranking data for that, so the honest version is weaker: it is a category that reliably produces money-losing bugs, and the mechanisms are documented by the vendors themselves. I also wanted to say this is absent from AI-generated code. No study, benchmark or audit supports that, so it is not in this article either. What is checkable is the teaching gap. The two most-watched webhook tutorials on YouTube have **460,737 views between them**. Searching their transcripts for signature, HMAC, verification, duplicate, replay or idempotency returns **nothing relevant in either**. The longer of the two runs two and a half hours. If this material feels unfamiliar, that is not a gap in you. A few things that circulate as fact and did not survive checking. The AWS jitter post is frequently cited for a results table comparing strategies, and that post contains no tables, only graphs. Slack's well-known “Very Bad Day” postmortem is cited constantly as a retry-storm incident, and it does not mention retries at all. And “Node's fetch has no timeout” is imprecise: it has 300 second inactivity timeouts but no total deadline, so a server trickling one byte every few minutes holds your connection open indefinitely. ## The checklist - **Look up the retry and timeout defaults** for every API client you installed. You have behaviour you did not choose. - **Set a timeout below your function's limit**, and a retry count you actually picked. - **Use an idempotency key derived from the operation**, never generated inside the retry. - **Remember your unique constraint does not protect the remote call.** Reconcile. - **Verify webhook signatures over the raw body**, before doing anything else. - **Persist the event, then return 200.** Not `waitUntil`. - **Deduplicate on the provider's event ID**, in the database, never in memory. - **Make scheduled jobs safe to run twice.** --- *Originally published at https://buildingmvp.com/articles/your-sdk-already-retries. Free to quote with attribution.* ============================================================================== # Your logs expire in an hour and your database has no backup > On the default free tiers of Vercel and Supabase there is no alerting, runtime logs are deleted after sixty minutes, and nothing is backing up your data. The thirty minute fix, and the four things built for teams of eight that you can skip. **Published:** 2026-10-19 · **Topic:** Operations · **Reading time:** 9 min read **Source:** https://buildingmvp.com/articles/your-logs-expire-in-an-hour **Author:** MVP Strategic Consulting (buildingmvp.com) --- **On the default free tiers of Vercel and Supabase, your runtime logs are deleted after one hour, you cannot configure an alert at all, and your database is not backed up.** All three of those are in the vendors' own documentation. None of them is a bug. Which means that if your app breaks tonight, nothing will tell you, and by tomorrow morning the evidence will be gone. A user emailing you on Tuesday about a Monday problem is describing an event for which no record exists. The fix is about thirty minutes of work and costs nothing. Most of the rest of what gets called observability is built for teams of eight or more, and you can skip it. This is how to tell the two apart. ## The three defaults, verbatim **Logs.** Vercel publishes a retention table for runtime logs. Hobby is **one hour**. Pro is one day. Thirty days requires Observability Plus, which is a paid add-on on top of a paid plan. Supabase log retention is one day on Free and seven days on Pro. **Alerts.**From Vercel's documentation: “Alerts are available on Enterprise and Pro plans with Observability Plus.” There is no alerting on Hobby. You also cannot build your own with a scheduled function, because Hobby cron jobs have a minimum interval of once per day and run within an hour of the requested time. **Backups.**Supabase's pricing page lists backup frequency and retention for the Free plan as “Not included.” The documentation is consistent: “We automatically back up all Pro, Team, and Enterprise Plan projects on a daily basis.” Free-plan users are told to export their own data with the CLI. Elsewhere: “Database backups are not available for download for Free Plan projects.” One more worth knowing, because it produces an outage that looks like a bug: “We may pause applications on the Free Plan that exhibit low activity in a 7-day period.” > **Note.** Plan limits move quickly. Every figure here was checked on 19 October 2026. Vercel enabled Observability Plus by default for Pro teams created on or after 3 April 2026, which gives you a sense of the pace. Check your own plan before relying on any of it. ## The asymmetry that tells you what to do first Sentry's free tier retains errors for **thirty days**. Vercel Hobby retains logs for **one hour**. The free error tracker remembers your failures roughly seven hundred times longer than your hosting platform does. That single comparison settles the order of work. Install the error tracker first. It is the only component on this list that is simultaneously free, thirty seconds of setup, and the thing that actually catches the problem. Sentry's free Developer tier, at time of writing, covers 5,000 errors per month with thirty day retention, one user and email alerts. For a solo project that is not a trial, it is the whole product. `npx @sentry/wizard@latest -i nextjs` That writes the client, server and edge configs, wraps your Next config, adds a global error boundary and sets up source map upload. If you would rather not add a vendor at all, Next.js 15 added an `onRequestError` hook in `instrumentation.ts` that hands you the error plus the route that produced it, and you can post that wherever you like. ## Then one thing outside your app An error tracker catches exceptions your code throws. It does not catch your app being entirely down, because a dead app throws nothing. For that you need something that is not your app, checking from outside. Write a `/api/health`route that does real work rather than returning 200 immediately. Google's SRE Workbook recommends exactly this, a “health-checking handler that exercises more functionality of the system.” Query one row. Touch the thing that actually breaks. Then point a free external monitor at it. Checked on 19 October 2026: - **UptimeRobot** free gives 50 monitors at five minute intervals, but **email alerts only**. No webhooks on the free plan, whatever the comparison posts tell you. - **Better Stack** free gives 10 monitors with **Slack as well as email**, which is the meaningful difference if you do not read email promptly. That is the whole monitoring stack: one error tracker, one health route, one external pinger. Everything after this point is a judgment call about whether you have outgrown it. ## “Check the logs” is advice with an expiry date The most common debugging instruction on the internet assumes logs exist when you go looking. On Hobby they do not, sixty minutes later. So treat the log tier as a live view rather than a record. While it is there, make it searchable by writing structured JSON rather than string concatenation, which lets you filter on your own fields in the dashboard. One trap from Vercel's own guide: the dashboard's error filter reads which console method you called, not the `level` field inside your JSON. A JSON log that says `"level":"error"` emitted through `console.log` will not show up when you filter for errors. Anything you will want next week belongs in the error tracker as context, not in a log line. And when you do query logs, hold on to this line from Supabase's documentation, which is the most useful sentence about logging I found anywhere: > No rows means no matching recorded events in that window; check the source, filters, and retention before concluding that there were no errors. > > — Supabase documentation, Advanced log filtering ## What to measure, from the people who wrote the book Google's SRE Book is free online and is the primary source for most of this vocabulary. Its answer to what to watch is four things: > The four golden signals of monitoring are latency, traffic, errors, and saturation. > > — Google SRE Book, Monitoring Distributed Systems Its advice on how much to build is, from the same chapter: > Therefore, design your monitoring system with an eye toward simplicity. > > — Google SRE Book, Monitoring Distributed Systems And the rule that keeps an alert channel usable, which matters more when the person being alerted is also the entire company: “Every page should be actionable.” An alert you have learned to ignore is worse than no alert, because it costs you attention and returns nothing. ## What you can genuinely skip **Distributed tracing.**Tracing answers “which of my forty services is slow.” A Next.js app talking to Supabase has two hops. You will find the slow query faster by reading one query plan than by propagating trace context. Skip it until you have services, plural. **On-call.**The SRE Book is unusually specific here: “The minimum number of engineers needed for on-call duty from a single-site team is eight.” It also budgets no more than 25% of an engineer's time for on-call and caps incidents at two per twelve hour shift. You are off by a factor of eight before the chapter starts. The part that survives is smaller and still worth doing: decide in advance what is allowed to wake you, and make sure exactly one thing can. **SLOs and error budgets.** This is the one people feel guiltiest about skipping, so it is worth being precise about why they do not apply. Read what an error budget actually is: > Product Management defines an SLO. The actual uptime is measured by a neutral third party: our monitoring system. The difference between these two numbers is the budget. > > — Google SRE Book, Embracing Risk An error budget is a negotiating instrument. It exists to arbitrate between a product org that wants features and an ops org that wants stability, using a neutral third party to keep both honest. You are both parties and there is no third one. Its enforcement move, freeze releases until the budget refills, is something you would be doing to yourself, which makes it a decision rather than a policy. Likewise an SLA, which the same book defines as a contract with consequences. You have no such contract. Three things from that chapter do survive at any size, and they are the useful residue. - **“100% is probably never the right reliability target: not only is it impossible to achieve, it's typically more reliability than a service's users want or notice.”** This is permission to stop, from the strictest possible source. - **Pick very few indicators.**“Choosing too many indicators makes it hard to pay the right level of attention to the indicators that matter.” The Workbook puts a number on it: five or fewer. - **Your first attempt does not have to be right.**“The most important goal is to get something in place and measured, and to set up a feedback loop so you can improve.” And: “For your first SLIs, choose something that requires a minimum of engineering work.” ## A measurement that does fit one person If you want a number to track, the DORA research programme defines two that you can count from your own deploy history with no monitoring infrastructure at all. **Change fail rate** is the percentage of deployments that cause a failure requiring a hotfix or rollback. **Failed deployment recovery time** is how long it takes you to recover from one. Both are things you already know and are not writing down. Writing them down for a month tells you whether your problem is that you ship carelessly or that you cannot recover quickly, and those have different fixes. > **Note.** If you go looking at the published DORA benchmark clusters, one oddity will catch your eye: in the 2024 report, the High-performing cluster has a worse change fail rate than the Medium cluster. That is genuinely what the report prints. The clusters are defined by combinations of throughput and stability rather than a single ranking, and the report itself discusses change failure rate as an outlier it could not combine with the other measures. It is not a typo, and anyone quoting that table without the caveat has not read it. ## Where I stopped being able to prove things I wanted to open this with a statistic, something like “most solo developers find out their app is broken because a user tells them.” It is repeated constantly. I could not find a single survey, study or dataset behind it, so it is not in this article. What replaced it is better, because it is a claim about products rather than about people. On the default free configuration of this stack there is no alerting, the logs are gone within the hour, and there is no backup. Under those conditions a user telling you is not the most likely discovery channel. It is the only one that exists. You can verify every part of that from the pricing pages. There is also a nice piece of corroboration in the SRE Book, which lists the circumstances that should trigger a postmortem at Google. One of them is: > A monitoring failure (which usually implies manual incident discovery). > > — Google SRE Book, Postmortem Culture At Google, a human noticing before the system did is itself classified as a failure worth writing up. That is the situation the free tier ships you in by default. ## The thirty minute version - **Install Sentry.** One command. It remembers your errors for thirty days, which is longer than anything else you have. - **Write a health route that touches the database** rather than returning 200 unconditionally. - **Point one free external monitor at it** and send the alert somewhere you actually look. - **Schedule a database dump**, because nothing else is doing it. `supabase db dump` for schema and `--data-only` for data. Run it from a scheduled job somewhere that permits more than one run a day. - **Restore that dump once, deliberately,** into a throwaway project. An untested backup is a belief, not a backup. - **Skip tracing, SLOs, error budgets and on-call** until there is more than one of you. None of that is sophisticated. It is simply the difference between finding out on Monday and finding out in March. --- *Originally published at https://buildingmvp.com/articles/your-logs-expire-in-an-hour. Free to quote with attribution.* ============================================================================== # You can undo the deploy. You cannot undo the migration. > Rolling back code on Vercel is instant and free on every plan. Supabase has no down migration at all. That asymmetry should decide where you spend your caution, and it is the opposite of how most deployment advice is written. **Published:** 2026-10-19 · **Topic:** Operations · **Reading time:** 10 min read **Source:** https://buildingmvp.com/articles/you-can-undo-the-deploy-not-the-migration **Author:** MVP Strategic Consulting (buildingmvp.com) --- **Rolling back a bad deploy on Vercel takes seconds, works on every plan including the free one, and is described in the documentation as instantaneous. There is no equivalent for your database.** That asymmetry should decide where you spend your caution. Shipping code is cheap to undo, so ship often and stop agonising over it. Changing a table is not undoable at all on this stack, so that is the thing to slow down for. Most advice about deployment safety has the emphasis backwards for a small app. ## What instant rollback actually does It reverts the code. That is genuinely valuable and genuinely instant. But read the caveats in Vercel's own documentation, because each one is a way to roll back and still be broken: - **Environment variables do not revert.** If you changed one in project settings, the rolled back build gets the new value. - **Cron jobs revert to the old deployment's state**, which may not be what you expect. - **Automatic production domain assignment is switched off afterwards.** New pushes to your production branch stop replacing the rolled back deployment until you turn it back on. People lose an hour to this wondering why their fix is not going live. - **Your database does not move.** Vercel lists this as a reminder about external APIs and databases. It is the whole problem. So the deploy is reversible and the schema change that shipped with it is not. Which brings us to the part worth being careful about. ## Supabase does not have down migrations This surprises people coming from Rails or Django, where every migration has an inverse. On Supabase the inverse does not exist, and the documentation never quite says so in one sentence, so it is worth showing the pieces. `supabase migration down` is not an inverse. It is documented as resetting applied migrations up to the last *n* versions, and its own confirmation prompt warns that you will lose all data in the database. It drops and replays rather than stepping backwards. `supabase migration repair` updates the tracking table only. It does not apply or revert any SQL. It fixes bookkeeping, not schema. The Management API endpoint that sounds like a rollback removes rows from the migration history table, not changes from your schema. And when the documentation addresses rolling back directly, in the branching troubleshooting guide, the answer is to delete the preview branch and reopen it, with the note that any data changes on the old branch are lost. **So the only production rollback on Supabase is a second migration that undoes the first one. Write that before you push anything risky**, while you still remember what the previous state was. > **Note.** To be precise about sourcing: there is no Supabase sentence that says “down migrations are not supported.” That conclusion comes from four separate documented behaviours pointing the same way, plus the fact that the docs prescribe a different remedy when asked the question. If you find an official contradiction, trust it over me. ## The golden rule, which the docs state in bold > The golden rule: never change the remote database directly. Once you're using migrations, all schema changes, even small ones, should go through migration files. Using the Dashboard's SQL editor or Table Editor on your remote database bypasses the migration history, and db push will start failing with sync errors. > > — Supabase documentation, Database Migrations This is the most commonly broken rule on the platform, because the dashboard is right there and adding a column takes four seconds. The cost arrives later, when local and production have quietly diverged and your next deploy fails. The documented recovery is `supabase migration list` to see the divergence, then `supabase db pull` to capture the current remote schema into a new migration file, then commit it. ## The migration that takes your whole app down A schema change can lock the table. Most people know that. What they usually do not know is which lock, and what it conflicts with. From the PostgreSQL documentation on ALTER TABLE, the sentence that matters: > Note that the lock level required may differ for each subform. An ACCESS EXCLUSIVE lock is acquired unless explicitly noted. > > — PostgreSQL documentation, ALTER TABLE And `ACCESS EXCLUSIVE` conflicts with everything, including plain reads. A `SELECT` takes an `ACCESS SHARE` lock, and the only thing `ACCESS SHARE` conflicts with is `ACCESS EXCLUSIVE`. So a routine `ALTER TABLE` is not a write freeze. It is a total blackout on that table. Two more pieces of mechanism. Locks are held until the end of the transaction, not until the statement finishes, so several `ALTER TABLE`s in one migration file hold every lock until the last one commits. And a transaction waiting for a lock waits indefinitely by default. Put those together and you get the failure mode that catches people out: a slow migration does not merely block, it forms a **queue**. The migration waits behind whatever long query is already running, and every ordinary read that arrives afterwards queues behind the migration. Your app goes down while the migration has not even started. > **Note.** Sourcing caveat worth stating plainly. The individual mechanics above are all in the official PostgreSQL documentation. The specific claim that a queued, not yet granted lock blocks the readers behind it is not, and I could only find it stated in vendor engineering writing, most clearly by Marco Slot at Citus Data and in GitLab's migration style guide. Both include reproducible demonstrations. Treat it as well attested rather than officially documented. The mitigation is `lock_timeout`, which aborts a statement that waits too long for a lock without affecting statements that are actually running. Set it low enough that a stuck migration fails fast instead of parking at the head of the queue. ## A conflict in the advice worth knowing about Supabase's migrations guide suggests that if you hit a lock timeout error, you should consider **increasing** your `lock_timeout` setting. That is the opposite of the consensus among people running Postgres at scale. GitLab's handbook and the `strong_migrations` project both argue for a **short** lock timeout, precisely so a migration that cannot get its lock quickly gives up rather than blocking everything behind it. Both positions are defensible, because they optimise for different things. Supabase is optimising for your migration completing. GitLab is optimising for the application staying up. But they point in opposite directions, and a solo developer following only the Supabase note will take the riskier of the two paths without realising a choice was made. My view: lower it. A failed migration is an inconvenience you retry in a quieter minute. A locked table is an outage. ## Building an index without the outage The specific case you will hit first, because the fix for a slow query is usually an index. A plain `CREATE INDEX` locks the table against writes for the whole build: > Normally PostgreSQL locks the table to be indexed against writes and performs the entire index build with a single scan of the table. This could have a severe effect if the system is a live production database. > > — PostgreSQL documentation, CREATE INDEX `CREATE INDEX CONCURRENTLY` avoids that, at the cost of two table scans and more total time. Two things to know before you use it. It cannot run inside a transaction block. And if it fails partway it leaves behind an invalid index that is ignored for queries but still costs you on every write, which you fix by dropping it and trying again. On Supabase specifically, the answer to “can I put `CONCURRENTLY`in a migration file” is annoyingly conditional. Under `db push` it works, because the CLI detects statements that cannot be pipelined and runs them standalone. Under Supabase Branching it fails, and that one is documented explicitly: branching runs each migration file inside a single transaction, so a migration using `create index concurrently` applies with `db push` but fails when branching deploys it. Any confident yes or no answer you read on this is wrong. ## The honest answer on zero downtime migrations There is a real technique here, the expand and contract pattern: add the new column, write to both, backfill, switch reads, drop the old one. Several deploys, no single breaking moment. It works and it is what large teams do. It is also usually the wrong trade for a small app. Web Dev Cody puts the alternative plainly: > I would say though if you have the flexibility to just turn off your system for like 30 minutes, run the migration and turn it back on, it'll be a lot easier than having to orchestrate this multi-step deployment. > > — Web Dev Cody, How do software projects achieve zero downtime database migrations? A maintenance page at 3am on a Tuesday costs you almost nothing and removes an entire category of risk. The multi-step dance costs you several deploys and a window in which your code must handle both schemas correctly. Pick the cheap one until you have users who would notice. > **Note.** One widely repeated warning you can stop worrying about. “Adding a column with a default rewrites the whole table” has been false since PostgreSQL 11 for constant defaults, which is what you almost always have. The release notes are explicit that no rewrite is required. It is still true for volatile defaults like `gen_random_uuid()`. Supabase runs Postgres 15 and 17, so the optimisation always applies there. ## Canary releases do not work at your traffic Blue-green deployment and canary releases are real techniques with precise definitions. A canary sends the new version to a small subset of users first, watches, then widens. The problem at small scale is statistical, and Vercel says so in its own documentation for the feature: randomised assignment based on hashing may not achieve the desired rate, especially when the number of sessions is small, and a single high traffic user landing in one bucket can skew the split. A canary at fifty daily users is not an experiment, it is a coin flip. It is also a paid feature that Vercel recommends pairing with another paid feature. The free version of the same risk reduction is the one you already have: deploy, watch, roll back instantly if it is wrong. ## Feature flags, for the right reason Flags are worth it for one person, but not for the reason they are usually sold. You are not doing gradual rollouts. You want a **kill switch that does not require a build**. The difference matters when something is actively going wrong. Changing code means editing, pushing, waiting for a build. A flag is a toggle. For anything that touches money, sends messages to real people, or calls a paid API, that gap is the reason to bother. The cost is real too, and the best statement of it is Pete Hodgson's: > Savvy teams view their Feature Toggles as inventory which comes with a carrying cost, and work to keep that inventory as low as possible. > > — Pete Hodgson, Feature Toggles, martinfowler.com Which gives you the discipline: a short-lived flag can be a plain `if` statement, and Hodgson says so explicitly. Delete it when the feature is settled. Keep the long-lived ones only where you genuinely want an off switch. ## The one person postmortem Blameless postmortems solve a problem you do not have, which is people hiding information to avoid being punished. Alone, there is nobody to blame. But the underlying bias survives perfectly well, and John Allspaw's framing of it is the best thing I have read on the subject: > What you look for is what you find. What you call root cause is simply the place where you stop looking. There are contributors, not causes, because there is no root single cause. > > — John Allspaw, Outages, Post Mortems, and Human Error 101, Etsy, 2014 And on where an investigation should begin rather than end: > Human error is not the place where you stop. Human error is the place where you start, and that's where you start asking questions. > > — John Allspaw, Outages, Post Mortems, and Human Error 101, Etsy, 2014 “I should have known better” is the solo developer's version of blame. It feels like accountability and produces nothing, because it names no change. Allspaw's replacement question is the entire one person practice: **why did it make sense at the time?** Answer that honestly and the fix is usually obvious, and it is usually a system change rather than a resolution to be more careful. Five lines in a file in the repo is enough: - What users actually experienced, and for how long. - What happened, in order. - Why it made sense at the time. - What would have told me sooner. - One change, with a date. The last one carries the weight. From the SRE Workbook: “To our users, a postmortem without subsequent action is indistinguishable from no postmortem.” ## What this adds up to - **Deploy freely.** Rollback is instant and free. Know that it does not revert env vars, cron state or your database, and that it switches off auto-assignment of your production domain. - **Never touch the production database by hand.** It breaks your next deploy, not this one. - **Write the undo migration before you push the risky one.** There is no other rollback. - **Set a short lock timeout** so a stuck migration fails instead of queueing your app behind it. - **Use CONCURRENTLY for indexes on live tables**, and know it breaks under branching. - **Take the maintenance window.** Thirty minutes of downtime beats a four-deploy dance you have never rehearsed. - **Skip canary releases** until the split would mean something. - **Flag anything that spends money**, and delete the flag afterwards. --- *Originally published at https://buildingmvp.com/articles/you-can-undo-the-deploy-not-the-migration. Free to quote with attribution.* ============================================================================== # Your vibe coded app is slow. Here is where to look. > Read this one if it is slow right now. The index Postgres never created, the policy that runs once per row, the missing foreign key that forces a loop, and the one cause on every checklist that is not actually your problem. **Published:** 2026-10-19 · **Topic:** Performance · **Reading time:** 11 min read **Source:** https://buildingmvp.com/articles/your-vibe-coded-app-is-slow-here-is-where-to-look **Author:** MVP Strategic Consulting (buildingmvp.com) --- **A slow vibe coded app is almost never slow for a mysterious reason. It is slow because the database is reading rows it did not need to read, or because the browser is doing work it did not need to do.** Both are findable in an afternoon, with tools you already have installed. The order matters. Measure first, because the two halves have completely different fixes and guessing wrong costs you a day. Then work the database, because that is where the largest single wins are. Then work the browser, because that is where the most consistent ones are. One warning up front. Of the three causes people usually name, one of them is mostly not a real problem on modern hosting, and chasing it wastes time. I will get to that. ## First, find out which half is slow Open the Network tab and reload. Look at the first request, the HTML document itself, and read its `Waiting for server response` time. That number is your server and your database. Everything after it is your browser. If the document takes 1.8 seconds to come back, no amount of image optimisation will help you. If the document comes back in 90ms and the page still feels slow, your database is fine and you have a JavaScript problem. Nearly every wasted optimisation session starts by skipping this step. Google's thresholds for the three Core Web Vitals, measured at the 75th percentile of real visits, are 2.5s for Largest Contentful Paint, 200ms for Interaction to Next Paint, and 0.1 for Cumulative Layout Shift. Server response under 0.8s is the supporting target. Those are the numbers worth holding yourself to. ## The index your database did not create for you Postgres creates an index for a primary key automatically. It does not create one for a foreign key. This is the single highest yield check on a generated schema, and it is documented plainly: > Since a DELETE of a row from the referenced table or an UPDATE of a referenced column will require a scan of the referencing table for rows matching the old value, it is often a good idea to index the referencing columns too. Because this is not always needed, and there are many choices available on how to index, the declaration of a foreign key constraint does not automatically create an index on the referencing columns. > > — PostgreSQL documentation, Constraints Read that against your own schema. Every `user_id`, `org_id`, `project_id` and `post_id` column is a foreign key. Every one of them is in a `where` clause on a hot path. None of them is indexed unless somebody wrote the index by hand. Without one, the query does exactly what you would expect: > With no advance preparation, the system would have to scan the entire table, row by row, to find all matching entries. If there are many rows and only a few rows that would be returned by such a query, this is clearly an inefficient method. > > — PostgreSQL documentation, Indexes On Supabase this has a name and a dashboard. Open the Performance Advisor and look for `unindexed_foreign_keys`. If you would rather see it in SQL, this finds every foreign key column with no index on it: `select conrelid::regclass as table_name, a.attname as fk_column from pg_constraint c join pg_attribute a on a.attrelid = c.conrelid and a.attnum = any(c.conkey) where c.contype = 'f' and not exists (select 1 from pg_index i where i.indrelid = c.conrelid and a.attnum = any(i.indkey));` ## Two reasons your index test will lie to you **Your test table is too small.** Postgres chooses a sequential scan when it is genuinely cheaper, and on a few hundred rows it always is: > It is especially fatal to use very small test data sets. While selecting 1000 out of 100000 rows could be a candidate for an index, selecting 1 out of 100 rows will hardly be, because the 100 rows probably fit within a single disk page, and there is no plan that can beat sequentially fetching 1 disk page. > > — PostgreSQL documentation, Examining Index Usage **You never ran ANALYZE.**The planner decides using statistics, and a table that was bulk loaded by a seed script has none. From the same page: “Examining an application's index usage without having run ANALYZE is therefore a lost cause.” There is a real cost on the other side, so do not index everything. Indexes have to be kept in sync on every write. The lever you actually want is removing indexes nothing reads, not having fewer indexes. `select relname, indexrelname, idx_scan from pg_stat_user_indexes where idx_scan = 0;` lists the ones costing you writes and returning nothing. ## If you are on Supabase, check this before anything else Every AI tool writes row level security policies the same way, and it is the slow form. A policy of `using (auth.uid() = user_id)` calls `auth.uid()` once per row. Wrapping the call in a subselect, `using ((select auth.uid()) = user_id)`, changes the plan rather than the logic: > Wrapping the function causes an initPlan to be run by the Postgres optimizer, which allows it to cache the results per-statement, rather than calling the function on each row. > > — Supabase documentation, Row Level Security Same result, same security, one evaluation instead of a million. Supabase lints for it as `auth_rls_initplan`, at warning level. Two other things from the same guidance are worth doing in the same sitting: index the column your policy filters on, and add the filter to your client query too rather than leaning on the policy to do it. Supabase is blunt that leaning on it is the mistake: “Policies are implicit where clauses, so it's common to run select statements without any filters. That's a bad pattern for performance.” > **Note.** Supabase publishes a benchmark for these fixes showing changes like 171ms to under 0.1ms, and one cross-table case going from 178 seconds to 12ms. Treat the shape as real and the magnitudes as indicative. The stated methodology is only “selects on a 100K row table,” the compute size is never given, and the figures are single EXPLAIN ANALYZE runs rather than repeated measurements. It was contributed by a community member and adopted into the docs. Supabase's own materials quote the speedup variously as 5 to 10 times, 100 times, and several thousand times, which tells you the number depends entirely on your data. Measure your own. One honest limit, in their words: the subselect trick only works “if the results of the query or function do not change based on the row data.” A policy that genuinely depends on each row cannot be hoisted. ## One query per row This is the classic, and it is real. Prisma defines it precisely: “The n+1 problem occurs when looping through query results and performing one additional query per result.” Fetch 50 posts, loop over them to get each author, and you have made 51 round trips where 2 would do. What is more interesting is *why* it happens on Supabase specifically, because it is a chain you can break at the start. PostgREST, the layer behind the Supabase client, can fetch related rows in one request. Supabase describes the result as resolving “all requests to a single SQL statement.” So `select('*, author(*)')`is one query, not fifty one. But PostgREST documents the precondition: “The server uses Foreign Keys to determine which database objects can be joined together.” Now look at a generated schema. If the table was created with a bare `user_id uuid` and no `references`clause, there is no foreign key. The embed fails with “Could not find a relationship,” the developer sees an error, and the obvious way out is a loop. The missing constraint causes the N+1. So declaring the foreign key fixes two things at once. It makes the single query possible, and it is the column you were going to index anyway. ## Compression is not your problem Here is the one worth unlearning. “Uncompressed assets” is a standard item on every performance checklist, and on modern hosting it is close to a non issue, because you cannot turn it off: - **Netlify**has applied Brotli automatically since 2020, with “no additional config required or possible.” - **Cloudflare** states that content is compressed by default, across more than forty content types including web fonts. - **Vercel** applies gzip and Brotli automatically to text content. Vercel also explains why images are excluded, and it is the part people miss: “most image formats are already compressed such as JPEG, PNG, WebP.” Running gzip over a JPEG achieves nothing. There is no compression win available on your images, because it has already been taken. If a Lighthouse run still tells you to enable text compression on one of those three hosts, that is unusual and worth investigating rather than fixing blindly. What people are actually seeing when they blame compression is two different problems, and both are about quantity rather than encoding. ## Problem one: the image is too big, or discovered too late This matters more than it sounds, because on most pages the image *is* the metric. In the 2025 HTTP Archive crawl of roughly 16.2 million sites, the Largest Contentful Paint element was an image on 76.0% of mobile pages and 85.3% of desktop pages. Median image weight was 911KB on mobile, the largest resource category on the page. There are three separate failures here and they need different fixes: - **Weight.** A 2400px image in a 400px slot. Costs you load time. - **Discovery.** The browser finds the image late, so the download starts late. Costs you more, usually. - **No reserved space.** Content jumps when the image lands. Costs you layout shift. Two specific things to check, both of which generated code gets wrong routinely. **Never lazy load the image at the top of the page.**Google states it without hedging: “Never lazy-load your LCP image, as that will always lead to unnecessary resource load delay, and will have a negative impact on LCP.” The mechanism is the part that surprises people: the browser cannot lazy load an image until it knows where that image will sit, which means it has to wait for your stylesheet. You have put CSS in front of your hero image. Note that `next/image` defaults to lazy loading, so this is the default behaviour rather than a mistake someone made. **A `fill` image without a `sizes` attribute downloads a full width image every time.** From the Next.js documentation: “If sizes is missing, the browser assumes the image will be as wide as the viewport. This can cause unnecessarily large images to be downloaded.” Grep your codebase for `fill` and check each one. > **Note.** A related trap. Lighthouse's Next.js advice still tells you to set `priority` on your LCP image and links a documentation page that predates the App Router. That prop is deprecated in Next 16, which now points you at `loading="eager"` or `fetchPriority="high"` instead. Doing what the tool says will hand you a deprecation warning. ## Problem two: the JavaScript This is the one with the most alarming number attached to it, and it comes from a neutral source rather than a vendor. In the HTTP Archive crawl of September 2026, across 15.47 million mobile URLs, the median page spent **3.73 seconds of CPU time** executing JavaScript. Median JavaScript transfer weight was 689KB. The Web Almanac's own framing of why this is different from image weight is the clearest statement of the principle: “100 KB of an image is just pixels, but 100 KB of JavaScript is work.” In a Next.js app the usual cause is a single misplaced directive. The rule is mechanical: “Once a file is marked with "use client", all of its imports and the components it directly renders are included in the client bundle.” Put that on a layout and you have just shipped that layout's entire import tree to every visitor. Nothing errors. Nothing warns. The page works. It is just slower to respond to clicks, because the browser is parsing and hydrating code it never needed. Move the directive down to the small interactive leaf that actually needs it, and pass server rendered output through as `children`. To find it rather than guess, run `npx next analyze`, sort client modules by size, click the largest, and read the import chain. You are looking for a chain whose root is a layout or a page rather than a button. ## The waterfall Two awaits in a row are two round trips in a row. The Next.js documentation is explicit: > Within any component, multiple async/await requests can still be sequential if placed after the other. Requests begin as soon as fetch is called. > > — Next.js documentation, Fetching Data If the second query does not need the first one's result, start both and await them together with `Promise.all`. If it does, the waterfall is real and you need a different query. The browser side version of this is fetching inside `useEffect`. React argues against it in its own documentation, and the second reason is the one that costs you: > Fetching directly in Effects makes it easy to create network waterfalls. You render the parent component, it fetches some data, renders the child components, and then they start fetching their data. If the network is not very fast, this is significantly slower than fetching all data in parallel. > > — React documentation, useEffect React also points out that effects do not run on the server, so the initial HTML contains a loading state and no data, and the visitor downloads your entire bundle before the first request is even sent. ## The fix that takes one minute Check what region your database is in, and what region your functions run in. Vercel functions default to `iad1` in Washington DC. If you clicked through a Supabase setup and picked a region near you, those two may be on different continents. Vercel's own worked example: a function in Sydney talking to a US East database and making three lookups spends “over a full second” on database queries alone. This is the one that multiplies. Ten serial queries across an ocean is seconds of pure network before anybody has computed anything. It is also the cheapest thing on this list to fix, because it is a setting rather than a code change. ## Cold starts are probably not your problem Cold starts attract an enormous amount of attention relative to the evidence for them, and the most useful corrective comes from an AWS engineer talking about Lambda at re:Invent, which is not where you expect to hear it. > I can't talk about cold starts without acknowledging the truth, that this is a 1% phenomena. > > — AWS re:Invent 2023, Demystifying Lambda cold starts In the same talk: for one function they examined, almost 80% of initialisations did not increase user-facing latency at all. What did help was importing less, with a measured example where loading an entire SDK cost 540ms and importing only the one client needed cut 400ms off that. And on the most popular workaround, he said he would not encourage you to use warmers. For Vercel specifically, be careful what you believe, because the numbers in circulation have no source. Vercel publishes **no cold start duration distribution at all**, no median and no percentiles. The frequently quoted 280ms is a value in an illustrative screenshot in a changelog, not a benchmark. I could find no origin whatsoever for the common claims of 250ms, or of one to three seconds. Their documentation is more restrained than their marketing: Fluid compute reduces cold starts through instance reuse and pre-warming, and the docs say plainly that cold starts can still happen during periods of low traffic. Never eliminated. If it matters to you, measure it. Runtime logs label every invocation as hot, pre-warmed or cold, with a duration. Two gotchas if you do: bytecode caching applies only to production, and pre-warming is paid plans only, so benchmarking on a free preview URL measures a different system from the one your users hit. ## Where the evidence actually stops I want to be straight about what is and is not established here, because the honest version is more useful than the confident one. **What is well established:** every mechanism above. Unindexed scans, per row function calls, N+1, bundle size, lazy loaded hero images and request waterfalls are all documented by the people who build Postgres, React, Next.js and Chrome. Fixing them makes apps faster. That part is not in question. **What is established but narrower than it sounds:** there is peer reviewed work finding that language model generated code is slower than expert human code, roughly two to three times slower on execution, or reaching about 45% to 62% of expert efficiency depending on the measure. Those studies test LeetCode and HumanEval puzzles. Several say so in their own limitations sections. A 2026 reanalysis that re ran all four major benchmarks with repeated executions and significance testing found that under their original test suites, only 6.11% of the supposedly faster implementations were statistically faster at all. **What is not established at all:** that AI tools specifically produce the failures in this article. Nobody has counted N+1 queries, missing indexes or misplaced client directives across AI generated codebases. The one empirical study of AI generated SQL I could find pointed slightly the other way: it found `select *` rare, and reported that every model included the necessary limits. Its actual finding was about missing partition filters. So I am not going to tell you AI writes slow code. The defensible claim is narrower and more useful. These are the documented ways a Next.js and Supabase app gets slow. AI tools generate code faster than anybody reviews it, and they work from training data that demonstrably predates current framework defaults, which is a staleness problem rather than a competence one. Vercel and Supabase both now ship rule files that force feed exactly these items into every agent session, ranking missing indexes, connection pooling, waterfalls and bundle size as critical. That tells you which known mistakes they thought worth intercepting. It does not tell you the model invented a new one. ## The order to work in - **Measure.** Network tab, first request, server response time. Decide which half you are fixing. - **Open the Supabase Performance Advisor** and fix every warning. Highest return per minute on this list. - **Index your foreign keys.** Nothing did it for you. - **Wrap `auth.uid()` in a subselect** in every policy where the result does not depend on the row. - **Declare foreign keys** so you can replace loops with a single embedded query. - **Check your regions match.** One setting. - **Stop lazy loading the hero image** and add `sizes` to every `fill`. - **Run `npx next analyze`** and find the `"use client"` that is higher up the tree than it needs to be. - **Prove it with EXPLAIN.** `explain (analyze, buffers) select ...`, and watch `Rows Removed by Filter`. A policy that discards most of the table on every read is a policy whose filter column needs an index. > **Note.** One gotcha for anyone copying a `pg_stat_statements` query off a blog. Postgres 13 renamed `total_time` and `mean_time` to `total_exec_time` and `mean_exec_time`. Any snippet using the old names predates 2020 and will simply error on a current Supabase database. --- *Originally published at https://buildingmvp.com/articles/your-vibe-coded-app-is-slow-here-is-where-to-look. Free to quote with attribution.* ============================================================================== # Nobody wants your data. They want your API key. > A leaked key turned into a $30,000 bill overnight. For most small apps the realistic worst case is not a breach, it is an invoice. Why your spend cap probably does not stop your spend, which providers actually halt by default, and the free protection almost nobody has switched on. **Published:** 2026-10-19 · **Topic:** Cost · **Reading time:** 12 min read **Source:** https://buildingmvp.com/articles/nobody-wants-your-data-they-want-your-api-key **Author:** MVP Strategic Consulting (buildingmvp.com) --- **The realistic worst case for a small app is not that somebody steals your data. It is that somebody spends your money.** Your user table is worth very little to a stranger. Your API keys are worth whatever your card will authorise, and they can be used within minutes of being found, by someone who never has to look at your app at all. ## Thirty thousand dollars, overnight Chris Raroque, describing what this looks like when it happens to you: > One of my environment variables got leaked, which was an AWS key that just had too many permissions attached to that key. Absolutely no budget cap either. I woke up to a $30,000 bill where someone took the key and then used something called AWS SageMaker to do machine learning training on my key. I got lucky and the bill was waived to about $2,000. > > — Chris Raroque Three separate failures stacked into one invoice. The key leaked. The key could do far more than it needed to. And nothing anywhere was willing to say stop. Remove any one of the three and the story ends quietly. Most advice about this stops at “set a budget.” The uncomfortable part, which took reading the documentation to find, is that setting a budget frequently does not stop anything. ## Your spend cap probably does not cap your spend Vercel is unusually honest about this in print, so start with them: > Setting a spend amount does not stop usage on its own. To stop incurring costs above your spend amount, turn on Pause Production Deployments. > > — Vercel documentation, Spend Management Turn that on and two more caveats follow, both documented: > Pausing is not instantaneous. Because Vercel checks your spend every few minutes, projects can keep serving traffic and accruing usage for several minutes after you cross the spend amount. > > — Vercel documentation, Spend Management > Pausing only affects production deployments. It does not stop AI Gateway API key usage or v0 usage. > > — Vercel documentation, Spend Management That last sentence is the one to sit with. If your app is expensive because it calls a model, pausing your project does not stop the expensive part. Spend Management is also only available on Pro and Enterprise. This is not a complaint about Vercel, who document their limitations more clearly than most. It is the general shape of the problem: **the cap has to live where the invoice is generated**, and most people have set it somewhere else, or nowhere. ## Who actually stops, by default Checked on 19 October 2026. The question is not whether a budget feature exists, but whether anything halts without you configuring it. - **Anthropic: hard stop, on by default.** Tier spend caps halt the account. Worth knowing the failure shape because it breaks retries: the 429 carries no `retry-after`header, so an SDK's automatic retries fail repeatedly instead of backing off. Identify it by the error code `enforced_spend_limit_reached`. - **OpenAI: hard stop at the tier usage limit**, on by default. Your own spend limits are opt-in, and the alert variant explicitly does not stop traffic. - **Supabase: spend cap on by default on Pro.** The only platform here where the protective setting is the default. They are also candid that it is coarse: it covers egress, edge invocations, realtime, storage and logs, but not compute, replicas or PITR. It protects you from an attack, not from your own provisioning. - **Vercel Hobby: cannot be charged at all.** Exceeding included usage disables the feature for about thirty days rather than billing you. Hobby is restricted to non-commercial use, so this is not a strategy, but it is why most hobbyists never see a bill. - **Cloudflare Workers, Twilio, Google Cloud and Firebase: alerts only.**Google's own guidance says budget alerts do not pause services. - **Netlify: nothing.** See below. The pattern is counterintuitive and worth remembering: the providers most capable of producing a catastrophic bill, the model APIs, have the best defaults. The hosting platforms mostly do not stop. Raroque is sharp about the ones that offer nothing: > I absolutely hate how Firebase and some services don't do that. It's just so malicious, in my opinion, that they don't have that. But the world's not fair and you sometimes just have to set that up yourself. > > — Chris Raroque ## The twenty month gap In early 2024 a developer received a Netlify bill reported at around $104,500. The story is usually told as a DDoS attack that was forgiven. Two parts of that need correcting, and the correction is the interesting bit. Netlify's own support lead said in the thread: *“To be clear, this case was not a malicious DDoS attack.”* And the company said at the time that it had assembled a team to address the lack of spending controls. Twenty months later, their billing documentation says that on plans other than Enterprise there is no direct way to set limits on metered feature usage, aside from not using a feature at all. Vercel met the same complaint wave and shipped hard caps within weeks. One platform shipped a control, the other shipped a statement. If you are choosing where to put something that could get expensive, that difference tells you more than any feature table. ## The incidents that are actually documented Most surprise-bill stories are screenshots. I went looking for ones with a traceable primary source, and the best two are recent and end in a way people do not expect. **Two Gemini cases on Google's own developer forum in 2026.**One reports over €54,000 in about thirteen hours. The other roughly $67,000 in nineteen hours. Both came from unrestricted API keys provisioned through Firebase, and a Google staff member replied in-thread acknowledging the problem and saying they were moving to disable unrestricted keys. **Both refund requests were refused.** In the second case Google wrote that the project may have been compromised and that they were unable to make adjustments to the charges. That is the version worth internalising, precisely because it is not the comforting one. The vendor acknowledged the compromise in writing and still declined. Raroque got his $30,000 reduced to $2,000 and says plainly that he got lucky. Every retelling that ends in forgiveness is teaching you to rely on something nobody has promised. > **Note.** The counter-example, and the reason to report it anyway: a developer was billed around $1,300 for nearly 100 million unauthorised S3 requests to a bucket that happened to share a name with an open source tool's default configuration. AWS cancelled it, then changed the policy. They now state that bucket owners are never charged for requests returning 403 from outside their account. One person's bill became everyone's fix. One more thing, in the interest of not doing what I am criticising. The widely circulated Vercel bill figures, including a $96,000 one, trace to tweets rather than written accounts. The main Hacker News link for that story is a tweet with eleven points, whose second comment is somebody pointing out that it is just a tweet. I could not verify any of those numbers, so I am not repeating them as facts. ## What is actually billing you Here is a mechanism that catches people out, because the intuition runs backwards: > Vercel bills Provisioned Memory continuously until the last in-flight request finishes. Vercel bills Active CPU only while your code is actually running. If the request is waiting on I/O, CPU billing pauses but memory billing continues. > > — Vercel documentation, Functions usage and pricing So a function that spends four minutes awaiting a model response uses almost no CPU and looks nearly free on the metric people check. Memory is billed for the entire four minutes regardless. The archetypal AI feature, an agent loop that mostly waits, is exactly the shape that looks cheap and is not. Which tells you the fix is architectural. Shortening the wall clock helps. Making the code more efficient while it waits does nothing. ## Rate limiting is now free, and almost nobody knows An unauthenticated endpoint that calls a paid model is not a performance risk, it is a billing vulnerability. Vercel has a name for the category: denial of wallet. The common advice is that Vercel's firewall rate limiting requires Pro. That changed in May 2025. It is now available on all plans, with Hobby including one rate limit rule per project and the first million allowed requests per month. Windows from ten seconds to ten minutes, keyed on IP or browser fingerprint, 429 by default. **One rule, free, about five minutes of configuration.** It is the cheapest meaningful protection on this stack and most people believe it is paywalled. Two honest limits on what it buys, both from the vendors themselves: - Vercel counts per region, so traffic spread across regions can exceed the limit you set for any single one. - Cloudflare documents a delay of up to a few seconds before counters update, during which excess requests reach your origin. And structurally: a rate limit bounds the *rate* of loss, not the *total*. Only a cap at the meter does that. Use both. > **Note.** Counting requests in a module-scope `Map`is not a rate limiter, though the usual explanation is slightly wrong. Under Fluid compute, module scope genuinely is shared across concurrent invocations on one instance. It still fails because there can be thousands of instances, instances are discarded between traffic, and every deployment resets the count. Vercel's own guidance is to keep counters in an external store. ## Two controls that are not about caps **Scope every key to one job.**Raroque's leaked key should never have been able to start machine learning jobs. It only could because it was issued broadly, the way starter instructions usually suggest. Assume every key you create will eventually be public, then ask what it can do on its worst day. If the answer is anything beyond its single purpose, issue a narrower one. **Count on the server.** A limit enforced in your interface is a suggestion. The endpoint behind it is visible to anyone who opens the network tab and will answer direct requests all day. Counters belong next to the thing being protected, and the same goes for anything else that decides cost: prices, plan tiers and quotas must never arrive from the client. Add a per-IP limit alongside the per-user one, since per-user limits fall to mass account creation. Raroque's framing of the trade is the right one, and it is the sentence most people need permission to believe: > It is so much better for your app to go down for a little bit than for you to wake up with a $10,000 bill. > > — Chris Raroque ## Check this before you check anything else Data breaches are slower, rarer and usually survivable for a small project. A runaway bill arrives overnight, is owed immediately, and does not care how many users you had. - **Set a hard cap at every provider that sends you an invoice.** Not at your host. Your host cannot stop your model spend and says so. - **Check whether what you set actually halts.** If it only sends an email, you do not have a cap, you have a notification. - **Turn on the free Vercel rate limit rule** for anything unauthenticated that costs money per call. - **Require authentication on model endpoints** so there is a unit you can suspend. A limit keyed on IP is weak; one keyed on a user ID is enforceable. - **Narrow every key** to the one thing it does. - **Shorten wall clock, not CPU.** Memory bills for the whole duration of a request that is merely waiting. - **Do not plan on forgiveness.** It happens, it is not policy, and in the two best documented 2026 cases it did not happen. --- *Originally published at https://buildingmvp.com/articles/nobody-wants-your-data-they-want-your-api-key. Free to quote with attribution.* ============================================================================== # Your app works. That is not the same as it scaling. > Read this one if it was fine and then got worse. Correct at ten records looks identical to correct at fifty thousand, which is why scaling failures ship without anyone making a mistake, and why they are harder to fix than a bug. **Published:** 2026-10-18 · **Topic:** Scaling · **Reading time:** 7 min read **Source:** https://buildingmvp.com/articles/your-app-works-that-is-not-the-same-as-scaling **Author:** MVP Strategic Consulting (buildingmvp.com) --- **Your app is not slow because an AI wrote it. It is slow because nobody decided how much data it should load, and an assistant will not make that decision for you.** This is the gap that catches people after the hard part looks finished. The app works. You used it. Your friends used it. Then real data arrives, and the same code that felt instant becomes unusable, without a single line having changed. ## Correct at ten records looks identical to correct at fifty thousand Here is the failure in its purest form, and it is worth understanding because almost every scaling problem in a generated app is a variation of it. You ask for a search box with live results. You get one, and it works. What you were not told is that it fires a database query on every keystroke. Typing `running shoes` is twelve separate queries. With ten test users that is invisible. With fifty thousand it is a denial of service you built yourself and pointed at your own database. > **Note.** That example comes from a widely shared video on AI-assisted coding, which tells it as a Black Friday outage costing a named sum per minute. The company is not identified and no report is cited, so treat the story as an illustration rather than a documented incident. The technical pattern underneath it, a request fired per keystroke with no debounce, is real, common and easy to verify in your own network tab. The reason this ships is not carelessness. It is that nothing about the code is wrong. There is no bug to find. The query is correct, the component is correct, the tests pass. The missing piece is a decision nobody made, and the line that captures it best is this one: > He didn't make a bad decision. He never made the decision at all. > > — DevForge, Vibe Coding is a Trap An assistant optimises for the request in front of it. You asked for search. You did not ask for search that holds up at fifty thousand users, because at the time you had none. ## Why this is harder to fix than a bug A bug has a wrong line. Scaling problems are usually correct lines doing too much work, which means you cannot find them by reading for mistakes. You find them by understanding what the system does under load, and that is precisely the understanding you skipped. Brian Kernighan wrote the sentence that governs this, decades before any of it: > Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it. > > — Brian Kernighan, The Elements of Programming Style Substitute *as cleverly as possible* with *by an assistant, faster than you can read it* and the conclusion holds. Code you did not reason through is code you cannot reason about when it breaks. The problem is not that AI wrote it. The problem arrives later, when something misbehaves under conditions you never considered and you have no mental model to search. This is why scaling failures feel so much worse than normal bugs. You are debugging a system and learning it at the same time, usually while it is on fire. ## Five patterns that fix almost all of it The encouraging part is that the remedies are well established and you can ask for them by name. These come from a demonstration by Amichay Even Chen, built on a board holding thousands of records. It is vendor content, so the platform is theirs, but the patterns are not specific to any stack. **One. Show results as they arrive, not when everything is ready.** A spinner that waits for a complete response makes the slowest part of your query the speed of your whole app. Render what you have, progressively. Totals and counts can usually be computed by the database far faster than the rows themselves, so ask for aggregates first and fill in detail behind them. Most of what users call speed is actually the absence of waiting with nothing on screen. **Two. Load less of it.** Pagination, or infinite scroll if that suits the interface better. Twenty rows now and twenty more on request beats a thousand rows nobody scrolls to. The naive instruction, *load all the items then show them to me*, is the single most common shape in generated data code, and it is fine right up until it is catastrophic. **Three. Load fewer columns.** This one gets overlooked because it is invisible in the interface. Requesting seven fields per row is measurably slower than requesting two, and most list views display two. Fetch what the list shows, then fetch the rest of a record when somebody opens it. **Four. Filter by default, not on request.** Real datasets fill up with things nobody looks at: tasks completed months ago, leads untouched for years. If the default view excludes them, most users never wait for them. Add a deliberate way to see everything, and let the rare case be the slow one rather than every case. **Five. Cache, with a deliberate expiry.**When you genuinely need all of it, you do not need to fetch all of it again on every refresh. Keep a local copy, show it immediately, and sync in the background. This suits data that changes slowly and is wrong for anything that must be live, so the decision is yours to make rather than your assistant's. Each of these is a sentence in a prompt. The reason they are missing from your app is not that they are hard. It is that nobody asked. ## Finding the problem before your users do You do not need load-testing infrastructure to catch most of this. You need realistic data and the network tab. - Seed your development database with roughly the amount of data you expect in a year, not the eleven rows you have been testing with. Most scaling problems are invisible below a few thousand records and obvious above them. - Open the network tab and use the app normally. Count the requests. A single interaction firing a dozen calls is the per-keystroke pattern, and you will see it immediately. - Look at response sizes, not just timings. A list view returning hundreds of kilobytes is returning fields nobody is reading. - Watch for one request per row. That shape, a list query followed by a call for each item it returned, is the most common generated inefficiency after missing pagination. ## What to do about code you do not understand There is an honest answer here that is less bleak than the one usually offered, which is that you should have written it yourself. You do not need to understand every line of your application. You do need to understand the parts that decide how much work happens: where data is fetched, how much of it, how often, and what triggers it. That is a much smaller surface than the whole codebase, and it is where essentially all scaling behaviour lives. So pick the three or four places your app talks to its database and actually read them. Ask what happens when this table has a hundred thousand rows. Ask what triggers this and how often it fires. You are not auditing the code, you are recovering the decisions that were made on your behalf. Useful instruction when you do this: ask your assistant what happens at scale, not whether the code is correct. Correct is the answer you will always get, and it is true, and it is not the question. ## The short version A demo and a system are different objects. The demo proves the idea. The system survives the data. Moving between them is not a rewrite, it is a handful of decisions about how much work to do and when, and every one of them can be asked for in plain language. Make those decisions deliberately now, while nobody is using the thing, rather than at three in the morning when everybody is. --- *Originally published at https://buildingmvp.com/articles/your-app-works-that-is-not-the-same-as-scaling. Free to quote with attribution.* ============================================================================== # Your row level security is correct. Your app is still wide open. > He configured the policy properly. Claude and Cursor both audited it and passed it. Strangers still gave themselves premium accounts and ran up his AI bill. The bug was not in the policy, which is exactly why nothing caught it. **Published:** 2026-10-17 · **Topic:** Security · **Reading time:** 6 min read **Source:** https://buildingmvp.com/articles/your-rls-is-correct-your-schema-is-the-hole **Author:** MVP Strategic Consulting (buildingmvp.com) --- **A developer called Chris Raroque configured row-level security on his calorie-tracking app correctly. Users could read and write only their own data. He asked both Claude and Cursor to audit it. Both said it was fine.** Strangers still gave themselves premium accounts and unlocked unlimited use of the paid AI endpoint behind them. Nothing about his security policy was wrong. That is the part worth sitting with, because it is the reason his tools missed it and the reason yours will too. ## What actually happened His policy said users may edit their own row. Reasonable. The problem was what was on that row. Subscription status lived there. So did the rate-limit counter. > I had RLS configured correctly where users can read and write only their own data. But I made the mistake of storing the subscription status and the rate limits on the same table, which meant that they were able to actually modify their subscription status to give themselves premium. And even worse, they were able to modify the rate limits. And then they could just hit my AI endpoint unlimited. > > — Chris Raroque Read the policy again with that in mind. *Users may edit their own row* is also *users may edit their own billing status*. Both sentences describe the same rule. Only one of them sounds like a vulnerability. ## Why the AI audit passed it This is the part that should change how you check your own work. He did the responsible thing and asked for a review: > Before you say, “Why didn't you ask Claude or Cursor to audit your RLS?” Trust me, I did. It did not catch these issues either. These tools are great at catching most RLS misconfigurations, but then when it gets to something a little more complicated, like thinking through how can RLS be manipulated so that they can abuse costs and cause financial damage, it sometimes does miss this stuff. Especially when the RLS is technically correct, but the problem is with the underlying data that you're storing. > > — Chris Raroque Ask an assistant to check your access rules and it checks your access rules. It reads the policy, confirms the policy does what the policy says, and reports success. The flaw is one level up, in the decision about which columns belong on a table the user is allowed to write. That decision does not look like a security decision, so nothing treats it as one. He is blunt about how often he sees it: > The most common vulnerability pattern I'm seeing with RLS is storing sensitive data, like subscription status or rate limits on the user table itself. I don't know why, but Claude Code and Cursor just do not have a problem with you doing this. > > — Chris Raroque He went looking for it in other people's apps afterwards and says more than half of the ones he checked had the same hole, including apps built by experienced developers. That was an informal look at a handful of projects rather than a study, so treat the proportion loosely. The part worth keeping is that technical experience did not prevent it. ## The rule this gives you Your access policy answers one question: may this user touch this row. It cannot answer the second question, which is whether anything on that row should be under their control at all. Only your schema answers that, and nobody audits a schema for security. So split the data by who is allowed to write it, not by what it describes: - Things the user owns and may change. Their name, their preferences, their content. Fine on a row they can write. - Things the business decides about the user. Plan tier, credits, rate limits, trial expiry, role, verification status. These belong on a table the client has no write policy on at all, updated only by your server or a webhook from your payment provider. The second group is the one that pays for things. If a user can write it, they can award it to themselves. ## How to test it in two minutes The reason the generic audit fails is that the generic question is too kind. *Is my row-level security configured correctly* invites a yes. Ask the adversarial version instead, naming the outcome you are afraid of: - Can a signed-in user change their own subscription status, plan, or credit balance? - Can a signed-in user raise or reset their own rate limit? - Which columns on user-writable tables affect what the user is charged or what they are allowed to do? Then stop asking and check. Sign in as a normal user, open the network tab, and attempt the update directly against your database. If the write succeeds, you have the bug, regardless of what any audit told you. There is a useful habit here too. Point your assistant at the live configuration rather than a description of it. Both Supabase and Firebase expose their settings through an MCP server, and cloud providers expose theirs through a CLI. An assistant reading the real policies will tell you more than one reading a screenshot of them. ## The wider lesson Automated review finds the mistakes somebody thought to describe. It is good at a policy that is missing, a key that is exposed, a route with no check on it. It is weak at a design that is internally consistent and still wrong, because there is no rule being broken for it to notice. Which means the questions worth asking are never *is this correct*. They are **what would I do if I wanted to cheat this**. Give yourself premium. Reset your own limits. Read somebody else's invoice. Those are specific enough to test, and specific is the only thing that survives an audit. --- *Originally published at https://buildingmvp.com/articles/your-rls-is-correct-your-schema-is-the-hole. Free to quote with attribution.* ============================================================================== # Press F12. Your app is telling on itself. > The browser already shows anyone who asks every endpoint you call, every field you return and every key you shipped. Here is how to read it in ten minutes, using the exact tool an attacker would. **Published:** 2026-10-17 · **Topic:** Practical · **Reading time:** 6 min read **Source:** https://buildingmvp.com/articles/press-f12-your-app-is-telling-on-itself **Author:** MVP Strategic Consulting (buildingmvp.com) --- **Press F12, open the Network tab, and use your app for two minutes. You are now looking at exactly what an attacker looks at, in the same tool they use, for free.** There is no clever tooling behind most of the breaches in this space. The work is reading what the browser already shows anyone who asks, and almost nobody building an app ever opens it. ## What the panel actually is Every request your front end makes goes through the browser, so the browser can list all of them. Open your developer tools, choose **Network**, tick **Fetch/XHR** to hide images and fonts, then click around your own app. Sign in. Load a record. Save something. Hit a paid feature. What accumulates is a complete map of your back end: every endpoint, every parameter you send, every field you get back. You did not publish that map. You did not have to. ## Four things to look for, in order **One. Credentials in plain sight.** Click a request and read the Headers, then the Payload. You are looking for anything resembling a key. Then switch to the **Sources** panel and search your bundle for `key`, `secret`, `token` and `postgres://`. A full database connection string in a front-end bundle ends the conversation wherever it appears, and it costs thirty seconds to rule out rather than assume. **Two. Responses carrying more than the screen shows.**Open the Response tab on a request that loaded a list. Compare the fields that came back with the fields that got rendered. Hidden columns are not hidden. Email addresses, internal flags, other people's identifiers and password hashes all travel perfectly well inside a response that renders as three tidy rows. **Three. Identifiers you can change.** Find a request with an ID in it. Right-click, **Copy as cURL**, paste it into a terminal, change the number, and run it. If a different user's record comes back, you have the most common hole in generated code. Being signed in and being entitled to that specific row are separate questions, and generated routes routinely ask only the first. **Four. Decisions made on the wrong side of the wire.**Watch what your app sends when it does something expensive. If the request carries a price, a plan name, a credit count or a quota, your server is taking the client's word for it, and the client is editable. ## The test that matters most Take that copied cURL command and delete the `Authorization` header and the `Cookie` header. Run it again. If data still comes back, your API has no authentication at all. The login screen was protecting the interface, not the data behind it. This is extremely common, because the prompt asked for a login page, the assistant built a login page, and nothing in that exchange concerned the endpoints. Tech With Tim built a dashboard specifically to show what this looks like, using a deliberately lower-tier model and fake data, and found all three problems in it from one unremarkable prompt. It is a demonstration rather than a discovered breach, which is worth saying plainly. His argument is that the model tier changes how often this happens, not whether it can: > The front end is just using the database directly without going through the API, which means anyone now can grab this URL, nuke my database, and do anything they want with it because it's purely showing up in the front end. > > — Tech With Tim He makes the point that matters for anyone reading this without a development background: > The people who are building these types of apps, they don't know to look for that. They don't even know that this is a problem. They don't know the difference between a back end and a front end in the first place. > > — Tech With Tim ## A note on mobile If your app is native, nothing above protects you. There is no network tab, which tends to get read as there being nothing to see. Traffic can be intercepted with a proxy and bundled values can be pulled out of the binary. A mobile app is a public file that happens to run on a phone. ## Ten minutes, once Open the tab. Click through your own app. Copy one request as cURL, strip the auth, and run it. Change one identifier and run it again. You will either confirm that your back end holds, or you will find in ten minutes what somebody else was going to find anyway. The tool is already installed. The only unusual part is choosing to look. --- *Originally published at https://buildingmvp.com/articles/press-f12-your-app-is-telling-on-itself. Free to quote with attribution.* ============================================================================== # Securing Supabase: what actually matters > Supabase hands your browser a key on purpose, and one thing behind it keeps your data private. The Security Advisor will approve a policy that lets strangers post as you, and the official guide skips storage, auth settings and views entirely. **Published:** 2026-10-17 · **Topic:** Supabase · **Reading time:** 7 min read **Source:** https://buildingmvp.com/articles/securing-supabase-what-actually-matters **Author:** MVP Strategic Consulting (buildingmvp.com) --- **Supabase hands your browser a key on purpose. Everything that keeps your data private depends on one thing being right behind it, and the dashboard will happily tell you it is fine when it is not.** What follows is the short version of what matters, drawn from Supabase's own security walkthrough, with the parts they skipped marked clearly. ## Know which key is which There are two, and the rule for telling them apart is pleasingly simple. If the dashboard shows the key without asking, it is meant to be public. If it hides it behind a **Reveal** button with a red badge, it is not. - **anon**, now being renamed **publishable**. Safe in the browser. It identifies your project and nothing more. Its safety is entirely conditional on your access policies. - **service_role**, now renamed **secret**. It ignores every access policy you have written. In Supabase's own words, if someone gets hold of it “they can do anything, they can read all the data, they can delete all the data”. The secret key belongs on a server. In Supabase terms that means an Edge Function, with the value stored in the secrets manager and read at runtime rather than written into your source. Keys committed to a repository are exposed even after you delete them, because history keeps them. One audit worth doing right now: copy your secret key, then search your entire repository for that exact string. If it appears anywhere, rotate it before you do anything else. ## Row level security, and the three patterns that cover most apps With RLS off, a table in the public schema is readable by anyone holding the publishable key, which is to say anyone. The dashboard marks it with a red lock and states the consequence plainly: > When row level security is disabled for a table, any users can access this table any way they want, which is terrible. It's not acceptable. If you find this in your dashboard, immediately enable row level security. > > — Supabase, Fundamentals of App Security for Vibe Coding Policies come in four kinds, one per operation, and three patterns handle most cases: - **No policy means denied.** If a table has no DELETE policy, nobody can delete through the API. Absence is a decision, and a reasonable one. - **`true`** means always allowed. Occasionally correct for reading genuinely public data. Rarely correct for writing. - **`auth.uid() = owner_column`** is the ownership check, and the one you will use most. ## The mistake the advisor will not catch Supabase ships a Security Advisor that flags the obvious failures, and it is worth checking. It is also, by their own admission, not sufficient. Their demonstration is the clearest warning in the whole video: they changed an INSERT policy to `true`, and the advisor reported nothing wrong. > If we just say true, it doesn't mean that anybody can insert the data. It means that anybody can insert any kind of data in a database. So people can pretend to be other people. I can insert data as if I'm someone else, like Elon Musk or something. That's not great, right? That's like actual hacking. > > — Supabase, Fundamentals of App Security for Vibe Coding And the general caveat, from the vendor: “Security advisors are great for picking up some of the obvious pitfalls, but it's not going to pick up everything.” A clean advisor means no policy is missing. It does not mean your policies are right. ## Test your policies instead of trusting them The genuinely useful part of their walkthrough is a repeatable way to prove a policy works, rather than reading it and nodding. The shape is this: - Run Supabase locally. Never test against production, and note that every local instance ships the same keys, so seeing a service_role key in your terminal is expected rather than alarming. - Put your schema in a migration, not a loose SQL file, or a local reset will not apply it. - Reset the database before each test, so results do not depend on what the last run left behind. - Sign up user one. Have them write something. - Sign up user two. Have them attempt to modify user one's record. - Read the record back using an admin client and assert it is unchanged. That last step is the one people get wrong, and there is a specific technical reason why. Reading back through the normal client would itself be filtered by your policies, so you could not tell a blocked write from a row that was never there. > **Note.** **The detail that breaks naive tests.** When a write is blocked by row level security, Supabase does not return an error. It silently does nothing, which is how Postgres behaves. An assertion that expects a failure will therefore pass whether your policy works or not. Assert on the data instead: read the row back and confirm the original values survived. ## What the official guide leaves out Worth being explicit, because a video from the vendor reads as complete when it is not. None of the following is covered, and all of it matters: - Auth configuration: email confirmation, signup settings, password policy, leaked-password protection, OTP expiry. - Verifying sessions on the server with `getUser()` rather than trusting the cookie. - Storage buckets and their policies, which are a separate permission system from your tables. - Database functions, and whether they run as the definer or the invoker. - Views, which can quietly bypass the policies on the tables beneath them. - Which schemas are exposed through the API at all. There is also one claim worth treating sceptically. The video says AI tools generally do a good job of enabling row level security. Sometimes they do. The incidents that make the news are the times they did not, and it costs you nothing to check rather than assume. ## The short version Confirm your secret key is nowhere in your repository. Turn on row level security everywhere. Read the Security Advisor, then ignore its approval. Write one test that proves user two cannot touch user one's data, and assert on the data rather than on an error. Then go and look at storage and auth settings, because the official guide will not take you there. --- *Originally published at https://buildingmvp.com/articles/securing-supabase-what-actually-matters. Free to quote with attribution.* ============================================================================== # Lock a whole app behind a login in 20 minutes with Cloudflare > Cloudflare Access puts a real authentication gate in front of an entire app, free for 50 users, without touching your code. It also protects far less than the phrase implies, and four specific mistakes will leave it open while you think it is closed. **Published:** 2026-10-17 · **Topic:** Cloudflare · **Reading time:** 7 min read **Source:** https://buildingmvp.com/articles/cloudflare-access-for-vibe-coders **Author:** MVP Strategic Consulting (buildingmvp.com) --- **You can put a real login gate in front of an entire app in about twenty minutes, for free, without touching your code. It is the highest-value hour of security work available to most people building internal tools.** It also does far less than the phrase “secured with Cloudflare” suggests, and being clear about which half you have is the difference between being protected and feeling protected. ## What Cloudflare Access actually does Access sits at the edge and refuses to pass a request to your app until the visitor has authenticated. Your application code is not involved and does not need to change. For an internal dashboard, an admin panel, or a staging environment that should never have been public, this is close to ideal. The free plan covers **up to 50 users**, which is more than enough for most internal tools. > **Note.** Pricing above the free tier moves, and the figures quoted in tutorials go stale quickly. Check Cloudflare's current pricing page rather than trusting a number from a video, including this one. ## The setup, in the order that works - Deploy the app to Cloudflare Workers, connected to your GitHub repository so commits deploy automatically. - Point your domain's DNS at Cloudflare, so traffic actually traverses their network. Without this there is nothing in front of your app to do the gating. - Create a Zero Trust organisation and pick a team name. This becomes your team domain, which your identity provider will need. - Add a self-hosted application under Access, set a session duration, and give it your app's hostname. - Reload the app. You should now be locked out of your own site. That is the gate working. - Add a login method, connect your identity provider, then create and apply a policy. Getting blocked from your own app is the checkpoint that matters. If you can still reach it, nothing is protecting it yet. ## Four mistakes that will cost you an evening **Creating a policy does not apply it.** This is the one that leaves apps open while their owner believes otherwise. A policy exists independently of the application it governs. You must open the application, select the policy, confirm, and then save the application. Miss the final save and you have written a rule that enforces nothing. **Choose the right application type in your identity provider.** Even when your app is a single-page application, register it as a regular web application. Access performs the authentication exchange on its servers rather than in the browser, so the single-page option produces a configuration that fails in a way the error messages do not explain. **Nothing configures the callback URL for you.** The first login attempt always fails, because your identity provider has never heard of Cloudflare. The error page contains the exact callback URL it rejected. Copy that into the allowed callbacks list. For the logout and origin fields, trim it back to the bare domain. **Accepting every identity provider is the default.** That means any login method you have ever configured, including abandoned experiments, remains a valid way in. Restrict the application to the one provider you intend, and delete connections you are not using. ## Testing it without fooling yourself You are signed into Cloudflare. Of course the app loads. Signing out of the app launcher is not enough either, because the session survives it. Use a completely fresh private window, and treat any other result as untested. One tutorial author lost hours to a configuration error here and described the experience accurately: > Here's the error that I've gotten multiple times and this frustrates the crap out of me because I couldn't figure out what I was doing wrong. It says this account does not have access. I got so frustrated, I just shut my computer at like 4:00 a.m. I just went to bed. > > — Dwain Browne, How to Secure a Vibe Coded App with Cloudflare His theory was a synchronisation delay. The likelier explanation, and the first thing to check, is that no policy matches your identity: the rule names a different email, or the policy was never applied to the application. Work through the configuration before blaming propagation. ## Policies are rules, and some of them are softer than they look Access policies can require a particular email or domain, a country, or multi-factor authentication. Email rules are the dependable ones, since they key off a verified identity. Country rules are worth understanding before you rely on one. They are based on the IP address a request arrives from, so anyone with a VPN presents as whichever country they prefer. Useful for reducing background noise, not for keeping out anyone who actually wants in. The same applies to hiding an app from the launcher: it affects what people are shown, not what they are allowed to reach. ## What this does not protect This is the important part, and the reason to be careful with the phrase “production grade security for free”. Putting Access in front of your app secures **who can open it**. It does nothing about: - Keys compiled into your front-end bundle, which remain readable by anyone who gets through the gate. - Database access rules, so any user who passes Access may still read everyone else's data. - API endpoints reachable on another hostname that Access does not cover. - Spending limits on the paid services behind your app. An app behind Access with no row level security and a database URL in the browser bundle is not a secure app. It is an insecure app with a login screen, and the login screen is the part an attacker cares least about. Use it for what it is excellent at, which is making sure an internal tool is not quietly public. Then go and fix the data layer, because that is where the actual risk lives. --- *Originally published at https://buildingmvp.com/articles/cloudflare-access-for-vibe-coders. Free to quote with attribution.* ============================================================================== # Vibe hacking: the other half of vibe coding > The same technology that writes your app writes the attack on it, and the attacker has the structurally easier job. What's actually for sale, why guardrails fail on vocabulary rather than intent, and the five boring holes that make you cheap to hit. **Published:** 2026-10-16 · **Topic:** Security · **Reading time:** 7 min read **Source:** https://buildingmvp.com/articles/vibe-hacking-the-other-half-of-vibe-coding **Author:** MVP Strategic Consulting (buildingmvp.com) --- **“Ransomware gangs have HR departments.”** That is Dr Katie Paxton-Fear, a security researcher who hacks companies for a living and lectures in ethical hacking, explaining why nobody should be surprised that attackers adopted AI. They have compensation plans. They pay bonuses for finding you. They are, in her word, corporatised. And like every other corporation in 2026, they found the tool that makes the work cheaper. What they built with it has a name now. ## It is exactly what it sounds like Vibe coding is describing an app and letting the model write it. Vibe hacking is describing a target and letting the model attack it. Pascal Geenens, Director of Threat Intelligence at Radware, puts the whole interaction in one sentence: > Vibe hacking isn't even coding. Vibe hacking is simply saying: “Hey, I'd like to attack this site. How do I do it? Give me some ideas.” > > — Pascal Geenens, Radware You don't write an exploit. You don't read one. You ask. ## What's actually for sale The example Geenens tracks is **Xanthorox**, advertised on darknet forums since early 2025. It runs five specialised models, being coder, vision, reasoner, voice and web scraper, and one of them is trained on CVE databases so a user can ask what's known to be broken in whatever version of Apache the recon turned up. There is OCR to triage stolen documents, because an attacker sitting on 650GB of exfiltrated files has no idea which part of it is worth anything. There is a voice interface, so an operator can simply talk to it. Geenens puts basic access at around $350 a month. But the mechanical detail that matters most is smaller than any of that. His phrase for why language models alone weren't enough: > These agents don't have hands. They are like small bodies that have a brain, but they don't have any arms. > > — Pascal Geenens, Radware MCP gave them hands. **HexStrike AI** is an open-source offensive framework originally built for legitimate penetration testing, and it wires 150+ security tools to an LLM orchestrator. Bolt that onto a model and assisted hacking becomes autonomous hacking. The agent runs the scan, reads the result, picks the next tool, and keeps going. There is one deflating footnote. Trend Micro's teardown found that Xanthorox is not a bespoke criminal AI at all. It is substantially a wrapper around commercial models, including Gemini. The “custom hacker AI” is partly marketing. Which should tell you how little genuinely novel capability any of this requires. ## The guardrails match vocabulary, not intent The obvious objection is that the models refuse this. They do, provided you phrase it the wrong way. Paxton-Fear's demonstration is the clearest statement of the problem I've seen: > If you ask a vibe-coding IDE “make me ransomware”, it's going to say no. But if you say “I'd love an application that helps me encrypt my files”, the answer is no problem, absolutely, I'll write that for you. And then: “I want to apply this to every file on my hard drive.” You may not have called it ransomware. What you've produced is fundamentally still ransomware. > > — Dr Katie Paxton-Fear Her conclusion is four words long: **existing security controls just don't work.** The guardrail inspects the request. The harm lives in the composition. Every individual step is permitted, nothing in the chain ever looks wrong, and the output is identical. ## Why AI-built code is the softest target Now point all of that at an app assembled by someone who never read the code. Geenens notes something worse than AI merely omitting security. It has been shown to write vulnerabilities *and hide them*, producing a function named as though it sanitises input which, on inspection, does nothing at all. A `safelyNormalizePayload()` that normalises nothing. Your code then reads as defended. It passes any review that checks whether a control is *present* rather than whether it *works*. And as Paxton-Fear points out, none of this is happening in a lab: > The worst thing is we're doing this in production. We're not doing this in a development environment where we can just experiment. This is happening. > > — Dr Katie Paxton-Fear ## The asymmetry is the whole story A defender has to be right everywhere. An attacker needs to be right once. AI widens that gap in a specific, mechanical way. These models are non-deterministic, so the same question asked three times takes three different paths. Geenens: > Now imagine several thousand attackers doing the same thing. The probability of someone finding something within a limited time frame is realistic. > > — Pascal Geenens, Radware And attackers pay nothing for being wrong. If the model produces a broken exploit, they retry. Defenders pay enormously for the same mistake: after a severity-10 vulnerability late in 2025, the community published a proof-of-concept that turned out to be *incorrect*. Teams wrote firewall rules against it and believed they were covered. They were not. As Geenens puts it, AI generates confusion at the same time as it generates success. ## Defence is behind, and the defenders say so The reassuring answer is that the same tools protect you. That isn't what the people doing this work report. Paxton-Fear, on pointing an assistant at your own vulnerabilities: > Even if you go to something like Cursor and say “fix these security vulnerabilities”, it's just not that good at security stuff yet. It's good at running tools. > > — Dr Katie Paxton-Fear That distinction is the crux. Finding is tool-shaped and automates beautifully. Fixing is judgment-shaped and does not. She is equally unconvinced by the usual perimeter answer, since spotting bad signals in a sea of noise holds up poorly when attacks arrive thousands per second from someone with no skill at all. ## The part that should worry a solo builder Her most quotable line isn't about technology: > 90% of organizations have probably never had a security attack. Your local takeaway has not had a security attack. They're going to be companies that have one guy doing security, suddenly having the scale of attacks of a company with a security budget with lots of zeros. > > — Dr Katie Paxton-Fear Small operations were never safe because they were secure. They were safe because attention cost money, so targeting had to be worth a human's time. Scale removes that filter. In one case she describes, a single actor researched an entire national retail sector and hit multiple companies inside a week. The research is a chatbot query. The execution is an agent. So the question changed. It is no longer *am I interesting enough to attack?* It is **is anything about me easy?** ## What actually helps You cannot out-run this, and anyone selling you that is lying. What you can do is stop being easy, because almost everything these systems find at scale is boring: - Open signup, where “logged in” was mistaken for “allowed” - A key that shipped inside the browser bundle because it had a public prefix - A record ID you can change in the URL to read somebody else's data - A table with no row-level security, where the UI was the only thing hiding the rows - Private files sitting in a public folder, reachable by anyone who knows the path None of that needs an agent to find. It needs someone to look. The scale is new. The holes are not. Fixing them does not make you secure, it makes you expensive, and expensive is the entire game when the attacker is optimising for volume. If you shipped something with an AI assistant and can't confidently say which of those five apply to you, that's worth an afternoon. I wrote a free fourteen-point check that will tell you in about three minutes. --- *Originally published at https://buildingmvp.com/articles/vibe-hacking-the-other-half-of-vibe-coding. Free to quote with attribution.*