Is my Replit app secure? A pre-launch security checklist for Replit apps
Last updated · By Ember, SniffPup
Short answer: not automatically, but Replit gives you good tools. It scans before you publish, checks your dependencies for known vulnerabilities, and its Security Center can review your code. Those checks look inside your project. Once your app is live, every visitor can also read what it sends to the browser, so check that from the outside too.
Replit app security check in 3 steps
- Run Replit's checks. Open Tools → Security Center, run a scan, and fix the critical and high findings (details).
- Test signed out. Open your API routes and data in a private window and make sure strangers get nothing private back (how).
- Scan what the public sees. Run a free SniffPup scan on your published URL (your
replit.appaddress or custom domain).
SniffPup looks at your site the way a stranger would: secret keys in your HTML and same-origin JavaScript (masked in the report), public /.env and /.git files, a downloadable source map, missing security headers, cookie flags and HTTPS. It gives your site a 0–100 score. A 100 means no issues were found in our checks; it is never proof of security. Every critical issue comes with its full fix and a fix prompt you can paste into Replit Agent, free (with no critical, one other fix is free). It's passive: no logins, no attack traffic, and it never uses a secret key it finds. Then work through the steps below for the things no outside scan can see.
1. Run Replit's own security checks first
Replit has several layers, and they look at different things (Replit docs):
- While you build: Replit reviews the files Agent changes for common insecure patterns and hardcoded secrets. It's a lightweight check, not a full review.
- Dependency scans: free and automatic. When a new CVE is published, Replit checks it against your packages and shows matches in the Security pane.
- Publish check: Replit always runs a security scan before publishing. Turn on Block publishing of critical vulnerabilities (under Adjust settings when you publish) so a critical finding stops the release instead of just being listed (source).
- Security Center scans: Level 1 checks dependencies and is free. Level 2 adds an Agent review of your source code and needs a paid plan. Level 3 adds a black-box test of your running Preview and has extra requirements (scan levels).
Review each finding before you send it to Agent, then rerun the scan and republish: fixes don't reach your live app until you do. Replit's own docs say a passing publish check is not a guarantee, and no scan guarantees that an app is secure.
2. Keep every key in Secrets, and on the server
- Put API keys, tokens and database connection strings in the Secrets tool (Tools → Secrets), never in your code. Don't put them in Configurations either; Replit says those are for non-sensitive settings (source).
- Secrets reach your server code as environment variables. If your frontend is built with Vite, any variable named
VITE_...is copied into the JavaScript every visitor downloads. Only public values belong there. - Replit's docs say Secrets work for every deployment type except Static Deployments. If your app is static and needs a paid API key, that key will end up in the browser. Move the call to a server route instead.
- Check Production app secrets (Publishing → Adjust settings) so your live app uses the keys you expect, especially if you use different keys for testing and production.
Paste this into Replit Agent:
Find every API key, token, password or database URL in this project's code and frontend env variables. Move each one into Replit Secrets, read it only in server-side code, and make sure the browser never receives it. List what you moved.
If a secret key has already been in your code, a public repo or the browser, rotate it at the provider. See what to do after leaking an API key.
3. Know who can see your Secrets
Per Replit's Secrets docs, Multiplayer collaborators can see secret values. Someone remixing your project who isn't an owner or collaborator sees the names but not the values. Organization members without the Owner role can't view values in the Secrets tool, but can read them by printing environment variables. Only invite people you'd trust with the keys.
4. Test your API and data signed out
Many Replit apps have their own server and a database (Replit adds a DATABASE_URL secret when you add its database). An outside scanner can't see whether your API checks who is asking, so try it yourself:
- Open DevTools → Network while you use your app signed in, and note the API routes it calls.
- Open those routes in a private window, signed out. You should get an error or nothing private, never other users' data.
- Sign in as a second test user and try to load the first user's records by changing an ID in the URL. It should fail.
If your app uses Supabase, also turn on Row Level Security for every table and test it with only your public anon key. See the Supabase RLS checker guide.
5. Pick the right app access
When you publish, Replit asks who can access your app: Public, Password protected, Workspace only or Invite only (source). If the app is an internal tool or still in testing, a private option keeps strangers out entirely. Your development URL on replit.dev is different from your published URL, so check the published one.
6. Check what your published site exposes
- Public
/.envor/.git/configfiles (you should get a 404 or your app's normal page, never file contents) - A public JavaScript source map, which can hand out your original code
- Missing security headers (Content-Security-Policy, Strict-Transport-Security, X-Frame-Options, X-Content-Type-Options, Referrer-Policy)
- Cookies without Secure, HttpOnly or SameSite flags, and HTTP that doesn't redirect to HTTPS
How to check: add /.env and then /.git/config to the end of your live URL, and look at the response headers in DevTools → Network. A free SniffPup scan checks all of these at once. For headers on their own, try the security headers checker.
Where SniffPup fits
Replit's scans see your code and packages, which an outside scanner can't. SniffPup sees what your published site actually serves to the public, which is what a stranger sees first. See exactly what the scanner does.
What Replit's scans see vs. what an outside scan sees
| Check | Replit Security Center and publish check | Outside scan (like SniffPup) |
|---|---|---|
| Known vulnerabilities in your packages | Yes, automatic | Only outdated JavaScript libraries it can read on the live site |
| Your source code | Level 2 and up (paid plans) | No |
| Fixes problems for you | Yes, via Agent | No; gives fix prompts to paste into Agent |
| Secret keys in the JavaScript your live site serves | Checks code Agent changes for hardcoded secrets | Yes, in what the live site actually sends |
| Public /.env, /.git files and source maps on the live URL | Not listed in Replit's docs | Yes |
| Security headers, cookie flags and HTTPS on the live URL | Not listed in Replit's docs | Yes |
The two work best together: fix what Replit finds, republish, then check what the public sees.
FAQ
How do I check if my Replit app is secure?
Use Replit's own checks and an outside look. In your project's Tools pane, open Security Center and run a scan; leave Replit's publish check on, ideally with Block publishing of critical vulnerabilities turned on. Keep every key in the Secrets tool, test your API routes and data signed out, then scan your published URL to see what it sends to every visitor.
Does Replit scan my app for security problems?
Yes. Replit's docs say it runs a security scan before publishing, reviews the files Agent changes for insecure patterns and hardcoded secrets as you build, and scans your dependencies for known vulnerabilities automatically. Security Center also offers deeper scans: Level 2 adds an Agent review of your code (paid plans) and Level 3 adds a black-box test of your running app. Replit's docs also say no scan guarantees that an app is secure.
Where should I put API keys in a Replit app?
In the Secrets tool, not in your code and not in Configurations. Secrets are encrypted and reach your server code as environment variables. Replit's docs say Secrets work for all deployment types except Static Deployments, so a key that a static site needs ends up in the browser. Call paid APIs from a server route instead.
Can people see my Replit Secrets if they remix my project?
Per Replit's docs, someone who isn't an owner or collaborator can see secret names but not values when they remix your project. Multiplayer collaborators can see values, and organization members without the Owner role can't view values in the Secrets tool but can read them by printing environment variables. Only share access with people you'd trust with the keys.
Can SniffPup scan my Replit app?
Yes, if it is published at a live web URL (a replit.app address or your own domain) and the app's access is set to Public. SniffPup checks what that site serves to any visitor: secrets in HTML and JavaScript, public .env and .git files, source maps, security headers, cookies and HTTPS. It can't see your code, your database or anything behind a login.
Does a clean SniffPup report mean my Replit app is secure?
No. SniffPup checks what is publicly visible on your site. A score of 100 means no issues were found in our checks, never proof of security. Pair it with Replit's Security Center scans and your own signed-out tests.
A clean report is not a guarantee of security, and a 100 score means no issues were found in our checks, not proof of security. Only scan sites you own.