Skip to content

fix(providers): validate Vercel::with_base_url's api root, not just connect_to's - #3

Merged
senamakel merged 1 commit into
mainfrom
vercel-hosting
Aug 18, 2026
Merged

fix(providers): validate Vercel::with_base_url's api root, not just connect_to's#3
senamakel merged 1 commit into
mainfrom
vercel-hosting

Conversation

@senamakel

Copy link
Copy Markdown
Member

Summary

  • Follow-up to Unified hosting API with a Vercel provider #2, which merged before this last CodeRabbit-flagged fix landed.
  • Vercel::with_base_url bypassed the https://-or-loopback validation that connect_to applies, so a caller reaching this public constructor directly with a non-loopback http:// root would send the bearer token in cleartext.
  • with_base_url now runs the same providers::is_secure_base_url check and returns Error::InsecureBaseUrl before building the client.

Test plan

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo build --all-targets --all-features
  • cargo test --all-features (new test: with_base_url_rejects_plain_http_against_a_non_loopback_host)
  • cargo test (default features)
  • .github/scripts/check-file-coverage.sh 90 coverage.json (every file ≥90%)

…onnect_to's

Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@senamakel, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 37 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cb3dfa24-1257-4b4f-af1f-ee8a116e7c89

📥 Commits

Reviewing files that changed from the base of the PR and between 8b82aaa and dd15281.

📒 Files selected for processing (3)
  • src/providers/mod.rs
  • src/providers/vercel/mod.rs
  • src/providers/vercel/test.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@senamakel
senamakel merged commit d2e6b77 into main Aug 18, 2026
9 checks passed
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.

1 participant