Skip to content

Conversation

@aegan123
Copy link
Member

Fixes https://github.com/asteriskiry/eventsignup_backend/security/code-scanning/1

To fix the problem, we need to validate the fileName parameter to ensure it does not contain any path traversal sequences or invalid characters. This can be done by checking for the presence of "..", "/", or "\" in the fileName and rejecting the input if any are found. Additionally, we should ensure that the resolved path is within the intended directory.

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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@aegan123 aegan123 marked this pull request as ready for review December 29, 2024 16:19
@aegan123 aegan123 linked an issue Dec 29, 2024 that may be closed by this pull request
1 task
@aegan123 aegan123 merged commit 582dc02 into develop Dec 29, 2024
4 checks passed
@aegan123 aegan123 deleted the alert-autofix-1 branch December 29, 2024 16:23
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.

Fix code scanning alert - Uncontrolled data used in path expression

2 participants