Skip to content

[PM-30584] Add unlock for key connector with SDK#19367

Merged
quexten merged 33 commits into
mainfrom
km/unlock-kc-with-sdk
Apr 14, 2026
Merged

[PM-30584] Add unlock for key connector with SDK#19367
quexten merged 33 commits into
mainfrom
km/unlock-kc-with-sdk

Conversation

@quexten
Copy link
Copy Markdown
Contributor

@quexten quexten commented Mar 4, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-30584

📔 Objective

Adds unlock via the unlock service in the login strategies. The unlock service implements key-connector-unlock via the SDK.

📸 Screenshots

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 4, 2026

Logo
Checkmarx One – Scan Summary & Detailsc96248c0-e7c3-44e2-ab1f-71856976caca


New Issues (25) Checkmarx found the following issues in this Pull Request
# Severity Issue Source File / Package Checkmarx Insight
1 HIGH CVE-2025-13631 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Inappropriate implementation in Google Updater in Google Chrome on Mac prior to 143.0.7499.41 allowed a remote attacker to perform Privilege Escala...
Attack Vector: NETWORK
Attack Complexity: LOW
Vulnerable Package
2 HIGH CVE-2025-13633 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Use After Free in Digital Credentials in Google Chrome prior to 143.0.7499.41 allowed a remote attacker who had compromised the renderer process to...
Attack Vector: NETWORK
Attack Complexity: LOW
Vulnerable Package
3 HIGH CVE-2025-13638 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Use After Free in Media Stream in Google Chrome prior to 143.0.7499.41 allowed a remote attacker to potentially exploit heap corruption via a craft...
Attack Vector: NETWORK
Attack Complexity: LOW
Vulnerable Package
4 HIGH CVE-2025-13639 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Inappropriate implementation in WebRTC in Google Chrome prior to 143.0.7499.41 allowed a remote attacker to perform arbitrary read/write via a craf...
Attack Vector: NETWORK
Attack Complexity: LOW
Vulnerable Package
5 HIGH CVE-2025-13720 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Bad cast in Loader in Google Chrome prior to 143.0.7499.41 allowed a remote attacker who had compromised the renderer process to potentially exploi...
Attack Vector: NETWORK
Attack Complexity: LOW
Vulnerable Package
6 HIGH CVE-2025-13721 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Race in v8 in Google Chrome prior to 143.0.7499.41 allowed a remote attacker to potentially exploit heap corruption via a crafted HTML page.
Attack Vector: NETWORK
Attack Complexity: HIGH
Vulnerable Package
7 HIGH CVE-2026-0628 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Insufficient policy enforcement in WebView tag in Google Chrome prior to 143.0.7499.192 allowed an attacker who convinced a user to install a malic...
Attack Vector: NETWORK
Attack Complexity: LOW
Vulnerable Package
8 HIGH CVE-2026-1861 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Heap Buffer Overflow in libvpx in Google Chrome prior to 144.0.7559.132 allowed a remote attacker to potentially exploit heap corruption via a craf...
Attack Vector: NETWORK
Attack Complexity: LOW
Vulnerable Package
9 HIGH CVE-2026-34770 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 38.8.6, 39.x prior to 39....
Attack Vector: LOCAL
Attack Complexity: HIGH
Vulnerable Package
10 HIGH CVE-2026-34771 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 38.8.6, 39.x prior to 39....
Attack Vector: NETWORK
Attack Complexity: HIGH
Vulnerable Package
11 HIGH CVE-2026-34774 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. Prior to versions 39.8.1, 40.x prior to 40....
Attack Vector: NETWORK
Attack Complexity: HIGH
Vulnerable Package
12 HIGH CVE-2026-34780 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Electron is a framework for writing cross-platform desktop applications using JavaScript, HTML and CSS. From versions 39.0.0-alpha.1 prior to 39.8....
Attack Vector: NETWORK
Attack Complexity: HIGH
Vulnerable Package
13 HIGH Cx39aef355-ca85 Npm-@eslint/plugin-kit-0.2.8
detailsRecommended version: 0.3.4
Description: The "ConfigCommentParser#parseJSONLikeConfig" API is vulnerable to a Regular Expression Denial of Service (ReDoS) attack in its only argument. This...
Attack Vector: NETWORK
Attack Complexity: LOW
Vulnerable Package
14 HIGH SSRF /libs/common/src/services/api.service.ts: 1327
detailsThe application sends a request to a remote server, for some resource, using createRequest in /libs/common/src/services/api.service.ts:1270. How...
Attack Vector
15 HIGH SSRF /libs/common/src/services/api.service.ts: 1335
detailsThe application sends a request to a remote server, for some resource, using createRequest in /libs/common/src/services/api.service.ts:1270. How...
Attack Vector
16 HIGH SSRF /libs/common/src/services/api.service.ts: 1328
detailsThe application sends a request to a remote server, for some resource, using createRequest in /libs/common/src/services/api.service.ts:1270. How...
Attack Vector
17 HIGH SSRF /libs/common/src/services/api.service.ts: 1327
detailsThe application sends a request to a remote server, for some resource, using createRequest in /libs/common/src/services/api.service.ts:1241. How...
Attack Vector
18 HIGH SSRF /libs/common/src/services/api.service.ts: 1335
detailsThe application sends a request to a remote server, for some resource, using createRequest in /libs/common/src/services/api.service.ts:1241. How...
Attack Vector
19 HIGH SSRF /libs/common/src/services/api.service.ts: 1328
detailsThe application sends a request to a remote server, for some resource, using createRequest in /libs/common/src/services/api.service.ts:1241. How...
Attack Vector
20 MEDIUM CVE-2025-13632 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Inappropriate implementation in DevTools in Google Chrome prior to 143.0.7499.41 allowed an attacker who convinced a user to install a malicious ex...
Attack Vector: NETWORK
Attack Complexity: LOW
Vulnerable Package
21 MEDIUM CVE-2025-13635 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Inappropriate implementation in Downloads in Google Chrome prior to 143.0.7499.41 allowed a local attacker to perform UI spoofing via a crafted HTM...
Attack Vector: LOCAL
Attack Complexity: LOW
Vulnerable Package
22 MEDIUM CVE-2025-13636 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Inappropriate implementation in Split View in Google Chrome prior to 143.0.7499.41 allowed a remote attacker who convinced a user to engage in spec...
Attack Vector: NETWORK
Attack Complexity: LOW
Vulnerable Package
23 MEDIUM CVE-2025-13637 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Inappropriate implementation in Downloads in Google Chrome prior to 143.0.7499.41 allowed a remote attacker who convinced a user to engage in speci...
Attack Vector: NETWORK
Attack Complexity: LOW
Vulnerable Package
24 MEDIUM Client_DOM_Open_Redirect /apps/desktop/src/auth/scripts/duo.js: 277
detailsThe potentially tainted value provided by substring in /apps/desktop/src/auth/scripts/duo.js at line 277 is used as a destination URL by open in /...
Attack Vector
25 LOW CVE-2025-13640 Npm-electron-39.2.6
detailsRecommended version: 41.2.0
Description: Inappropriate implementation in Passwords in Google Chrome prior to 143.0.7499.41 allowed a local attacker to bypass authentication via physical ac...
Attack Vector: PHYSICAL
Attack Complexity: LOW
Vulnerable Package

