Skip to content

Conversation

@MirkoZETA
Copy link
Owner

Potential fix for https://github.com/MirkoZETA/FlexNetSim-API/security/code-scanning/4

To fix the problem, we should replace the detailed error message returned to the user with a generic error message. The detailed stack trace should be logged on the server for debugging purposes. This ensures that sensitive information is not exposed to external users while still allowing developers to diagnose issues.

  • Modify the run_simulation_stream function to return a generic error message instead of the exception message.
  • Ensure that the stack trace is logged on the server using the existing logger.exception call.

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>
@MirkoZETA MirkoZETA marked this pull request as ready for review March 8, 2025 23:09
@MirkoZETA MirkoZETA merged commit bcb4ac4 into master Mar 8, 2025
11 checks passed
@MirkoZETA MirkoZETA deleted the alert-autofix-4 branch March 11, 2025 22:12
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.

2 participants