File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ def spider_closed(self, spider):
5454 if spider .settings .getbool ("MASKED_SENSITIVE_SETTINGS_ENABLED" , True ):
5555 default_regexes = [
5656 ".*(?i)(api[\W_]*key).*" , # apikey and possible variations e.g: shub_apikey or SC_APIKEY
57- ".*(?i)(AWS[\W_]*SECRET[\W_]*ACCESS[\W_]*KEY).*" , # AWS_SECRET_ACCESS_KEY and possible variations
57+ ".*(?i)(AWS[\W_]*( SECRET[\W_]*)? ACCESS[\W_]*KEY).*" , # AWS_SECRET_ACCESS_KEY and possible variations
5858 ".*(?i)([\W_]*password[\W_]*).*" # password word
5959 ]
6060 regex_list = spider .settings .getlist ("MASKED_SENSITIVE_SETTINGS_REGEX_LIST" , default_regexes )
Original file line number Diff line number Diff line change @@ -144,6 +144,7 @@ def test_log_all_should_not_return_aws_secret_key_value_by_default(caplog):
144144 "SETTINGS_LOGGING_ENABLED" : True ,
145145 "AWS_SECRET_ACCESS_KEY" : 'secret_value1' ,
146146 "aws_secret_access_key" : 'secret_value2' ,
147+ "aws_access_key" : 'secret_value2' ,
147148 }
148149
149150 spider = MockSpider (settings )
@@ -153,6 +154,7 @@ def test_log_all_should_not_return_aws_secret_key_value_by_default(caplog):
153154
154155 assert '"AWS_SECRET_ACCESS_KEY": "**********"' in caplog .text
155156 assert '"aws_secret_access_key": "**********"' in caplog .text
157+ assert '"aws_access_key": "**********"' in caplog .text
156158 assert 'secret_value' not in caplog .text
157159
158160
You can’t perform that action at this time.
0 commit comments