From cc4b621dbfc4860d3fc8cab153a43fef6ad2cd18 Mon Sep 17 00:00:00 2001 From: Rootless-Ghost/RG-Nebula <139057350+Rootless-Ghost@users.noreply.github.com> Date: Sun, 22 Mar 2026 04:51:33 -0400 Subject: [PATCH] Potential fix for code scanning alert no. 10: Information exposure through an exception Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 9f4b5e9..a084c04 100644 --- a/app.py +++ b/app.py @@ -249,7 +249,8 @@ def api_list_rules(): }) return jsonify({"success": True, "rules": rules}) except Exception as e: - return jsonify({"success": False, "error": str(e)}), 400 + logging.exception("Unexpected error in api_list_rules") + return jsonify({"success": False, "error": "An internal error occurred while listing the rules."}), 400 @app.route("/api/library/load/", methods=["GET"])