GitHub
docs.github.com › code-security › secret-scanning › about-secret-scanning
About secret scanning - GitHub Docs
Secret scanning scans your entire Git history on all branches of your repository for hardcoded credentials, including API keys, passwords, tokens, and other known secret types. This helps you identify secret sprawl, the uncontrolled proliferation ...
GitHub
github.com › grab › secret-scanner
GitHub - grab/secret-scanner · GitHub
To scan repositories in other Git providers, simply specify the Git provider name. For Gitlab, provide the project ID instead of org/repo. ./secret-scanner -git bitbucket -repos litmis/mama ./secret-scanner -git gitlab -repos 3836952
Starred by 55 users
Forked by 12 users
Languages Go
We removed secrets from our repo 6 months ago. Turns out they’re still recoverable in git history.
Theres laughter in my head as I remember being at a SANS training years ago doing a lab precisely on this topic. Guy two tables over starts saying how he didn't know this and had to make an some urgent call to his team because this was a massive problem. Didnt see him for the next 1.5 hrs. More on reddit.com
Secret Scanning
tldr; Don’t rely only on SAST for secrets. Use a dedicated scanner at minimum, and if compliance/visibility matter, consider something like GitGuardian or or Trufflehog enterprise I’ve been working in AppSec / secure software development for quite a while, and have had to set up secret scanning across different teams and stacks. Here’s how I’ve seen it play out in practice: 1. SAST vs. dedicated secret scanning Even though some SAST tools advertise secret detection, they’re rarely as strong as dedicated tools. Secret scanning requires updated regexes, entropy checks, and context awareness — things SAST engines don’t focus on. In most setups, SAST is for code issues (injection, unsafe patterns, etc.), while secret scanning runs separately (pre-commit hooks, CI jobs, or continuous repo monitoring). 2. GitGuardian vs. Trufflehog (enterprise) GitGuardian → polished SaaS, strong detection accuracy, dashboards, audit/compliance features, and easy integrations (Slack/Jira/SIEM). Great if you want visibility across the org. Trufflehog → very flexible, great for scanning histories and many backends (git, S3, GCP, etc.), but you’ll need to invest more engineering effort if you want compliance/reporting at scale.Some teams actually pair them: Trufflehog for deep historical sweeps, GitGuardian for ongoing monitoring. 3. Alternatives Gitleaks (what you’re already using) → solid for CI/CD pipelines but is not as polished as GG or TH for paid versions. detect-secrets (Yelp) → good for pre-commit hooks, but not as actively maintained. ggshield (GitGuardian CLI) → gives you both local and pipeline scanning tied to their SaaS backend. Custom regex rules → handy for company-specific formats (internal API keys, JWTs, etc.). Typical workflow Pre-commit/pre-push: lightweight hooks (detect-secrets/gitleaks). CI/CD: thorough scans (gitleaks/trufflehog). Continuous monitoring: enterprise SaaS (GitGuardian). More on reddit.com
Secrets scanning tool for all repos
GitHub has scanning for private repos as well of course, you just have to pay for it More on reddit.com
Best Secret Scanning Tool For Azure/Azure DevOps?
There are some free open source tools you can use like gitleaks, tools from ShiftLeftSecurity. If you're more into python, there are some secret scanning libraries. If you're more into javascript, there are a few npm libraries that you can use. All of these are up to you to experiment and see which fits your use case. Remember that its not just about scanning its also preventing, so using IDE extensions or plugins is something you can add, checks during pull requests and scanning of history, should complement your efforts. Can also add git hooks for the checks, but i would rather educate my dev's and make them more security-aware with good practices of secure coding. More on reddit.com
How can I set up secret scanning and code scanning in my GitHub repository?
Enable the respective security features in the repository settings. Detailed instructions and best practices are available in GitHub's documentation.
github.com
github.com › articles › what is secret scanning?
What is secret scanning? · GitHub
How much does secret scanning cost on GitHub?
GitHub Secret Scanning, offered by GitHub, is entirely free. The SentinelOne GitHub Scanning tool included with CNAPP starts at USD 2000 per month with the Starter Plan.
sentinelone.com
sentinelone.com › cybersecurity-101 › cloud-security › github-secret-scanning
GitHub Secret Scanning: Importance & Best Practices
Is GitHub code scanning free?
GitHub code scanning is free for GitHub users by default. However, it can present various limitations addressed by premium paid tools like SentinelOne.
sentinelone.com
sentinelone.com › cybersecurity-101 › cloud-security › github-secret-scanning
GitHub Secret Scanning: Importance & Best Practices
Videos
How GitHub secret scanning saves your code
04:57
GitHub Secret Scanning: Configure Your Push Protection Patterns ...
47:55
GitHub Secret Scanning - Deep Dive - YouTube
01:25
Overview of GitHub Secret Scanning - YouTube
01:53
GitHub: Enabling and Disabling Secret Scanning Push Protection ...
02:07
GitHub: Enabling and Disabling Secret Scanning - YouTube
GitHub
docs.github.com › en › code-security › how-tos › secure-your-secrets › detect-secret-leaks › enabling-secret-scanning-for-your-repository
Enabling secret scanning for your repository - GitHub Docs
You can configure how GitHub scans your repositories for leaked secrets and generates alerts.
GitHub
docs.github.com › en › code-security › reference › secret-security › supported-secret-scanning-patterns
Supported secret scanning patterns - GitHub Docs
Lists of supported secrets and the partners that GitHub works with to prevent fraudulent use of secrets that were committed accidentally. Secret scanning is available for the following repository types:
GitHub
github.com › articles › what is secret scanning?
What is secret scanning? · GitHub
November 17, 2025 - Secret scanning is a security process that detects exposed credentials, API keys, and sensitive data in code, logs, and repositories to prevent unauthorized access..
GitHub
docs.github.com › en › code-security › secret-scanning › enabling-secret-scanning-features
How-tos for detecting secret leaks - GitHub Docs
Learn how to use GitHub's tools to detect secret leaks. You can configure how GitHub scans your repositories for leaked secrets and generates alerts.
GitHub
github.com › security › advanced-security › secret-protection
GitHub Secret Protection · GitHub
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.
Jit
jit.io › resources › appsec-tools › git-secrets-scanners-key-features-and-top-tools-
Top 8 Git Secrets Scanners in 2026 | Jit
June 9, 2025 - With the right git secrets scanner, you can proactively prevent exposed secrets from getting into the wrong hands. Pattern-Based & ML Detection Combines high-precision regexes for well-known credential formats—such as AWS Access Key IDs (AKIA…) or GitHub Personal Access Tokens (ghp_…)—with machine-learning and NLP models that analyze entropy, structure, and contextual cues.
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 ... { "number": 42, "created_at": "2020-11-06T18:18:30Z", "url": "https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42", "html_url": "https://github.com/owner/private-repo/security/secret-scanning/42", "locations_url": "https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42/locations", "state": "open", "resolution": null, "resolved_at": null, "res
GitHub
docs.github.com › code-security › secret-scanning › secret-scanning-partnership-program › secret-scanning-partner-program
Secret scanning partner program - GitHub Docs
GitHub scans repositories for known secret formats to prevent fraudulent use of credentials that were committed accidentally. Secret scanning happens by default on public repositories and public npm packages.
GitHub
docs.github.com › en › code-security › reference › secret-security › secret-scanning-detection-scope
Secret scanning detection scope - GitHub Docs
Secret scanning uses pattern matching and validation to detect secrets. Detection varies based on pattern pairs, token types, and push protection settings.