[PM-36021] Remove hyphenated words from passphrase generator input/output#1007
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
🔍 SDK Breaking Change DetectionSDK Version:
| typescript | | android |
|
There was a problem hiding this comment.
I don't think we should base changes to cryptographic entropy on the fact that test failures occur. However, I would argue that felt, tip, are two separate words juts as well as felt-tip is one, so in the context of felt-tip-drool, it is unclear whether the user has chosen three words or two. In the context of our application use of joining with -, these words create inconsistent output generation (as discovered by the test).
If we were to do this, we must add a proper comment. We no longer use the EFF wordlist. We should rename the const to EFF_WORDLIST_MODIFIED.
However, this currently introduces a breaking change that makes cryptographic fingerprints incompatible with the old set of fingerprints. The unit tests also confirm this.
Because of this, my suggestion is to actually introduce a tools-owned function to filter the EFF wordlist to exclude these specific words, and to use that in your code.
This reverts commit 7c1a610. revert word removal
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1007 +/- ##
==========================================
+ Coverage 84.30% 84.51% +0.20%
==========================================
Files 395 403 +8
Lines 48632 49981 +1349
==========================================
+ Hits 41000 42240 +1240
- Misses 7632 7741 +109 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Bernd Schoolmann <accounts@quexten.com>
| assert_eq!( | ||
| &gen_words(&mut rng, 4), | ||
| &["crust", "subsystem", "undertook", "protector"] | ||
| &["crust", "substance", "undertook", "protector"] |
There was a problem hiding this comment.
The changes to gen_words() effectively reduce the size of the wordlist used, but only local to that function call. The tests in this file have been updated so that word removals have been accounted for.
|




🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-36021
📔 Objective
This PR removes hyphenated words from the slice of words used to generate passphrases. This accomplishes the following:
As an example, the word list formerly contained the word "drop-down" which resulted in the following test failure: