Gitleaks is described as 'Audit git repos for secrets. Gitleaks provides a way for you to find unencrypted secrets and other unwanted data types in git source code repositories' and is an app in the Development category. There are eight alternatives to Gitleaks for Mac, Windows, Linux, Self-Hosted solutions and SaaS. The best alternative is Yelp's detect-secrets, which is both free and Open Source. Other great apps like Gitleaks are repo-security-scanner (Free, Open Source), truffleHog (Free, Open Source), Gitrob (Free, Open Source) and Repo-supervisor (Free, Open Source).
It happens sometimes that you can commit secrets or passwords to your repository by accident. The recommended best practice is not commit the secrets, that's obvious. But not always that obvious when you have a big merge waiting to be reviewed.
GitGuardian is a cybersecurity startup solving the issue of secrets sprawling through source code, a widespread problem that leads to some credentials ending up in compromised places or even in the public space.