From a7892c1e292a3fa990284e92607e3e89878af84a Mon Sep 17 00:00:00 2001 From: Nicolas Hennion Date: Sat, 31 Jan 2026 09:43:22 +0100 Subject: [PATCH] Potential fix for code scanning alert no. 47: Clear-text logging of sensitive information Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- glances/client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/glances/client.py b/glances/client.py index 9da8fed1..e8e60d97 100644 --- a/glances/client.py +++ b/glances/client.py @@ -68,7 +68,8 @@ class GlancesClient: try: self.client = xmlrpc.xmlrpc_client.ServerProxy(self.uri, transport=transport) except Exception as e: - self.log_and_exit(f"Client couldn't create socket {self.uri}: {e}") + # Do not log self.uri here because it may contain credentials + self.log_and_exit(f"Client couldn't create socket to http://{args.client}:{args.port}: {e}") @property def quiet(self):