Security · Git
Removing a secret from Git history
A key was committed. Revoke it, remove it from the history with git-filter-repo, clean up GitHub and block the next leak.
Guide · Security
If your code sent a key, token, password or session cookie to example-petstore.com or example-commerce-host.com, it reached a server you do not control. Treat it as exposed and replace it. Only the service that issued it can revoke it.
| Provider | What to revoke | Where |
|---|---|---|
| GitHub | Personal access tokens | Managing your personal access tokens |
| Google Cloud | API keys, service account keys | Manage API keys · Respond to compromised credentials |
| AWS | IAM access keys | Manage access keys for IAM users |
| Stripe | Secret and restricted keys | API keys |
| Slack | Bot and user tokens | auth.revoke |
| Anthropic | API keys | API key best practices |
| OpenAI | API keys | Best practices for API key safety |
| Other services | Any key, token or password | The security or API settings of that service; search its documentation for “revoke” or “rotate”. |
Committed the key to Git as well? Removing a secret from Git history