GitHub Secret Scanning
github.com
- Free plan
- Web
- API
- Self-hosted
What GitHub Secret Scanning is
GitHub Secret Scanning detects exposed credentials so they can be secured before misuse. It scans every branch in Git history, plus issue and pull request content, discussions, wikis, and secret gists. When a credential leak is found, GitHub places an alert in the repository’s Security and quality tab with details about the exposed credential. Push protection can block secrets before they enter code. Organizations can define regular-expression patterns for their own secrets, while generic patterns cover private keys, connection strings, and generic API keys. AI detection can identify unstructured secrets such as passwords. Validity checks may contact an issuing service to determine whether a credential is still active, and provider partners may validate findings or take action such as revocation. Scanning runs automatically and free on public repositories. Organization-owned private and internal repositories can use it with GitHub Secret Protection on Team or Enterprise Cloud; Enterprise Server supports user-owned repositories with that protection enabled. API, web, and self-hosted options are listed, with hybrid deployment.
Who it suits
Secret Scanning suits development and security teams responsible for credentials across repositories and related GitHub content. It also fits organizations needing custom patterns, provider checks, or self-hosted deployment.
Good to know, and what to watch
- Scans all branches across Git history
- Push protection blocks secrets before code
- Custom regular-expression patterns
- AI detection for unstructured secrets
- Free automatic scanning for public repositories
- Private repositories require Secret Protection
- Paid plan costs $19 per active committer monthly
- Validity checks may contact issuing services
Plans
Every plan and priceGitHub Secret Protection
Free plan
The verdict
GitHub Secret Scanning covers repository history and collaboration content, with alerts, blocking, custom detection, and validity checks. Public repositories receive free automatic scanning, while private and internal use depends on Secret Protection plans.
What the maker publishes
- AI detection
- AI-detected secrets can identify unstructured secrets such as passwords. source
- Alerts
- When it detects a credential leak, GitHub creates an alert on the repository’s Security and quality tab with details about the exposed credential. source
- Custom patterns
- Organizations can define regular expressions to detect organization-specific secrets not covered by default patterns. source
- Enterprise option
- GitHub Enterprise Server supports secret scanning for user-owned repositories when the enterprise has GitHub Secret Protection enabled. source
- Founded
- 2008 source
- Generic patterns
- Generic patterns can detect secrets not tied to a specific provider, including private keys, connection strings, and generic API keys. source
- Headquarters
- San Francisco, California, United States source
- Private repository access
- Organization-owned private and internal repositories can use secret scanning with GitHub Secret Protection enabled on GitHub Team or GitHub Enterprise Cloud. source
- Provider integration
- GitHub partners with service providers to validate detected secrets and may notify a provider so it can take action, such as revoking the credential. source
- Public monitoring
- An enterprise can enable public monitoring to detect secrets its members leak in public repositories across GitHub. source
- Public repositories
- Secret scanning runs automatically for free on public repositories. source
- Purpose
- Secret scanning automatically detects exposed credentials so they can be secured before they are exploited. source
- Push protection
- Push protection proactively blocks secrets before they reach code. source
- Scan coverage
- It scans all branches across Git history and also scans issue and pull request content, discussions, wikis, and secret gists. source
- Validity checks
- Validity checks determine whether a detected secret is still active and may contact its issuing service to check whether it was revoked. source
Checked against the maker's pages on 4 Oct 2026.