Gitleaks

Gitleaks

Gitleaks is an open-source tool for detecting hardcoded secrets like passwords, API keys, and tokens in git repositories. It scans commit history and branch comparisons to find leaked keys that were committed accidentally.
Gitleaks image
secrets passwords api-keys tokens git

Gitleaks: Open-Source Secret Detection Tool

Gitleaks detects hardcoded secrets like passwords, API keys, and tokens in git repositories by scanning commit history and branch comparisons to identify accidentally leaked keys.

What is Gitleaks?

Gitleaks is an open source command line tool for detecting hardcoded secrets like passwords, API keys, and tokens in git repositories. It is used to find exposed credentials that were committed accidentally before they are exploited by outside actors.

Gitleaks scans git commit history, branches, and commit messages to detect secrets. It supports scanning of public and private git repos from GitHub, GitLab, Bitbucket, and more. The tool can scan shallow clones and single commits as well to optimize scans.

Once secrets are detected, Gitleaks logs the leaked credentials, generates a report, and can even commit fixes back to the repo to revoke the exposed secrets. It detects secrets via pattern matching, entropy checks, commit message scans, and more advanced detection mechanisms.

Gitleaks is useful for open source project maintainers, security engineers, developers, and DevOps teams to audit their own git repositories and identify exposed API keys, service credentials, SSH keys, access tokens, and other secrets before they can be abused by malicious actors.

Gitleaks Features

Features

  1. Scans git repos for secrets and keys
  2. Supports scanning unencrypted repos, local repos, archives, and commit diffs
  3. Configurable rules for detecting secrets based on regexes
  4. Integrates with CI/CD pipelines
  5. Generates JSON output

Pricing

  • Open Source

Pros

Open source and free

Easy to install and use

Customizable rules for finding secrets

Scans entire commit history

Prevents accidental secret leaks

Cons

Only scans text content, not binary files

Can generate false positives

Requires some configuration for best results

CLI only, no GUI


The Best Gitleaks Alternatives

Top Security & Privacy and Secret Detection and other similar apps like Gitleaks


TruffleHog icon

TruffleHog

TruffleHog is an open source command line tool written in Python that helps developers find secrets and passwords that have accidentally been committed to git repositories. It scans the full commit history of a git repo to find high entropy strings that look like passwords, API keys, tokens, and other...
TruffleHog image
GitGuardian icon

GitGuardian

GitGuardian is a cybersecurity software designed to help developers keep their code repositories secure. It detects secrets like API keys, database credentials, certificates, etc. that may have been unintentionally committed to public or private code repositories.GitGuardian works by scanning committed source code, pull requests, and public repositories across platforms like...
GitGuardian image
Gitrob icon

Gitrob

Gitrob is an open source command line application used to scan GitHub repositories for sensitive information. It was created by security researcher Michael Henriksen as a way to automate the process of finding misconfigured GitHub repos that leak API keys, authentication credentials, personally identifiable information (PII), and other sensitive data.Here's...
Gitrob image
Repo-security-scanner icon

Repo-security-scanner

repo-security-scanner is an open-source static analysis security vulnerability scanner designed for source code repositories. It enables developers to easily scan their codebases to identify security issues early in the development process.repo-security-scanner scans source code for vulnerabilities including injection attacks, insecure authentication, access control weaknesses, insecure configuration, cross-site scripting flaws, and...
Repo-security-scanner image
Repo-supervisor icon

Repo-supervisor

Repo-supervisor is an open-source repository management and monitoring tool. It provides teams with greater visibility and control over their software repositories hosted on GitHub, GitLab, Bitbucket, and other platforms.Key features of Repo-supervisor include:Centralized dashboard showing recent activity across all connected repositoriesConfigurable notifications when new commits, pulls requests, issues, milestones etc....
Repo-supervisor image
Yara4pentesters icon

Yara4pentesters

yara4pentesters is an open source tool for writing rules and scanning malware using Yara. Yara is a pattern matching tool for analyzing malware. yara4pentesters builds on top of Yara to provide additional functionality useful for penetration testers and malware analysts.Some key features of yara4pentesters include:Comes with over 100 predefined Yara...
Yara4pentesters image