Potential fix for code scanning alert no. 21: Clear-text logging of sensitive information
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
@@ -25,7 +25,7 @@ from sqlalchemy import create_engine, text # type: ignore
|
||||
|
||||
def sanitize_sensitive_info(data: dict) -> dict:
|
||||
sanitized_data = data.copy()
|
||||
sensitive_fields = ['password', 'user', 'host', 'database']
|
||||
sensitive_fields = ['password', 'user', 'host', 'database', 'port', 'ssl_verify_cert', 'ssl_verify_identity']
|
||||
for field in sensitive_fields:
|
||||
if field in sanitized_data:
|
||||
sanitized_data[field] = '***'
|
||||
|
Reference in New Issue
Block a user