Skip to content

Commit 9e74785

Browse files
replace complete string
1 parent cc8a500 commit 9e74785

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/sagemaker/config/config_utils.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,18 @@ def _log_sagemaker_config_single_substitution(source_value, config_value, config
7070

7171
# sensitive_keywords = re.compile(r'(secret|password|key)', re.IGNORECASE)
7272

73+
source_value = '*'
74+
config_value = '*'
75+
7376
if isinstance(source_value, dict):
7477
for key in source_value.keys():
75-
source_value[key] = '***'
78+
if re.search(r'(secret|password|key)', key, re.IGNORECASE):
79+
source_value[key] = '***'
7680

7781
if isinstance(config_value, dict):
7882
for key in config_value.keys():
79-
config_value[key] = '***'
83+
if re.search(r'(secret|password|key)', key, re.IGNORECASE):
84+
config_value[key] = '***'
8085

8186
if config_value is not None:
8287

0 commit comments

Comments
 (0)