Keep your secrets secret
GitHub Secret Protection continuously monitors your GitHub perimeter, helping prevent exposures, protect credentials, and ship securely.

1B+ Developer pushes scanned with push protection in 2025
150+ Industry partners, working together to mitigate risk for the developer community
91M Repositories protected with secret scanning in 2025
Prevent accidental secret exposure across your repositories
Push protection automatically blocks secrets before they reach your repository, keeping code clean without disrupting workflows.

Detect secrets in pull requests, issues, and more, even in public repos outside your enterprise. Enriched metadata like validity checks help prioritize active threats.

GitHub’s purpose-built AI model finds elusive secrets like passwords with surrounding code context. It's precise, fast, and trustworthy enough to run in push protection—adding another layer of protection for your enterprise.

Evaluate exposure to application vulnerabilities and leaked secrets in your codebase with our free risk assessment tool.
Explore GitHub security risk assessments




GitHub partners with 150+ providers to mitigate risks and ensure the highest level of detection accuracy.
Learn about the secret scanning partner program
Safer code for everyone
Whether you're securing an open source project or strengthening your enterprise codebase, Secret Protection helps you keep secrets out of your code.
Resources to get started
Discover developer-first application security
Take an in-depth look at the current state of application security.
Explore the DevSecOps guide
Learn how to build security into your code from day one with DevSecOps.
Avoid AppSec pitfalls
Explore common application security pitfalls and how to avoid them.
Frequently Asked Questions
What is GitHub Secret Protection?
GitHub Secret Protection detects and prevents secret leaks continuously in real-time, proactively blocking sensitive credentials from being pushed to a repository with push protection. With a remarkably low false positive rate and approximately 150 service provider integrations, it enables rapid credential revocation and rotation, enhancing developer productivity.
What is the secret risk assessment?
The secret risk assessment provides a free, comprehensive overview of an organization’s secret leak footprint across its GitHub repositories. By analyzing repositories for exposed secrets, it helps admins and developers understand their exposure to potential security risks and offers actionable insights for remediation. Learn more about GitHub security risk assessments.
What is push protection?
Push protection is designed to prevent sensitive information, such as secrets or tokens, from being pushed to your repository in the first place. It proactively scans your code for secrets during the push process and blocks the push if any are detected.
What is delegated bypass for push protection?
Delegated bypass introduces an approval process for developers to bypass push protection. Anyone opting to bypass a push protection block will need to submit a request to a designated group of reviewers, ensuring any risky secrets are not accidentally leaked.
What are secret scanning validity checks?
Validity checks help you determine whether detected secrets are still active, enabling developers and security teams to prioritize their response effectively. When a secret is flagged, the system verifies its validity to confirm whether the secret is active or inactive.
What is the secret scanning partnership program?
The secret scanning partnership program allows service providers to secure their token formats by enabling GitHub to scan public repositories and npm packages for exposed secrets. When a secret is found in a public repo, GitHub sends an alert directly to the service provider, who can then validate and take appropriate action.
How does secret scanning detect secrets?
GitHub secret scanning detects provider, generic, and custom organization-defined secret types. Provider secrets are tied to a specific secret issuer from GitHub’s secret scanning partnership program. Generic secrets aren’t tied to a specific provider and use both traditional regex and AI-based methods. AI-detected secrets use a purpose-built, fine-tuned model to detect secrets without a recognizable format, optimized for recall and precision.
What is public monitoring?
Public monitoring extends visibility beyond the repositories you control by identifying secrets leaked anywhere across public GitHub and attributing them back to your enterprise using GitHub-specific signals such as enterprise membership and verified domains.