← Documentation

Secrets leaked in GitHub

What to do when a key is found in your repository.

Act in this order

1) Revoke or rotate the key at the provider (Stripe, Supabase, OpenAI…) first: deleting the file is not enough, the key stays in Git history and may already be copied. 2) Put the new key in your host’s secret settings, never in code. 3) Check the provider’s logs for unusual use.

Prevent it

Add .env files to .gitignore, enable GitHub secret scanning and push protection (free on public repositories), and keep server-only keys out of variables exposed to the browser (VITE_, NEXT_PUBLIC_). Hackaiz shows found secrets masked in reports and never stores their full value.

Is your AI app protected?

Create your account with free credits, prove your domain, then get a report with evidence and priorities.

Cleaning history

Rewriting Git history (for example with git filter-repo) removes the value from future clones, but never replaces rotation: forks and copies may already exist.

Which keys are most serious

Payment keys, database service keys and cloud provider keys give direct access to money or data. Public keys meant for the browser (such as a Supabase publishable key) are not secrets by themselves, but must be combined with proper access rules.

Fix with Hackaiz

For an eligible finding, Hackaiz can prepare a fix draft that moves the key to server configuration. You review and approve it; it is never merged automatically, and you must still rotate the key yourself.

Is your AI app protected?

Create your account with free credits, prove your domain, then get a report with evidence and priorities.

Sources and further reading

These publications describe related practices and standards. They do not certify your platform or imply that Hackaiz executes every documented method.