-
Notifications
You must be signed in to change notification settings - Fork 25
[BEEEP] Update bitwarden-ssh RustCrypto dependencies, fixing imports of various SSH keys #536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
|
Claude finished @quexten's task —— View job Code Review CompleteI've reviewed the changes in this PR focusing on the RustCrypto dependency updates and SSH key import fixes. Overall, the changes are solid and address the stated objectives, but I have several findings that require attention. Findings💭 Finding 1: PR description mentions that the previous Claude review suggested adding a TODO comment about pinned versions (crates/bitwarden-ssh/Cargo.toml:38), but this was not addressed. While the human reviewers didn't push on this, it would still be valuable to document that these pinned versions are temporary and should be updated when the workspace is ready. This helps future maintainers understand why these crates aren't using workspace dependencies.
🎨 Finding 4: The wasm build script change adds the getrandom configuration flag (crates/bitwarden-wasm-internal/build.sh:49), and from the review thread, it's clear this is necessary. However, the build script comment at line 46 doesn't explain WHY this flag is needed here when it's already set in cargo config. Consider adding a comment explaining that RUSTFLAGS overrides rather than appends, so this explicit setting is necessary. 💭 Finding 5: The new test cases for PuTTY key import (import.rs:203-218) and the regression test (import.rs:228-234) are excellent additions that directly address the stated issues. However, I notice the test at line 221-225 explicitly tests that PKCS1 format is NOT supported (expects 🎨 Finding 6: The Additional ObservationsSecurity: The PR correctly addresses the RSA timing attack vulnerability by updating to a newer version. The migration away from the vulnerable RSA crate is a security improvement. Test Coverage: Codecov reports 95.24% patch coverage with only 2 lines missing in generator.rs. This is excellent coverage for a security-sensitive cryptographic module. Backward Compatibility: The changes maintain backward compatibility for import operations (can still decrypt old keys), but RSA key generation will produce different keys. This is acceptable since generation is non-deterministic by nature (except in tests). SummaryThe core changes are well-implemented and address the stated objectives:
Action Items:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #536 +/- ##
=======================================
Coverage 79.52% 79.52%
=======================================
Files 302 302
Lines 32362 32366 +4
=======================================
+ Hits 25735 25739 +4
Misses 6627 6627 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 SDK Breaking Change Detection ResultsSDK Version:
Breaking change detection completed. View SDK workflow |
…twarden-ssh RustCrypto dependencies, fixing imports of various SSH keys (bitwarden/sdk-internal#536)

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-27518
Fixes:
bitwarden/clients#17028
bitwarden/clients#14076
📔 Objective
Updates the
bitwarden-sshdependencies torcreleases from RustCrypto. This allows us to:It also replaces the RSA crate that has a vulnerability (timing attack) - though, it is unlikely that this actually affects import / was abusable.
RSA key generation test vectors are broken because the underlying RSA generation algorithm changed with rustcrypto's massive re-implementation of RSA, hence new test keys are provided.
Note: This pins the dependencies to be different from the workspace crates, as those are not yet ready to be updated. Eventually we will update those bit-by-bit too and then drop the dependency pinning.
⏰ Reminders before review
team
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmedissue and could potentially benefit from discussion
:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes