fix: use IPv4 only for profile fetches#220
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe changes restrict IP address handling in a profile request resolver to enforce public IPv4-only validation. The implementation now explicitly validates and filters addresses during literal IP parsing and DNS resolution, rejecting non-IPv4 and non-public addresses with specific error messages. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
Pull request overview
Limits resume external profile URL resolution to public IPv4 addresses to avoid passing mixed IPv4/IPv6 CURLOPT_RESOLVE entries into curl_cffi in IPv4-only environments.
Changes:
- Reject IPv6 literals for profile URLs (require public IPv4).
- Filter DNS results to only include public IPv4 addresses when building pinned
RESOLVEentries. - Add unit tests covering dual-stack resolution behavior and IPv6 literal rejection.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/shared/src/five08/resume_profile_processor.py |
Enforces IPv4-only resolution and updates ordering/error behavior when no IPv4 addresses are available. |
tests/unit/test_resume_profile_processor.py |
Adds unit coverage for dual-stack hosts (IPv6 ignored) and IPv6 literal rejection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Limit external profile URL resolution to public IPv4 addresses so the resume profile fetcher does not pass mixed IPv4/IPv6
CURLOPT_RESOLVEentries intocurl_cffion IPv4-only containers. Add unit coverage for dual-stack hosts and IPv6 literal rejection.Related Issue
None.
How Has This Been Tested?
uv run pytest tests/unit/test_resume_profile_processor.py -qSummary by CodeRabbit
Bug Fixes
Tests