Not Publishing Your Key
The rules are short.
Not in source code. Not in git. Not in frontend JavaScript.
Read it from the environment. Add the file that holds it to .gitignore before you create the file, because the dangerous window is between creating it and remembering.
✦ If it reaches a public repository, rotate it
Deleting the commit does not help. The history is public and has already been cloned, mirrored and indexed by machines that never forget. Rotating the key takes a minute and is the only action that actually works.
Mark this lesson complete
Signed in, your progress follows you to every device.