From 2a0dd2fae78619eddde2e91c74175dc4c303aa83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BD=97=E9=B9=8F=E9=93=96?= <104722516+LuoPengcheng12138@users.noreply.github.com> Date: Tue, 9 Dec 2025 00:14:09 +0800 Subject: [PATCH] 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> --- server/app/controller/mcp/proxy_controller.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/app/controller/mcp/proxy_controller.py b/server/app/controller/mcp/proxy_controller.py index 790ea606..829758e5 100644 --- a/server/app/controller/mcp/proxy_controller.py +++ b/server/app/controller/mcp/proxy_controller.py @@ -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)), },