# Is my Replit app secure? Checks to run before you publish

Canonical: https://caelo.sh/guides/is-my-replit-app-secure
Published: 2026-11-27 · Updated: 2026-11-27 · Arthi Arumugam, Caelo by Irth Labs

**Short answer:** Replit protects the platform side: Secrets are encrypted, a published app gets its own production database on current infrastructure, and Security Center runs a free dependency scan. It does not decide who may read which data in your app. Before you publish, check for hardcoded keys, a server-side sign-in check on every route, and the app's access setting.

## Why does a Replit app still need a check?

Replit's own security docs say AI-generated code still needs review, especially around authentication, database queries, secrets and data handling. In a 2026 preprint of 200 vibe-coded apps, broken access control was the most common problem, found in 64% of the apps (the study covered apps built with Claude Code and Lovable, not Replit). Access control means who is allowed to read or change which data, and only you know those rules for your app.

## The pre-publish check

1. Hardcoded keys. Open the Shell and search your code: `grep -rnE "sk_live_|sk-[A-Za-z0-9_-]{20,}|AKIA[0-9A-Z]{16}|service_role" --exclude-dir=node_modules --exclude-dir=.git .` Any real key in a file belongs in the Secrets tool instead (Tools, then Secrets under Setup). Replit's docs name public projects, copy-paste, public repositories and screen sharing as the ways hardcoded keys leak.
2. Keys in the browser. If your frontend uses Vite, every variable that starts with `VITE_` is bundled into the JavaScript each visitor downloads. Search your code for `VITE_` and make sure none holds a secret. Then open your published app, open the browser's developer tools, and search the loaded scripts for `sk_`, `secret` and `service_role`.
3. Production secrets. Open Publishing, select Adjust settings, and review the deployment secrets. Replit syncs secrets from your development environment to the published app when you publish or republish, so confirm production uses your live keys on purpose, and that test keys and live keys are not mixed up.
4. Who can open the app. In Publishing, check the Sharing option. Apps in a personal workspace default to Public, meaning anyone with the URL can use them. For an internal tool, choose Password protected, Workspace only or Invite only. To change it on a live app you have to unpublish first.
5. Server-side checks on every route. Your server code is what decides who can read what. For each API route that returns or changes private data, sign out and call it directly, for example `curl -i https://your-app.replit.app/api/orders`. You should get a 401 or 403, never data. Then sign in as a second test user and try to read the first user's records by changing an id in the URL.
6. Production data. On Replit's current infrastructure the published app uses a separate production database (older apps on the legacy Neon setup may need it created in the publish settings). Only copy development data into it if that data is safe for the live app: Replit warns it can include test accounts and sample records. If a production connection string was ever pasted somewhere public, regenerate its credentials in the Database tool (Production Database, Settings, Advanced).
7. Run the scans. In Tools, open Security Center. Level 1 is free and checks your dependencies; Level 2, on paid plans, adds an Agent review of your source code. In the publish settings (Replit's docs call the section Advanced in one place and Adjust settings in another), turn on Block publishing of critical vulnerabilities. Replit notes that a clean dependency scan does not mean your own code has no vulnerabilities.

## What does Replit protect, and what is still your job?

| Area | Replit does this | Still your job |
| --- | --- | --- |
| Secrets | Encrypts Secrets (AES-256 at rest, TLS in transit) and exposes them to your code as environment variables. | Never hardcode a key or put one behind `VITE_`. Choose collaborators carefully: Multiplayer collaborators can see secret values, and organization members without the Owner role can still print them as environment variables. |
| Databases | Gives the published app its own production database. Agent can read production through a read replica but cannot change it. | Write the server-side checks that keep each user to their own rows. |
| Access to the app | Offers Public, Password protected, Workspace only and Invite only. | Pick the right one. Personal workspace apps default to Public. |
| Packages | Package Firewall blocks malicious and compromised packages at install time, on by default. | Act on dependency findings and republish. |
| Code review | Security Center scans, with an Agent source-code review on paid plans. | Review the findings, test sign-in and data access yourself, and rerun after fixes. |

## If you find a problem

Rotate any exposed key at the provider first, then move it into Secrets (see our guide on leaked keys). Fix the route, republish, and repeat the signed-out and second-user tests.

Or have it checked: the Irth Labs App Health Check is $490, a written report within 48 hours with a fixed repair price.

## Check your own app

1. Run the free local check: `npx caelo .` Caelo is a free, open source (MIT) command line tool and MCP server from Irth Labs that checks the files of an AI-built app for exposed API keys, Supabase and Firebase misconfigurations and `.env` files with real values. It runs on your machine, uploads nothing and uses no AI model. Each finding comes with a plain-English fix.
2. Follow the fix in the report and rerun Caelo. For an untracked, unignored file containing secrets, preview the US$19 quick fix. https://caelo.sh/fix
3. For an engineer's assessment, book the US$490 App Health Check. Irth Labs delivers a report and fixed repair quote, with credit toward the repair. https://www.irthlabs.com/start?service=app-health-check

## Questions

### Can people who remix my Replit app see my secrets?

They can see the names, not the values. Replit's docs show that a non-owner remixing your project, or anyone remixing from the cover page, sees secret names but not values. Multiplayer collaborators and owners can see values.

### Is my Replit DATABASE_URL a secret?

On Replit's current infrastructure, the development `DATABASE_URL` is scoped to your app, and Replit says it cannot be used by anyone else even if leaked. On the legacy Neon development database it contains real credentials, so never share it. Treat a production connection string like a password: it works from any PostgreSQL client.

### Does Replit's security scan mean my app is safe?

It helps, but Replit's own docs say a scan is not a complete security review, and a passing publish check does not mean your code has no vulnerabilities. Use it alongside your own signed-out and second-user tests.

### Is Replit itself insecure?

This is about the apps built on it, not the platform. The same checks apply to Lovable, Bolt, Cursor and v0 apps.

## Sources

- [Replit docs: Secrets.](https://docs.replit.com/core-concepts/project-editor/app-setup/secrets)
- [Replit docs: Publishing.](https://docs.replit.com/features/publishing/overview)
- [Replit docs: Who can access your app.](https://docs.replit.com/features/publishing/private-deployments)
- [Replit docs: Development and production databases.](https://docs.replit.com/features/data-and-storage/development-and-production)
- [Replit docs: Database connection details.](https://docs.replit.com/features/data-and-storage/connection-details)
- [Replit docs: Security.](https://docs.replit.com/features/security/overview)
- [Replit docs: Security scan levels.](https://docs.replit.com/features/security/security-scan-levels)
- [Replit docs: Agent security scans.](https://docs.replit.com/features/security/agent-security-scans)
- [Vite docs: Env variables and modes.](https://vite.dev/guide/env-and-mode)
- [Deng, Fan and Meng, 2026. Understanding the (In)Security of Vibe-Coded Applications. Preprint.](https://arxiv.org/abs/2606.23130)

## Related guides

- [Is my Lovable app secure? A 15-minute self-check](https://caelo.sh/guides/is-my-lovable-app-secure)
- [I leaked an API key or the Supabase service_role key. What do I do now?](https://caelo.sh/guides/leaked-api-key-what-to-do)
- [Security checklist for apps built with Lovable, Bolt, Cursor, Replit or v0](https://caelo.sh/guides/vibe-coded-app-security-checklist)
- [Is my v0 app secure? A check for v0 apps on Vercel](https://caelo.sh/guides/is-my-v0-app-secure)
- [AI app builder security defaults, compared from their own docs (Nov 2026)](https://caelo.sh/guides/ai-app-builder-security-defaults-compared)
- [Committed your .env file to GitHub? What to do, in order](https://caelo.sh/guides/env-file-committed-to-github)
- [How to rate limit API routes in an AI app, and cap your model bill](https://caelo.sh/guides/rate-limit-ai-app-api-routes)
