Coding agent

How to security test an app built with Replit Agent

Updated

Replit Agent gets a running app quickly, so its defaults are the risk: a development server exposed, debug output on, and secrets written into files the app serves. Test the deployed port for dev routes and the repo for credentials.

Where this class of bug actually lives in Replit Agent output

  • Dev server settings. Debug mode, CORS wildcard and a permissive proxy that were right for the editor and wrong for the deployment.
  • Unguarded routes. Admin and debug endpoints added to inspect the app during development and never removed.
  • Secrets in files. A .env or a hardcoded value that ends up served, or in a repo the deployment clones.
  • Database defaults. A local SQLite or an open Postgres with no auth, reachable if the port is exposed.

What to try first

  1. Hit the deployed host for /debug, /admin, /console, /api/health and /static/.
  2. Trigger an error and look for a stack trace or a debugger page in the response.
  3. Scan the repo and the served assets for credentials.
  4. Check every route with no session, then with a second account's id.

A reproduction you can keep

Two probes: dev leftovers, then a secret scan of what is served.

Dev leftovers and served secrets
for p in /debug /admin /console /api/debug /env; do
  printf '%-14s ' "$p"; curl -sS -o /dev/null -w '%{http_code}\n' "https://<app>.replit.app$p"
done

curl -sS https://<app>.replit.app/ | grep -oE '(sk-|postgres://|DATABASE_URL)[^"< ]*' | head

# vulnerable: 200 on /debug or /admin; a connection string in the HTML
# fixed: 404 on every one of those paths, no credential in any response

What "fixed" has to look like

Turn off debug and the interactive console for the deployed environment, delete or guard the development routes, and keep secrets in the platform's secret store rather than a file the app can serve. Verify by re-probing the paths and re-scanning the response bodies.

Where people get this wrong

  • The editor's preview being reachable is not the same as the deployment being configured for production.
  • A secret in a file is fine until something serves the directory; check what the static handler exposes.
  • Debug consoles are remote code execution, not an information leak.

What Offense does here

Offense runs an agent swarm against your app in a disposable sandbox, keeps the request, the identity and the vulnerable response as evidence, and replays the same attack after the fix so the retest is a control comparison rather than a green check. It does not read your source and it does not patch your code: the finding goes to your coding agent with the reproduction attached. The hosted workspace is invite-only — join the waitlist — and the free dependency audit in /install needs no account.

Questions this page answers

What is the first thing to check on a Replit deployment?

Whether development-only routes and debug mode are reachable on the public host.

Are secrets stored in the workspace safe?

Only if the app cannot serve the file and the repo is private. Prefer the platform's secret manager.

Written by Offense Research, reviewed December 2, 2026. Correct something? Email imran@offenseresearch.com.