Conversation
|
Warning Review limit reached
More reviews will be available in 30 minutes and 14 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR adds Debian package heading version extraction to URL resolution, returning version alongside resolved pool tarballs, and extends download tracking to capture final resolved URLs. These are propagated through download flows and included in CLI output JSON for download success or failure. ChangesDebian version extraction and download link propagation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
🚥 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/fosslight_util/_get_downloadable_url.py`:
- Around line 133-152: The code currently drops the parsed Debian heading
version by returning "" at the end even when version_tokens existed and
package_version was parsed; update the final return so that when version_tokens
is truthy you propagate package_version (not ""), i.e., return
(_normalize_debian_pool_download_from_tarball_hrefs(source_links),
package_version) when package_version is present (or otherwise fall back to ""),
ensuring the branch that filters source_links and reaches the final return
preserves package_version from earlier parsing.
In `@src/fosslight_util/download.py`:
- Around line 209-211: The code assigns downloaded_link = link and then writes
it to JSON, which can leak credentials or signed tokens; update places that set
downloaded_link (the assignments where downloaded_link = link and the other
similar branches around success_git and the blocks at 225-226 and 244-249) to
pass link through a sanitizer function (e.g., sanitize_url) before assigning.
Implement sanitize_url to parse the URL (urllib.parse), strip userinfo
(username/password) and remove or redact sensitive query parameters like token,
access_token, sig, signature, auth, jwt, and any param matching
/(token|sig|signature|auth)/i, then return the cleaned URL; use this sanitized
value for all JSON output and logging instead of the raw link.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2e677b60-fe51-455b-8343-5cdfbedfe568
📒 Files selected for processing (3)
src/fosslight_util/_get_downloadable_url.pysrc/fosslight_util/download.pytests/test_download_version_hint.py
Description
Include the actual resolved download link in downloader output results, and use an empty link when the download flow fails.