more cleaningup

This commit is contained in:
Zach Rice committed 2022-03-11 18:01:40 -06:00
1 parent c53e0fc98d
commit c98afd3dec
3 files changed
+2 -53

No files matched your search

+2 -2
View File
@@ -180,8 +180,8 @@ func (d *Detector) detectRule(fragment Fragment, rule *config.Rule) []report.Fin
// NOTE: this is a goofy hack to get around the fact there golang's regex engine
// does not support positive lookaheads. Ideally we would want to add a
// restriction on generic rules regex that requires the secret match group
// contains both numbers and alphabetical characters. What this bit of code does is
// check if the ruleid is prepended with "generic" and enforces the
// contains both numbers and alphabetical characters, not just alphabetical characters.
// What this bit of code does is check if the ruleid is prepended with "generic" and enforces the
// secret contains both digits and alphabetical characters.
// TODO: this should be replaced with stop words
if strings.HasPrefix(rule.RuleID, "generic") {