build(deps): update reqwest to 0.13.4 - #10
Conversation
Renovate could not do this itself (PR #8): the bump left Cargo.toml and Cargo.lock disagreeing, because 0.13 renamed the `rustls-tls` feature to `rustls`. Cargo cannot resolve a feature that no longer exists, so every job failed at dependency resolution rather than on anything in the code. Two breaking changes mattered: - `rustls-tls` -> `rustls`. Mechanical. - Built-in CA roots were replaced by rustls-platform-verifier, which reads the system trust store. There is no system trust store in the Nix build sandbox, so TLS setup failed outright with "No CA certificates were loaded from the system" -- 13 tests passed locally and failed under `nix build`, which is the only reason this was caught before deploy. The same absence is plausible at runtime under the hardened unit, which runs DynamicUser with ProtectSystem=strict. Fixed by bundling Mozilla's roots via webpki-root-certs and passing them with `tls_certs_only`. Only api.github.com is contacted, so a fixed public-CA set is sufficient, and compiling the roots in makes the binary independent of ambient host state rather than dependent on whatever the host happens to have installed. The crypto provider also changes from ring to aws-lc, which is 0.13's default. cargo-deny reports licences and advisories clean. Verified: 103 tests pass locally and in the sandbox, `nix build` succeeds, and a real collection cycle against api.github.com completes with scrape_success 1.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 6 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (3)
Comment |
There was a problem hiding this comment.
Pull request overview
Updates the workspace to reqwest 0.13.4 and adapts TLS configuration to avoid relying on system CA roots (which are unavailable in the Nix build sandbox / may be unavailable under hardened systemd settings).
Changes:
- Bump
reqwestto0.13.4and update the feature flag fromrustls-tls→rustls. - Add
webpki-root-certsand configure the GitHub HTTP client to use bundled Mozilla roots viatls_certs_only. - Regenerate
Cargo.lockto reflect the new dependency graph (including aws-lc-related crates).
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| github-ci-exporter/src/github/client.rs | Configures reqwest’s TLS root set using bundled Mozilla CAs via tls_certs_only. |
| github-ci-exporter/Cargo.toml | Adds webpki-root-certs as a workspace dependency for the crate. |
| Cargo.toml | Bumps reqwest to 0.13.4, switches feature to rustls, adds webpki-root-certs. |
| Cargo.lock | Updates the resolved dependency graph for reqwest 0.13.4 and new TLS dependencies. |
Suppressed comments (1)
github-ci-exporter/src/github/client.rs:205
.tls_certs_only(...)is applied unconditionally, which can break the documented ability to overridegithub_api_url/github_graphql_urlfor GitHub Enterprise (especially if it uses a private CA not in Mozilla's bundle). Consider scoping the bundled-root behavior to the default public GitHub endpoints, or making the root set configurable.
.tls_certs_only(
webpki_root_certs::TLS_SERVER_ROOT_CERTS
.iter()
.map(|cert| reqwest::Certificate::from_der(cert))
.collect::<Result<Vec<_>, _>>()
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // Trust Mozilla's bundled CA set rather than the system trust | ||
| // store. reqwest 0.13 switched to rustls-platform-verifier, which | ||
| // reads system roots; those are absent in the Nix build sandbox | ||
| // (TLS setup fails with "No CA certificates were loaded from the | ||
| // system") and are not guaranteed under a hardened unit with | ||
| // ProtectSystem=strict. Only api.github.com is contacted, so a | ||
| // fixed public-CA set is sufficient and makes the binary | ||
| // independent of ambient host state. |
Supersedes #8, which Renovate could not complete on its own.
Why #8 failed
The bump left
Cargo.tomlandCargo.lockdisagreeing, because 0.13 renamed therustls-tlsfeature torustls. Cargo cannot resolve a feature that no longer exists, so every job failed at dependency resolution — not on anything in the code:renovate/artifactsfailing was the tell: the lockfile regeneration never ran.Two breaking changes mattered
1.
rustls-tls→rustls. Mechanical.2. Built-in CA roots were replaced by
rustls-platform-verifier, which reads the system trust store. There is no system trust store in the Nix build sandbox:13 tests passed locally and failed under
nix build— that difference is the only reason this was caught before deploy. The same absence is plausible at runtime: the unit runsDynamicUserwithProtectSystem=strict.Fixed by bundling Mozilla's roots via
webpki-root-certsand passing them withtls_certs_only. Onlyapi.github.comis contacted, so a fixed public-CA set is sufficient, and compiling the roots in makes the binary independent of whatever the host happens to have installed.Also
The crypto provider changes from ring to aws-lc, which is 0.13's default.
cargo-denyreports licences and advisories clean (aws-lc-sys builds C, already handled by the existingpkg-confignative input).Verification
nix build .#github-ci-exportersucceedsapi.github.comcompletes:scrape_success 1, 15 reposcargo xtask cigreen; all 28 pre-commit hooks pass