💡 Vulnerability: The web dashboard was returning raw exception strings in HTTP 500 responses, potentially exposing internal file paths or sensitive system information.
🎯 Impact: Attackers could gather reconnaissance data about the internal environment.
🔧 Fix: Catch exceptions, log them securely using `logging.error`, and return a generic "Internal Server Error" message to the user.
✅ Verification: Added `test_error_handling_no_leak` to `scripts/test_web_dashboard.py` which mocks a failure and asserts that the sensitive info is NOT present in the response.
💡 What: Separated the /health endpoint from the main dashboard rendering logic. It now returns a lightweight JSON response.
🎯 Why: The previous implementation rendered the full Markdown dashboard for every health check, consuming unnecessary CPU and I/O resources during frequent polling.
📊 Impact: Reduces health check processing time from file reading + markdown parsing (~milliseconds) to a simple JSON return (~microseconds).
🔬 Measurement: Verified with new test script scripts/test_web_dashboard.py and updated render.yaml/app.yaml to use the new endpoint.