Skip to content

Conversation

@VrianCao
Copy link
Owner

Fixes https://github.com/KintaMiao/simplelmt/security/code-scanning/1

To fix the problem, we need to ensure that the customAPI.endpoint is validated against a list of allowed endpoints or domains. This can be achieved by maintaining an allow-list of valid endpoints and checking the user-provided endpoint against this list before making the request. This approach ensures that only pre-approved endpoints can be used, mitigating the risk of SSRF attacks.

  1. Create an allow-list of valid endpoints.
  2. Validate the customAPI.endpoint against this allow-list before making the request.
  3. If the endpoint is not in the allow-list, throw an error.

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>
@vercel
Copy link

vercel bot commented Dec 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
simplelmt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2024 6:07am

@netlify
Copy link

netlify bot commented Dec 23, 2024

Deploy Preview for simplelmt ready!

Name Link
🔨 Latest commit 06a3670
🔍 Latest deploy log https://app.netlify.com/sites/simplelmt/deploys/6768fe08ad51c10008d7e39e
😎 Deploy Preview https://deploy-preview-2--simplelmt.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

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