fix(scripts): resolve URL scheme safety and method complexity in check_upstream_updates.py - #100
Conversation
There was a problem hiding this comment.
Sorry @tonythethompson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Important Review available on request
Reviews should be triggered manually for repositories with fewer than 10 stars. Select Trigger review above or comment ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 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 |
|
Findings
Validation
|
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by step-3.7-flash · Input: 124.3K · Output: 15.4K · Cached: 459.3K Review guidance: REVIEW.md from base branch |

Summary
Fixes #98
Fixes #99
Summary by cubic
Restricts all GitHub API requests and redirects to http/https with a host, and refactors
audit_entryinto focused helpers to reduce complexity. Previously redirects could target non-http(s) schemes; now invalid URLs or redirects fail fast, and status computation is isolated and easier to review.fetch_github_jsoncallsensure_http_urland useshttp_opener().open; invalid URLs/redirects raiseValueErrorbefore the request._HttpOnlyRedirectHandlerandHTTP_SCHEMESto enforce http/https-only redirects.audit_entryinto_check_tag_moved,_check_has_new_tag, and_determine_status; behavior is unchanged aside from stricter URL/redirect validation.scripts/test_check_upstream_updates.py.Written for commit 400566a. Summary will update on new commits.