Regex Rule to filter a single string character inluding the string Password like "TestPassword"
15:53 10 Jun 2026

I'm currently using BetterLeaks and implemented a secret scanner into my Git Pipeline. I also made a local scanner which I run over my code before commiting to be better save than sorry.

I still go over the files just in case the scanner missed something, like today: I have over 40 regex rules for my betterleaks.toml and still it struggles with single characters with multiple words like "XyzServerPassword".

Which regex rule is recommendable for these types of characters?

regex secrets gitleaks