awslabs / git-secrets

Prevents you from committing secrets and credentials into git repositories
Apache License 2.0
12.32k stars 1.17k forks source link

Allow case-insensitive regex #131

Open GladeDiviney opened 5 years ago

GladeDiviney commented 5 years ago

egrep doesn't allow (?i) to specify case-insensitive searches leading to problematic constructions like (AWS|aws|Aws)?.

Is there some way to enable case-insensitive patterns?

dmwelch commented 5 years ago

It uses git-grep under the hood, so you're limited to what you can use with that tool (basic/extended regex & Perl regex). If you could pass in an option to git-grep, you could set it to use Perl and then use the expression (aws)/i.

ericawelch87 commented 4 years ago

I have used this pattern to solve case insensitive: [uU][sS][eE][rR]