Skip to content

harden: replace unmaintained dep, enable overflow checks#101

Merged
kacy merged 1 commit intomainfrom
harden/workspace-and-deps
Feb 12, 2026
Merged

harden: replace unmaintained dep, enable overflow checks#101
kacy merged 1 commit intomainfrom
harden/workspace-and-deps

Conversation

@kacy
Copy link
Owner

@kacy kacy commented Feb 12, 2026

summary

  • replace rustls-pemfile (RUSTSEC-2025-0134, unmaintained) with rustls-pki-types PemObject trait — PEM parsing now happens in constant time for private key data
  • enable overflow-checks = true in release profile so integer overflows panic instead of silently wrapping in production
  • update all dependencies to latest compatible versions
  • cargo audit now reports zero advisories

what was tested

  • cargo audit — zero advisories
  • cargo test --workspace --features protobuf — all tests pass
  • cargo clippy --workspace --features protobuf -- -D warnings — clean

design considerations

the rustls-pki-types crate was already a transitive dependency through rustls 0.23. switching to its PemObject trait is a straightforward migration — the API is nearly identical but PEM parsing of private key material now uses constant-time operations internally.

enabling overflow checks in release mode is a conscious tradeoff: a tiny performance cost (~1-2% on arithmetic-heavy paths) in exchange for crash-on-overflow rather than silent-wrap-to-wrong-value. for a database, crashing is strictly preferable to corrupting data silently.

- replace rustls-pemfile (RUSTSEC-2025-0134) with rustls-pki-types
  PemObject trait — pem parsing now happens in constant time for
  private key data
- enable overflow-checks = true in release profile so integer
  overflows panic instead of silently wrapping
- update all dependencies to latest compatible versions
- cargo audit now reports zero advisories
@kacy kacy merged commit b05e2f7 into main Feb 12, 2026
7 checks passed
@kacy kacy deleted the harden/workspace-and-deps branch February 12, 2026 16:32
kacy added a commit that referenced this pull request Feb 19, 2026
…101)

- replace rustls-pemfile (RUSTSEC-2025-0134) with rustls-pki-types
  PemObject trait — pem parsing now happens in constant time for
  private key data
- enable overflow-checks = true in release profile so integer
  overflows panic instead of silently wrapping
- update all dependencies to latest compatible versions
- cargo audit now reports zero advisories
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