A v0-generated interface can look production-ready while its server actions, database policies or integration handlers still need review. Start with the actual code and deployment settings rather than the appearance of the preview.

1. Follow each secret to its use

The v0 security documentation describes Next.js’s distinction between server-side environment variables and variables prefixed NEXT_PUBLIC_, which are exposed to the browser. Store credentials on the server and verify how the generated code uses them.

List references to process.env, identify which modules run in the client and inspect the production bundle. A server variable can still leak through serialization, a response body or a log. Move provider calls behind a server handler that authenticates callers and enforces the intended limits.

2. Treat server actions as entry points

For every mutation, establish the caller’s identity on the server. Derive record ownership from the authenticated session. Do not trust a client-supplied userId, role, price or tenant identifier.

Test the action directly with signed-out and lower-privilege callers. Test object ownership with two accounts and synthetic records. The UI’s visibility rules should agree with the server, but the server is the boundary that must hold.

3. Review connected databases

Check the database role used by each server handler. Broad administrative credentials deserve a narrow, reviewed path. If the app uses Supabase, review row-level policies and storage access using the Supabase security guide.

Trace data returned to the client. Return the fields the screen actually needs; avoid returning an entire user or account object because it was convenient for the generated component.

4. Check Vercel environments and the public deployment

Verify the environment values selected for production and previews. Test with separate external-service accounts or keys where practical. A public preview should not accidentally operate your live payments or expose customer records.

Run the production build, open its deployed URL in a fresh session and test each protected action. Exercise error responses from email, AI, payment and database services. Confirm the response does not say success after the work failed.

5. Give the agent concrete findings

npx @neuralaxis/vibedoctor scan --full --report agent-json

Run VibeDoctor against the exported or synchronized repository. It can surface secrets, applicable security rules, flow problems and privacy signals; it cannot prove your deployed authorization policies are correct. Check scan completeness, reproduce the finding and ask the agent for a focused repair with a regression test.

Use this prompt after identifying a specific failing request:

Fix this server action so identity and ownership are checked on the server. Keep the UI behavior intact. Add tests for signed-out access and a different user’s record. Show the changed files and the test result.

Review the diff, rerun the failing request and keep the evidence with the commit. Continue with the full security test sequence.