Skip to content

Commit 8ef7951

Browse files
authored
[PM-24468] Introduce CipherRiskClient (#499)
## 🎟️ Tracking [PM-24468](https://bitwarden.atlassian.net/browse/PM-24468) ## 📔 Objective Implement the cipher risk evaluation logic in the Vault SDK as a separate `CipherRiskClient` so that it can be re-used in mobile and gain potential performance improvements. The `CipherRiskClient` contains logic to check if a multiple login ciphers' passwords are exposed (via HIBP), weak (via zxcvbn), or reused. ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+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 confirmed issue 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 [PM-24468]: https://bitwarden.atlassian.net/browse/PM-24468?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
1 parent 11df05b commit 8ef7951

File tree

11 files changed

+928
-3
lines changed

11 files changed

+928
-3
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ chrono = { version = ">=0.4.26, <0.5", features = [
5656
], default-features = false }
5757
data-encoding = ">=2.0, <3"
5858
ed25519-dalek = { version = ">=2.1.1, <=2.2.0" }
59+
futures = ">=0.3.31, <0.4"
5960
js-sys = { version = ">=0.3.72, <0.4" }
6061
log = ">=0.4.18, <0.5"
6162
proc-macro2 = ">=1.0.89, <2"
@@ -85,6 +86,7 @@ wasm-bindgen = { version = ">=0.2.91, <0.3", features = ["serde-serialize"] }
8586
wasm-bindgen-futures = "0.4.41"
8687
wasm-bindgen-test = "0.3.45"
8788
wiremock = ">=0.6.0, <0.7"
89+
zxcvbn = ">=3.0.1, <4.0"
8890

8991
# There is an incompatibility when using pkcs5 and chacha20 on wasm builds. This can be removed once a new
9092
# rustcrypto-formats crate version is released since the fix has been upstreamed.

crates/bitwarden-core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ uuid = { workspace = true }
6565
wasm-bindgen = { workspace = true, optional = true }
6666
wasm-bindgen-futures = { workspace = true, optional = true }
6767
zeroize = { version = ">=1.7.0, <2.0", features = ["derive", "aarch64"] }
68-
zxcvbn = { version = ">=3.0.1, <4.0", optional = true }
68+
zxcvbn = { workspace = true, optional = true }
6969

7070
[target.'cfg(not(target_arch="wasm32"))'.dependencies]
7171
# By default, we use rustls as the TLS stack and rust-platform-verifier to support user-installed root certificates

crates/bitwarden-vault/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ bitwarden-state = { workspace = true }
4141
bitwarden-uuid = { workspace = true }
4242
chrono = { workspace = true }
4343
data-encoding = { workspace = true }
44+
futures = { workspace = true }
4445
hmac = ">=0.12.1, <0.13"
4546
percent-encoding = ">=2.1, <3.0"
4647
reqwest = { workspace = true }
@@ -55,6 +56,7 @@ uniffi = { workspace = true, optional = true }
5556
uuid = { workspace = true }
5657
wasm-bindgen = { workspace = true, optional = true }
5758
wasm-bindgen-futures = { workspace = true, optional = true }
59+
zxcvbn = { workspace = true }
5860

5961
[dev-dependencies]
6062
bitwarden-api-api = { workspace = true, features = ["mockall"] }

0 commit comments

Comments
 (0)