Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix code scanning alert no. 1: Server-side request forgery #3

Merged
merged 1 commit into from
Oct 6, 2024

Conversation

VersoriumX
Copy link
Owner

Fixes https://github.com/VersoriumX/Dappland-X/security/code-scanning/1

To fix the SSRF vulnerability, we need to validate and sanitize the name parameter before using it in the URL. One effective way is to use an allow-list of valid name values. This ensures that only predefined, safe values are used in the request.

  1. Create an allow-list of valid name values.
  2. Validate the name parameter against this allow-list before using it in the fetch request.
  3. If the name is not in the allow-list, handle it appropriately (e.g., return an error or use a default value).

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>
@VersoriumX VersoriumX marked this pull request as ready for review October 6, 2024 11:48
@VersoriumX VersoriumX merged commit 8f61d9f into develop Oct 6, 2024
2 of 5 checks passed
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