feat: add protocol validation to withBase to prevent SSRF#565
feat: add protocol validation to withBase to prevent SSRF#565
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Description
This PR adds a security guardrail to the
withBaseutility. It ensures that if abaseURLis provided, it must use an explicithttp://orhttps://protocol.This prevents potential Server-Side Request Forgery (SSRF) or protocol injection attacks in cases where the
baseURLmight be derived from untrusted configuration or user input.Key Changes
baseURLstarts withhttp://orhttps://.file://) or no protocol is used.Related Issues
Resolves #564
Checklist
Summary by CodeRabbit
/,?,#) or string end, preventing incorrect interpretation of partial-prefix matches.