[PM-34716] Implement legacy CLI generate command within Rust CLI#958
Conversation
|
New Issues (6)Checkmarx found the following issues in this Pull Request
|
🔍 SDK Breaking Change Detection ResultsSDK Version:
Breaking change detection completed. View SDK workflow |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #958 +/- ##
==========================================
+ Coverage 83.02% 83.73% +0.70%
==========================================
Files 376 379 +3
Lines 45317 45910 +593
==========================================
+ Hits 37626 38443 +817
+ Misses 7691 7467 -224 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // If a user specifies less than three words, the number of words will be silently | ||
| // increased to three, matching behavior in the legacy CLI | ||
| if self.words < 3 { | ||
| self.words = 3; | ||
| } |
There was a problem hiding this comment.
Do you know if these are CLI concerns or if they occur for all clients?
It might be nicer to do cmp::min(self.words, 3) further down when you call client.generator() since you can drop mut on self.
There was a problem hiding this comment.
This is also something that the current passphrase generator code returns an error from:
Maybe we can just make the constants used there public just to make sure they're not out of sync? Or if we don't care about erroring for this, increasing the minimum there.
There was a problem hiding this comment.
@Hinton this behavior is present across all clients: requesting a passphrase with fewer than three words, or more than twenty words, will result in the limit being silently enforced with no message to the user.
|






🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-34716
📔 Objective
Implement
bw generatewithin the Rust CLI to have full parity with existing CLI.