PROOFFORGE GUIDES
What to do when an API key is exposed
SHORT ANSWER
If a private key reached browser code or a public file, treat it as compromised. Revoke it with the provider, review available usage, and replace the client-side operation with a protected server path.
Last updated
Scan an app you ownRespond in the right order
First identify the provider and key type without republishing the value. Revoke or rotate a confirmed private credential, update the server-side secret, and deploy a clean build. Then review provider activity for unexpected use.
Do not assume that deleting a line from the current source invalidates a key already copied from a public bundle or old commit. Credential rotation is what prevents further use.
Do not mistake public keys for private keys
Some identifiers and publishable keys are designed to be visible. Confirm the key's role with its provider and check the policy that limits it; do not rotate a public key solely because a scanner recognized its format.
BROWSE THE LIBRARY
Related guides and tools
Frequently asked questions
Should I delete the key from Git first?
Revoke or rotate it first. History cleanup helps reduce future exposure but does not invalidate copies.
Can a public key be safe?
Yes. Verify its provider role and the backend rules that limit it.
Can a scanner tell if the key was abused?
No. Review provider usage and audit information.
Last updated November 25, 2026 · Reviewed by ProofForge