Skip to content

Conversation

MirkoZETA
Copy link
Owner

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

To fix the problem, we need to ensure that any user-provided input is properly sanitized before it is used in a context where it could be executed or displayed. In this case, we should escape the result variable before using it in the build_simulation_command function. This can be achieved by using the html.escape function from the standard library to escape any potentially harmful characters.

We will modify the run_simulation_stream function to escape the result variable before it is used. This change will ensure that any user-provided input is properly sanitized, preventing XSS vulnerabilities.

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

MirkoZETA and others added 3 commits March 4, 2025 20:12
…oss-site scripting

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 20:18
@MirkoZETA MirkoZETA closed this Mar 8, 2025
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