From 6b08751d008a323494dccd9b2ed9b1aa7d45d648 Mon Sep 17 00:00:00 2001 From: galmx Date: Sun, 28 Jun 2026 12:06:01 -0400 Subject: [PATCH] Potential fix for code scanning alert no. 3: Information exposure through an exception Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- dashboard/backend/app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/backend/app.py b/dashboard/backend/app.py index 2665e52..9813594 100644 --- a/dashboard/backend/app.py +++ b/dashboard/backend/app.py @@ -126,9 +126,9 @@ def health(): with db_session() as db: db.execute(__import__("sqlalchemy").text("SELECT 1")) return jsonify({"status": "ok", "db": "ok"}) - except Exception as e: - logger.error("Health check failed: %s", e) - return jsonify({"status": "degraded", "db": "error", "detail": str(e)}), 503 + except Exception: + logger.exception("Health check failed") + return jsonify({"status": "degraded", "db": "error", "detail": "Database check failed"}), 503 # ---------------------------------------------------------------------------