mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-09 21:04:17 +00:00
Skip empty variables in detect_aws_credentials
This commit is contained in:
parent
a18c5af5d4
commit
ace459bec5
1 changed files with 1 additions and 1 deletions
|
|
@ -84,7 +84,7 @@ def check_file_for_aws_keys(
|
||||||
for key in keys:
|
for key in keys:
|
||||||
# naively match the entire file, low chance of incorrect
|
# naively match the entire file, low chance of incorrect
|
||||||
# collision
|
# collision
|
||||||
if key in text_body:
|
if key and key in text_body:
|
||||||
bad_files.append(BadFile(filename, key[:4].ljust(28, '*')))
|
bad_files.append(BadFile(filename, key[:4].ljust(28, '*')))
|
||||||
return bad_files
|
return bad_files
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue