Skip to content

Potential fix for code scanning alert no. 1: Information exposure through an exception#1

Merged
Rootless-Ghost merged 1 commit intomasterfrom
alert-autofix-1
Apr 13, 2026
Merged

Potential fix for code scanning alert no. 1: Information exposure through an exception#1
Rootless-Ghost merged 1 commit intomasterfrom
alert-autofix-1

Conversation

@Rootless-Ghost
Copy link
Copy Markdown
Owner

Potential fix for https://github.com/Rootless-Ghost/ClusterIQ/security/code-scanning/1

To fix this safely, keep detailed diagnostics in logs and return a generic error message to the client.

Best single change (no functionality change to success path):

  • In app.py, inside api_cluster()’s except Exception as exc: block (around lines 205–207), keep the existing logger.error(..., exc_info=True) call.
  • Replace return jsonify({"success": False, "error": str(exc)}), 500 with a generic message such as return jsonify({"success": False, "error": "Internal server error"}), 500.

This preserves operational debugging (full traceback in logs) while preventing exception-detail exposure to users.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…ough an exception

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Rootless-Ghost Rootless-Ghost self-assigned this Apr 13, 2026
@Rootless-Ghost Rootless-Ghost marked this pull request as ready for review April 13, 2026 11:44
@Rootless-Ghost Rootless-Ghost merged commit b526dfe into master Apr 13, 2026
6 checks passed
@Rootless-Ghost Rootless-Ghost deleted the alert-autofix-1 branch April 13, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant