SCAN YOUR EMERGENT APP FOR VULNERABILITIES
ENTER YOUR EMERGENT APP URL
Enter your deployed app URL to check for security vulnerabilities.
Emergent’s agent builds and deploys full-stack apps from a single prompt — typically a React frontend, a FastAPI (Python) backend, and MongoDB — and ends the session with a live public URL. That last part is the security context in one sentence: the agent takes you from prompt to deployed public URL in a single session, so there is no natural pause where hardening happens.
The app is exposed before anyone has hardened it. Agentic generation optimizes for “this works end to end,” and the code that results consistently ships MongoDB queries with no per-user scoping, JWT auth with a weak or hardcoded signing secret, FastAPI routes without auth dependencies, no rate limiting, and error responses that leak the stack. Each is a small fix; none is fixed by default; all of them are live the moment the session ends.
That timing is exactly why a black-box scan belongs in the loop. The discipline that closes the gap is simple — the URL is not shareable until it has been scanned. A scanner exercises the deployment the way an attacker would, so you find the unscoped queries and open routes before the link circulates rather than after.
Common vulnerabilities we find in Emergent apps
Unscoped database access (BOLA)
Agent-generated CRUD queries MongoDB by document ID without checking ownership: db.notes.find_one({"_id": ObjectId(note_id)}). Sign in as user B, replay a request carrying user A’s note_id, and you read user A’s document. This is BOLA in AI-generated CRUD, the most common finding in agent-built backends. The fix is a compound filter — {"_id": ObjectId(note_id), "user_id": user.id} — applied to reads, updates, and deletes alike.
Weak JWT configuration
The recurring pattern is a weak or hardcoded signing secret (SECRET_KEY = "secret" or a value the agent invented and committed) paired with long-lived tokens. Anyone who reads or guesses the secret can forge a token for any user, including an admin. The fix is a 32+ byte random secret from environment config, a pinned decode algorithm (algorithms=["HS256"], never alg: none), and a token lifetime of hours, not weeks. See JWT alg:none and kid traversal.
Unauthenticated API endpoints
FastAPI routes are public unless a dependency gates them, and generated routers often skip the dependency on half their endpoints — especially routers the agent generated later in the session. Anyone with the URL can call them. The fix is to attach the auth dependency at the router level (APIRouter(dependencies=[Depends(get_current_user)])) so a forgotten route fails closed, then enumerate app.routes and confirm nothing data-returning sits outside a gated router.
Missing rate limiting
Generated backends accept unlimited requests. The two surfaces that matter most are auth endpoints (open to credential stuffing) and LLM-backed endpoints running on your API key (open to bill-running abuse — one scripted user drains the account). The fix is middleware-level per-IP limits plus a per-user quota on expensive calls, added before the URL is shared.
Hardcoded secrets
Keys pasted mid-session — OpenAI, Stripe, Mongo connection strings — become string literals in server.py or a committed .env, and anything referenced in frontend code ships in the public React bundle. The fix is to move everything to environment configuration in the platform’s settings and rotate anything that ever appeared in source. The Token Leak Checker runs the deployed-bundle pass for you.
Information disclosure
Generated except Exception as e: return {"error": str(e)} handlers leak Mongo error strings, file paths, package versions, and internal hostnames straight to the client. The fix is one global exception handler that logs server-side and returns {"detail": "Internal server error"}, plus confirming production does not run with debug tracebacks or --reload.
How VibeEval works with Emergent
- Enter your Emergent app URL. The deployment is live from the end of the build session, so the scan runs against the same public URL you are about to share.
- The agent probes the app in the browser. It maps the FastAPI endpoints from the frontend’s network traffic, calls each one logged out to find open routes, replays requests across two accounts to catch unscoped Mongo queries, tests JWT handling, hammers auth and LLM endpoints for missing rate limits, and greps the bundle for hardcoded secrets.
- You get a report you can act on. Each finding carries a severity, the request that demonstrates it, and a paste-ready remediation prompt you can drop straight back into the Emergent agent — the fixes are ordinary Python the agent can apply in one shot.
Manual testing vs VibeEval
| Dimension | Manual review | VibeEval scan |
|---|---|---|
| Time per full pass | Hours reading FastAPI and Mongo code | Minutes against the deployed URL |
| Unscoped-query (BOLA) coverage | Tedious two-account replay per collection | Automated across ID-keyed routes |
| Open-route coverage | Depends on auditing every router | Enumerates and calls every endpoint |
| Re-run after each agent rebuild | Rarely happens between sessions | One click, before every share |
| JWT / rate-limit / secret checks | Manual inspection | Checked every pass |
| Business-logic correctness | Strong — a human understands intent | Not a substitute; scanner flags shapes, not intent |
Manual review is still needed for logic the scanner cannot reason about. But because the agent rebuilds and redeploys in one session, the mechanical checks — scoping, open routes, JWT, secrets — need re-running every time, and that repeatability is where the scanner earns its place.
Frequently asked questions
Does VibeEval have special support for Emergent?
Yes. VibeEval recognizes the React + FastAPI + MongoDB patterns Emergent’s agent generates and tests for the corresponding vulnerabilities — unscoped queries, JWT weaknesses, open routes, and missing rate limits.
When should I scan an Emergent app?
Immediately after the agent deploys and before you share the public URL. The app is live from the end of the build session, so the scan is the gate between “deployed” and “shared” — that window is where incidents concentrate.
What authentication issues are most common in Emergent apps?
Weak or hardcoded JWT signing secrets, long-lived tokens, routes missing an auth dependency, and missing ownership checks on ID-keyed MongoDB queries. All four are backend-code-level and all four are scriptable to find.
Can I paste VibeEval’s fixes back into the Emergent agent?
Yes. Each finding ships with a remediation prompt written for exactly that. The fixes are ordinary FastAPI and Mongo changes, so the agent can apply them if you feed the finding back as a prompt — then re-scan to confirm.
Related Emergent resources
- How to Secure Emergent — the step-by-step hardening guide behind these checks.
- Is Emergent Safe? — in-depth analysis of the agent’s defaults and the prompt-to-public-URL window.
- Emergent Security Checklist — the pre-launch checklist version.
- Token Leak Checker — find exposed API keys in your deployed bundle.
- JWT alg:none and kid traversal — the token-forging failure modes in depth.
Test your Emergent app before launch
Run VibeEval against your deployed Emergent URL for the BOLA, weak-JWT, open-route, and credential-leak patterns the agent most often leaves in. Scan before the public URL leaves your hands.
SCAN YOUR APP
14-day trial. No card. Results in under 60 seconds.