leaked secret
A password, token or key that has been exposed, for example by being committed to a repository, and must be treated as known to others.
Anyone with any copy of the history can use the secret until it is rotated.
In more detail
Deleting the file or untracking it does not help, because copies, logs or history still hold the value. The fix is to revoke or rotate the secret so the old value stops working, then work out how it leaked.
Example
A token committed to Git stays in every earlier commit and every clone.Related terms
- secret — Any value that grants access, such as a password, access token or private key, and must be kept out of code and version control.
- git rm — The command that removes a file from the staging area, and from disk unless you add --cached, so the next commit stops tracking it.
- rewriting history — Replacing existing commits with new ones, for example with amend, rebase or reset, which gives them new IDs.
Taught in
- Ignoring Files, And The Tracked File Trap — Advanced Git Internals & Distributed Workflows