← Back to Pull requests

Replace unmaintained rustls-pemfile with rustls-pki-types PemObject #280

Open
unknown opened this pull request with 167 lines diff across 2 files
View on GitHub
unknown unknown commented on Mar 07, 2026 21:37 UTC
Author

Summary

Resolves RUSTSEC-2025-0134 by migrating from the unmaintained rustls-pemfile crate to the PemObject trait in rustls-pki-types (available since v1.9.0).

As noted in the advisory, rustls-pemfile is a thin wrapper around the same PEM parsing code now included directly in rustls-pki-types. The project already depends on rustls-pki-types v1.14.0 transitively through tokio-rustls, so this change removes a dependency rather than adding one.

Changes

  • Cargo.toml: Remove rustls-pemfile from [dependencies] and tls-rust feature list

  • src/client/conn.rs: Replace three rustls_pemfile call sites with PemObject trait methods:

  • - rustls_pemfile::certs() → CertificateDer::pem_file_iter()
    - rustls_pemfile::private_key() → PrivateKeyDer::from_pem_slice()
    - Remove unused File and BufReader imports from the tls-rust cfg block

    Closes #277

    Test plan

  • cargo check — default features (tls-native)

  • cargo check --no-default-features --features tls-rust,... — tls-rust path

  • cargo clippy --all-targets --all-features — no new warnings

  • cargo test — 67 tests + 8 doc-tests pass

  • cargo test --no-default-features — 45 tests + 7 doc-tests pass

  • git diff --check — no whitespace issues
  • Diff: 167 lines (+125 / -42) across 2 files Reviewer: kpcyrd Review duration: 383480m
    All Vouch review confidence checks passed
    Residual risk 0.38 = Change Risk (0.65) × (1 − Review Confidence (0.42)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.65 · 167 lines diff across 2 files
    0.65
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.307
    Sensitive Paths sensitive_paths
    0.065
    Real PR Conversation Timeline
    1 comments
    "Review active on #280"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: medium confidence: 42.2% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 65.3% (HIGH) · Higher = larger blast radius
    65.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 42.2% · Lower = rushed or shallow review
    42.2%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 37.7% · Moderate risk
    37.7%
    Repository