Skip to content

Commit ace459b

Browse files
author
Alexander Demin
committed
Skip empty variables in detect_aws_credentials
1 parent a18c5af commit ace459b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pre_commit_hooks/detect_aws_credentials.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def check_file_for_aws_keys(
8484
for key in keys:
8585
# naively match the entire file, low chance of incorrect
8686
# collision
87-
if key in text_body:
87+
if key and key in text_body:
8888
bad_files.append(BadFile(filename, key[:4].ljust(28, '*')))
8989
return bad_files
9090

0 commit comments

Comments
 (0)