Skip to content

Commit 9135c19

Browse files
Merge pull request #17 from Rootless-Ghost/alert-autofix-111
Potential fix for code scanning alert no. 10: Information exposure through an exception
2 parents 2eca0a8 + cc4b621 commit 9135c19

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ def api_list_rules():
249249
})
250250
return jsonify({"success": True, "rules": rules})
251251
except Exception as e:
252-
return jsonify({"success": False, "error": str(e)}), 400
252+
logging.exception("Unexpected error in api_list_rules")
253+
return jsonify({"success": False, "error": "An internal error occurred while listing the rules."}), 400
253254

254255

255256
@app.route("/api/library/load/<filename>", methods=["GET"])

0 commit comments

Comments
 (0)