Get new issues of The GitHub Insider in your inbox. Sign up now →
The GitHub Insider
Learn how to keep secrets safe with GitHub. ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ ͏‌ 
GitHub

In 2024, developers across GitHub used secret scanning to detect more than 39 million leaked secrets in their repositories, while push protection prevented 4 million more from being leaked in the first place.

And that was before this month’s launch of GitHub Secret Protection that combines secret scanning, push protection, and AI-detected passwords to serve even more developers like you.

Maybe you haven’t run into a “Possible valid secrets detected” alert yet. Or perhaps you have and weren’t quite sure what to do. That’s what we’re here for.

In this edition of The GitHub Insider, we’re going to learn about secrets—what they are, why they matter, and how GitHub can help you keep them secure.

Not only that, we’ll give you some resources to get some hands-on experience with securing those secrets, so it isn’t just theoretical.

🔑 What’s a "secret"?

In software, a secret is sensitive information used to authenticate or authorize access to systems, services, data, and APIs. Common examples include:

🚨 Why protecting your secrets matters

Do you (intentionally) leave your house keys dangling in the door? No?

Well, you shouldn’t leave your secrets out for everyone to see either. Here’s why:

Think of a secret as your digital identity—if someone has it, they can do anything you can.

🛡️ Best practices for managing secrets

Here’s how you can prevent leaks and minimize damage if exposure occurs:

1. Follow the Principle of Least Privilege (PoLP):

2. Secure handling in applications:

3. Respond swiftly if exposed:

🛠️ Practice safely storing secrets

Now that you have an understanding of the basics, it’s time to put that knowledge into practice. Thankfully, we have several resources that can help you get your hands dirty without putting yourself at risk.

1️⃣ Get some practice safely storing a secret for GitHub Actions and find out first hand how push protection prevents you from committing a secret to a public repository.

2️⃣ Get an introduction to secret scanning, where you’ll see how GitHub can help you identify plain-text credentials in your repository and prevent them from being exposed on GitHub in future pushes.

3️⃣ Take your security skills to the next level with the GitHub Security Lab’s Secure Code Game. Learn to spot and fix vulnerable patterns in real-world code, build security into your workflows, and understand security alerts generated against your code, in an in-repo learning experience.

That’s it for now! Secrets might sound scary, but with the right habits and GitHub’s built-in tools, you’ve got this. Treat your tokens like you’d treat your house keys, and you’ll stay one step ahead of the baddies.

Stay safe out there, and see you in the pull requests.

Get started with GitHub Secret Protection


✨ This newsletter was written by Mike Melanson and produced by Gwen Davis. ✨

More to explore 🌎



Intro to secret leaks

Have your secrets leaked? Learn about what you can do to mitigate risk—and stop secrets from leaking in the first place.

Watch now



Join our GitHub code security conversations 🤖

Visit our community forum to see what people are saying + offer your own two cents.

Visit now



Stay updated on GitHub products 📦

Discover the latest ships, launches, and improvements in our Changelog.

Visit now



Subscribe to our LinkedIn newsletter 🚀

Do your best work on GitHub. Subscribe to our LinkedIn newsletter, Branching Out_.

Sign up now




GitHub

The world’s leading AI-powered developer platform.