File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,13 @@ def spider_closed(self, spider):
5151 regex = settings .get ("SETTINGS_LOGGING_REGEX" )
5252 if regex is not None :
5353 settings = {k : v for k , v in settings .items () if re .search (regex , k )}
54- if settings .get ("MASKED_SENSITIVE_SETTINGS_ENABLED" , True ):
54+ 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
5757 ".*(?i)(AWS[\W_]*SECRET[\W_]*ACCESS[\W_]*KEY).*" , # AWS_SECRET_ACCESS_KEY and possible variations
5858 ".*(?i)([\W_]*password[\W_]*).*" # password word
5959 ]
60- regex_list = settings .get ("MASKED_SENSITIVE_SETTINGS_REGEX_LIST" , default_regexes )
60+ regex_list = spider . settings .getlist ("MASKED_SENSITIVE_SETTINGS_REGEX_LIST" , default_regexes )
6161 for reg in regex_list :
6262 updated_settings = {k : '**********' if v else v for k , v in settings .items () if re .match (reg , k )}
6363 settings = {** settings , ** updated_settings }
You can’t perform that action at this time.
0 commit comments