Security and launch check for Replit Agent apps
Updated
A Replit app built with Agent has two PostgreSQL databases, one for development and one for production, and production secrets are set separately in the publishing settings. Before launch, check that the published app reads the production database and production secrets, that API routes check who is calling, and that the code has no hardcoded keys.
What you are running
- Two databases. In the workspace,
DATABASE_URLpoints to the development database. The published app uses a separate production database. - Two sets of secrets. Production secrets live under Publishing settings. The published app runs with
REPLIT_DEPLOYMENT=1, so code can tell where it is. - Legacy shared databases were shut down on June 8, 2026. A published app that suddenly lost its data may still point at one.
What to check
- Which database production uses. If Secrets contains a
DATABASE_URLyou added yourself, or a Supabase connection string, the app may use that instead of Replit’s. - Access control in API routes. Replit apps usually have their own Express or similar backend. Every route that returns user data must check the session and filter by user, there is no database-level policy to catch mistakes.
- Hardcoded keys. Replit now runs a Semgrep scan while Agent builds, but it only catches patterns it knows. Search the code for
sk-andapiKey:yourself. - Database credentials after a leak. Production database credentials can be regenerated from the Database tool, which also redeploys the app.
- Connection limits. Use a pooled connection if the app runs on autoscaling deployments.