Skip to content

Commit

Permalink
🔭 Don't put words less than 4 chars in automaton
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinHock committed Sep 20, 2019
1 parent 9e3669d commit 7ce4b85
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detect_secrets/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def build_automaton(word_list):
for line in f:
# .lower() to make everything case-insensitive
line = line.lower().strip()
if line:
if len(line) > 3:
word_list_hash = hashlib.sha1(
(word_list_hash + line).encode('utf-8'),
).hexdigest()
Expand Down

1 comment on commit 7ce4b85

@KevinHock
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If somebody wants less than len 4, we can change it later, but I doubt it.

Please sign in to comment.