GitHub
docs.github.com › en › rest › secret-scanning › secret-scanning
REST API endpoints for secret scanning - GitHub Docs
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/repos/OWNER/REPO/secret-scanning/alerts/ALERT_NUMBER/locations ... [ { "type": "commit", "details": { "path": "/example/secrets.txt", "start_line": 1, "end_line": 1, "start_column": 1, "end_column": 64, "blob_sha": "af5626b4a114abcb82d63db7c8082c3c4756e51b", "blob_url": "https://api.github.com/repos/octocat/hello-world/git/blobs/af5626b4a114abcb82d63db7c8082c3c4756e51b", "commit_sha": "f14d7debf9775f957cf4f1e8176da0786431f72b", "commit_ur
Home
Get started, troubleshoot, and make the most of GitHub. Documentation for new users, developers, administrators, and all of GitHub's products.
REST API
Create integrations, retrieve data, and automate your workflows with the GitHub REST API.
Quickstart
Learn how to get started with the GitHub REST API.
Authenticating
You can authenticate to the REST API to access more endpoints and have a higher rate limit.
Videos
02:07
GitHub: Enabling and Disabling Secret Scanning - YouTube
04:57
GitHub Secret Scanning: Configure Your Push Protection Patterns ...
47:55
GitHub Secret Scanning - Deep Dive - YouTube
41:26
How code scanning in GitHub Advanced Security burns down security ...
Secret scanning. Cool new features from the GitHub ...
GitHub
docs.github.com › code-security › secret-scanning › about-secret-scanning
About secret scanning - GitHub Docs
GitHub also periodically rescans repositories when new secret types are added. ... When secret scanning detects a credential leak, GitHub generates an alert on your repository's Security and quality tab with details about the exposed credential.
GitHub
github.blog › home › changelogs › secret scanning alerts api now supports hiding secret literals
Secret scanning alerts API now supports hiding secret literals - GitHub Changelog
May 20, 2025 - You can now request secret scanning alerts through the API without exposing the actual secret literals. This new hide_secret query parameter helps reduce risk when working with secret scanning alert…
GitHub
docs.github.com › en › code-security › reference › secret-security › supported-secret-scanning-patterns
Supported secret scanning patterns - GitHub Docs
Available on GitHub Enterprise Server when the enterprise has GitHub Secret Protection enabled. ... User alerts: Reported to users in the Security and quality tab of the repository, when a supported secret is detected in the repository.
GitHub
docs.github.com › en › enterprise-server@3.15 › rest › secret-scanning › secret-scanning
REST API endpoints for secret scanning - GitHub Enterprise Server 3.15 Docs
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2022-11-28" \ http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/secret-scanning/alerts/ALERT_NUMBER/locations
GitHub
docs.github.com › en › enterprise-server@3.4 › rest › secret-scanning
Secret scanning - GitHub Enterprise Server 3.4 Docs
GitHub Apps must have the secret_scanning_alerts read permission to use this endpoint. ... curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/repos/OWNER/REPO/secret-scanning/alerts/ALERT_NUMBER
Actions-cool
actions-cool.github.io › octokit-rest › api › secret-scanning
secretScanning - GitHub Pages
Lists all secret scanning alerts for a private repository, from newest to oldest.
GitHub
docs.github.com › en › code-security › secret-scanning › managing-alerts-from-secret-scanning › resolving-alerts
Resolving alerts from secret scanning - GitHub Docs
The dismissal comment will be added to the alert timeline and can be used as justification during auditing and reporting. You can view the history of all dismissed alerts and dismissal comments in the alert timeline. You can also retrieve or set a comment by using the Secret scanning API.
GitHub
github.blog › home › changelogs › secret scanning rest api responses including first_location_detected and has_more_locations are now generally available
Secret scanning REST API responses including first_location_detected and has_more_locations are now generally available - GitHub Changelog
June 24, 2025 - The secret scanning REST API now returns additional metadata to help you triage alerts more effectively. The new first_location_detected object provides structured location data for the first detected instance of…
GitHub
github.blog › home › changelogs › secret scanning pattern updates and product improvements
Secret scanning pattern updates and product improvements - GitHub Changelog
1 week ago - Team and Topic filters for secret scanning campaigns: Campaigns now support the same team and topic filter options as code scanning campaigns. Provider field and filtering in the alerts API: Alert responses now include provider and provider_slug, with new providers and exclude_providers query parameters on all three list endpoints.
Omi AI
omi.me › blogs › api-guides › how-to-implement-github-secret-scanning-api-to-detect-secrets-in-repos
How to Implement GitHub Secret Scanning API to Detect Secrets in Repos – Omi AI
January 17, 2025 - GitHub Secret Scanning is designed to detect tokens and credentials that might have been accidentally committed into repositories. The API provides automated scans for repository content to identify known secret formats, alerting users so they can rotate keys and revoke any compromised credentials...
GitHub
docs.github.com › en › enterprise-cloud@latest › code-security › secret-scanning › managing-alerts-from-secret-scanning › evaluating-alerts
Evaluating alerts from secret scanning - GitHub Enterprise Cloud Docs
For more information, see REST API endpoints for secret scanning in the REST API documentation. You can also use webhooks to be notified of activity relating to a secret scanning alert.
GitHub
docs.github.com › en › enterprise-cloud@latest › code-security › secret-scanning › managing-alerts-from-secret-scanning › viewing-alerts
Viewing and filtering alerts from secret scanning - GitHub Enterprise Cloud Docs
Optionally, toggle to "Generic" to see alerts for non-provider patterns or generic secrets detected using AI. Under "Secret scanning", click the alert you want to view.
GitHub
docs.github.com › en › code-security › secret-scanning › managing-alerts-from-secret-scanning › about-alerts
About secret scanning alerts - GitHub Docs
Secret scanning is available for the following repository types: ... User alerts: Reported to users in the Security tab of the repository, when a supported secret is detected in the repository.
GitHub
docs.github.com › en › code-security › secret-scanning › managing-alerts-from-secret-scanning › evaluating-alerts
Evaluating alerts from secret scanning - GitHub Docs
Review extended metadata checks for an exposed secret, to see details such as who owns the secret and how to contact the secret owner. Applies to OpenAI API, Google OAuth, and Slack tokens only. See Reviewing extended metadata for a token. Review the labels assigned to the alert.
GitHub
docs.github.com › en › enterprise-server@3.7 › rest › secret-scanning › secret-scanning
Secret scanning - GitHub Enterprise Server 3.7 Docs
GitHub Apps must have the secret_scanning_alerts read permission to use this endpoint. ... curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ http(s)://HOSTNAME/api/v3/orgs/ORG/secret-scanning/alerts
GitHub
docs.github.com › en › code-security › secret-scanning › managing-alerts-from-secret-scanning › viewing-alerts
Viewing and filtering alerts from secret scanning - GitHub Docs
Optionally, toggle to "Generic" to see alerts for non-provider patterns or generic secrets detected using AI. Under "Secret scanning", click the alert you want to view.