Skip to content

Instantly share code, notes, and snippets.

@MatMoore
Last active April 17, 2025 16:01
Show Gist options
  • Save MatMoore/5ab2eacb52563339be70f67fad249aa2 to your computer and use it in GitHub Desktop.
Save MatMoore/5ab2eacb52563339be70f67fad249aa2 to your computer and use it in GitHub Desktop.
Secret scanning comparison

Cost/licensing

What's detected

  • Github secret scanning - note that "non-provider" patterns are enabled separately, and there is a separate AI tool under the Copilot brand.
  • Gitleaks

Customisability

How it prevents/mitigates disclosure

  • Github's secret scanning has a push protection feature. This is available for most but not all secret types. For some secret types Github can also report the disclosure directly to the provider.
  • Gitleaks must be set up as a pre-commit hook

Ease of use

  • Github secret scanning is a managed service configured by repository settings
  • Gitleaks requires an installation step (varying per OS) unless you run it in docker. It also requires an extra tool (pre-commit or another way of managing git hooks), complicating dev environment setup

Dealing with false positives

  • With github secret scanning's push protection, the push is blocked and you need to bypass it
  • With Gitleaks you need to add false positives to an allow list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment