Implement keyword filter to reduce regex evaluations
From @mhenriksen (source):
If the scanning is designed correctly to use the keywords provided in Gitleaks' rules to first do cheap
strings.Contains/string.include?and only do regex matching if a keyword is present in a blob, it seems to me that regex matching would only need to happen very rarely, especially if we also keep to a few high-impact, high-signal secret signatures?
We should consider implementing this, possibly as part of this feature moving from Experimental to Beta. It could be done as part of the Experimental phase if time permits, but either way, it would be best to have Benchmarking for pre-receive secret detection in place before proceeding so we can measure the impact.
Edited by rossfuhrman