File tree Expand file tree Collapse file tree 1 file changed +1
-5
lines changed
Expand file tree Collapse file tree 1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change 2020 S3_URL ,
2121)
2222
23- sensitive_var_pattern = re .compile (
24- r"\b[A-Z_]*(?<!WRONG_)(SECRET|PASSWORD|ACCESS_KEY|TOKEN)[A-Z_]*\b(?!%)(?!=clickhouse$)(?!=minio)(?!: \*{3}$)(?! '\[HIDDEN\]')"
25- )
23+ sensitive_var_pattern = re .compile (r"[A-Z_]*(SECRET|PASSWORD|KEY|TOKEN|AZURE)[A-Z_]*" )
2624sensitive_strings = {
2725 var : value for var , value in os .environ .items () if sensitive_var_pattern .match (var )
2826}
@@ -41,8 +39,6 @@ def clean_line(line):
4139
4240 matches = []
4341 for line_number , line in enumerate (file_content .splitlines (), start = 1 ):
44- for match in sensitive_var_pattern .finditer (line ):
45- matches .append ((file_name , line_number , clean_line (line )))
4642 for name , value in sensitive_strings .items ():
4743 if value in line :
4844 matches .append ((file_name , line_number , clean_line (line )))
You can’t perform that action at this time.
0 commit comments