Fixed Issues (1) Great job! The following issues were fixed in this Pull Request
Severity Issue Source File / Package
HIGH SSRF /libs/common/src/services/api.service.ts: 1343

@quexten quexten changed the title Add unlock for key connector with SDK [PM-30584] Add unlock for key connector with SDK Mar 11, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 11, 2026

Codecov Report

❌ Patch coverage is 64.70588% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 46.83%. Comparing base (9732938) to head (5d8ea47).
⚠️ Report is 176 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
libs/unlock/src/default-unlock.service.ts 22.22% 7 Missing ⚠️
...rc/auth/models/response/identity-token.response.ts 0.00% 4 Missing ⚠️
libs/unlock/src/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #19367      +/-   ##
==========================================
+ Coverage   46.47%   46.83%   +0.36%     
==========================================
  Files        3866     3881      +15     
  Lines      115231   116507    +1276     
  Branches    17549    17756     +207     
==========================================
+ Hits        53553    54566    +1013     
- Misses      59237    59461     +224     
- Partials     2441     2480      +39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@quexten quexten marked this pull request as ready for review March 11, 2026 13:04
@quexten quexten requested review from a team as code owners March 11, 2026 13:04
@ike-kottlowski
Copy link
Copy Markdown
Contributor

#19422 has been merged.

Comment thread libs/auth/src/common/login-strategies/user-api-login.strategy.ts Outdated
Comment thread libs/unlock/src/default-unlock.service.ts Outdated
Comment thread libs/unlock/src/default-unlock.service.ts Outdated
mzieniukbw
mzieniukbw previously approved these changes Mar 16, 2026
@quexten quexten marked this pull request as ready for review April 3, 2026 06:17
Comment thread libs/auth/src/common/login-strategies/sso-login.strategy.ts Outdated
Comment thread libs/auth/src/common/login-strategies/user-api-login.strategy.ts
Comment thread libs/auth/src/common/login-strategies/user-api-login.strategy.ts Outdated
Comment thread libs/common/src/auth/models/response/identity-token.response.ts Outdated
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

@JaredSnider-Bitwarden JaredSnider-Bitwarden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for iterating on this! This looks great!
Not sure what's going on with CI rust lint errors, but approving.

@quexten
Copy link
Copy Markdown
Contributor Author

quexten commented Apr 14, 2026

Rust errors seem unrelated.

@quexten quexten merged commit 8730a27 into main Apr 14, 2026
145 of 153 checks passed
@quexten quexten deleted the km/unlock-kc-with-sdk branch April 14, 2026 02:08
nikwithak pushed a commit that referenced this pull request Apr 15, 2026
* Add unlock for key connector with SDK

* Cleanup merge conflicts

* Cleanup

* Eslint error

* Fix tests

* Fix tests

* Eslint fix

* Fix comment

* Prettier

* Remove setting masterkeyencrypteduserkey to state

* Remove unused enlint directive

* Rename feature flag

* Fix order of setting state

* Fix test build

* Fix cli

* Eslint

* Fix build error

* Fix build error

* Undo changes to development.json

* Prevent unflagged changes

* Apply feedback around flag caching

* Apply feedback

* Cleanup
@djsmith85 djsmith85 added t:feature Change Type - Feature Development web cli CLI Application feature-flag browser Browser Extension desktop Desktop Application labels Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

browser Browser Extension cli CLI Application desktop Desktop Application feature-flag t:feature Change Type - Feature Development web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants