Potential fix for code scanning alert no. 36: 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:
罗鹏铖 2025-12-09 00:14:09 +08:00 committed by GitHub
parent cf2d9b4b16
commit 2a0dd2fae7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -229,8 +229,8 @@ def google_search(query: str, search_type: str = "web", key: Key = Depends(key_m
logger.error(
"Google search failed",
extra={
"query": query,
"search_type": search_type,
"query": _redact_secret(query),
"search_type": _redact_secret(search_type),
"error_type": type(e).__name__,
"error": _redact_secret(str(e)),
},