#070Technical1 min
Spot exposed secrets and environment variables
Where secrets leak most often and how to rotate them cleanly.
Hackaiz team · updated 20/11/2026

01Where secrets leak most often
In AI-built apps, leaks often come from a browser-prefixed environment variable (VITE_, NEXT_PUBLIC_, EXPO_PUBLIC_) that actually holds a secret key, a direct call to an AI service from the page, a .env file published in the repository, or a key pasted into a component “to test quickly”. Anything bundled into browser code can be read by any visitor.
02Complementary authorized analyses
Website analysis requires DNS TXT or HTTPS-file proof and explicit authorization for the exact domain. Repository analysis requires verified GitHub App access. For a Supabase database, use an authorized read-only connection. No website audit without proof is offered.
03Replace a secret properly
Move the sensitive call server-side: a server function receives the browser request, adds the secret key read from the server environment and returns only the useful result. Then remove the browser prefix from the variable, revoke the old key at the provider and redeploy.
04Limits to know
A report without findings does not prove the absence of secrets: it describes examined assets. Inaccessible assets remain outside coverage. Monitoring is optional: eligible GitHub repositories and websites/APIs, current authorization and sufficient credits. A database alone is not eligible.
Frequently asked questions
Take the next step
Was this article helpful?