Launch and other stacks

How to secure an app built with Bolt or Replit

First find out where your app’s access rules live. If the browser talks to Supabase, row level security decides who can read what, so check it on every table. If a server sits in front of the database, your server code decides, so check that every route verifies the caller. In both cases, keep secrets out of the code and the git history.

TL;DR

  • Bolt offers a built-in database or Supabase. Replit documents a built-in managed PostgreSQL database. Check which one you use.
  • Supabase from the browser means RLS is the control. A server in front of the database means your route code is the control.
  • Secrets belong in each platform’s secret store, never in code. Replit warns that hard-coded secrets can be exposed through public projects and repos.
  • PatchLabs has no Bolt-specific or Replit-specific study numbers. Its study sampled Lovable and Supabase repos.

Which database does a Bolt or Replit app use?

BuilderDatabase options in its own docsCheck first
BoltA built-in database that Bolt creates when a project needs one, or Supabase. Bolt’s help centre says Supabase can be selected when creating a project on a Pro or Teams plan, and describes claiming a Bolt database in your own Supabase account.Which database your project uses. If it is Supabase, RLS.
ReplitReplit Database, which its docs describe as backed by a fully-managed PostgreSQL database. App Storage for files is backed by Google Cloud Storage. Agent integrations include a connector for an external PostgreSQL database.Server-side checks and secrets. Some Replit apps use Supabase instead (see Replit apps).

Bolt’s page we read does not say what its built-in database runs on, so we do not assume. Look in your project, or for a supabase/migrations folder in the exported repo.

Which checks apply to which stack?

Where access is decidedTypical setupChecks
In database rules (RLS)The browser talks to Supabase with a public keyRLS on every table, three-identity test, no secret key in the client. PL-001, PL-002, PL-008, PL-010
In server codeA server or API sits between the browser and the databaseEvery route checks the caller. The user id comes from the session, never the request. Every read or write by id checks ownership. It is the same pattern as PL-017, PL-022, which PatchLabs checks in Supabase Edge Functions.
EitherAny appSecrets and git history, payment webhook signatures, dependencies, HTTPS and cookies. PL-009, PL-011, PL-021, PL-023, PL-033

How do I secure a Bolt app?

  1. Find your database. Check Bolt’s database settings and its help page.
  2. If it is Supabase, use the Supabase checks. The rules are the same as for any Supabase app: RLS on every table, then test as anon, a stranger and the owner. Run Supabase’s Security Advisor too.
  3. Run Bolt’s Security Audit, and know its scope. Bolt’s help centre says it looks for issues such as an open permission or a missing RLS policy, and checks your database only, not your whole project. Keys, server code and headers still need checking.
  4. Consider claiming a Bolt database in Supabase. Bolt says claiming migrates an existing Bolt database to Supabase and needs a Pro or Teams plan. Once it is in Supabase, Supabase’s own tools apply to it.
  5. Search for secrets. Look for service_role, sb_secret_ and payment or AI keys in the code and the history. Rotate anything that leaked.

How do I secure a Replit app?

  1. Check authorisation in every route. For each route that returns or changes data by id, confirm the signed-in user owns that record. Test it: sign up a second account and request the first account’s record ids.
  2. Use the Secrets tool. Replit’s docs say it stores and encrypts secrets and exposes them as environment variables, and warn that hard-coding secrets can expose them through a public Replit project or a public repository. Replit also says remixers can see secret names but not values, while collaborators see both. Add collaborators carefully, and rotate keys when someone leaves.
  3. Review file access. Replit’s docs say Agent can set up App Storage with authentication and access controls. Check that they cover your private files.
  4. Push to GitHub and scan the history. A key deleted from the code can still sit in old commits (PL-011).
  5. Grade the deployed site. Use the headers check and read security headers for AI-built apps.

If your Replit app uses Supabase, treat the database part like any Supabase app and follow the 10-minute check.

What can PatchLabs check on a Bolt or Replit app?

  • Lab runs when the app uses Supabase and its migrations are in supabase/migrations in a public GitHub repo. See Bolt apps and Replit apps.
  • Code reads any public repo and its whole git history for leaked keys and risky patterns.
  • Live posture grades the public home page’s HTTPS, headers and cookies daily, on a domain your team has verified.

Not covered yet. PatchLabs does not test API routes or non-Supabase databases, and private repos wait for its GitHub App. For a server-side database, the checklist above is your check. We publish no Bolt or Replit numbers, because the study did not sample them.

Questions people ask

Does Bolt use Supabase?

Bolt’s help centre lists Supabase as a database option, selectable at project creation on a Pro or Teams plan, and also describes a built-in database. The page we read does not say what the built-in database runs on, so check which one your project uses.

Does Replit use Supabase?

Replit’s docs describe its own database, backed by a fully-managed PostgreSQL database, and a connector for an external PostgreSQL database. Some Replit apps use Supabase anyway, and then Supabase’s row level security applies.

Are secrets in Replit safe?

Replit’s Secrets tool stores and encrypts them. Hard-coding them into a public project or repo can expose them, and collaborators can see their values. Keep them in the tool, not in code.

Can PatchLabs check my Replit app?

The key and code scan runs on any public repo. The database lab needs Supabase migrations, so it cannot run on Replit’s built-in database yet. PatchLabs does not test API routes.

Is a Bolt app less secure than a Lovable app?

We have no data to say so. The study sampled Lovable and Supabase repos only. A Bolt app on Supabase relies on the same row level security rules and has the same ways to leak.

Sources

The checks behind this guide, each with example code, a self-check and the fix.

Free check

Check your app for this, free.

Paste your public repo. PatchLabs rebuilds your database from its migrations, tests it as a visitor, a stranger and the owner, reads the code for keys and risky patterns, and hands you the fix.

First app free, fixes includedNever touches your database

Written by Manraj Singh Dhillon. Last checked 11 Nov 2026. Code samples are synthetic and run against your own project; nothing here names a real app. Spotted a mistake? Tell us.