Skip to content

[PM-34127] feat: Integrate card scanner with VaultAddEdit#6722

Merged
SaintPatrck merged 3 commits intomainfrom
card-scanner/4-addedit-integration
Apr 9, 2026
Merged

[PM-34127] feat: Integrate card scanner with VaultAddEdit#6722
SaintPatrck merged 3 commits intomainfrom
card-scanner/4-addedit-integration

Conversation

@SaintPatrck
Copy link
Copy Markdown
Contributor

@SaintPatrck SaintPatrck commented Mar 26, 2026

🎟️ Tracking

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

📔 Objective

Integrate the card scanner with the VaultAddEdit screen:

  • VaultAddEditViewModel: Collect CardScanManager results, map scanned card data to form fields (number, expiry, CVV, brand detection), and emit focus event for cardholder name input
  • VaultAddEditScreen: Add "Scan card" button for Card cipher types, gated behind card-scanner-mobile feature flag. After a successful scan, focus the cardholder name field and show the keyboard using DeferredBackgroundEvent to survive lifecycle filtering
  • VaultAddEditCardItems: New scan card row composable
  • VaultUnlockedNavigation: Wire CardScanScreen destination and navigation
  • Camera permission: Reuses existing launcher pattern from QR code scanner

Includes ViewModel and Screen tests for scan result handling, partial scans, feature flag gating, and post-scan focus behavior.

📸 Screenshots

Figma designs (based on iOS)

Permission dialog

image

Scan flow

Screen_recording_20260402_155715.mp4

@SaintPatrck SaintPatrck added the ai-review-vnext Request a Claude code review using the vNext workflow label Mar 26, 2026
@github-actions github-actions bot added app:password-manager Bitwarden Password Manager app context t:feature Change Type - Feature Development labels Mar 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

Bitwarden Claude Code Review

Overall Assessment: APPROVE

This PR integrates the card scanner with the VaultAddEdit screen, adding scan-card button UI gated behind a feature flag, camera permission handling with a settings dialog, card scan result mapping to form fields (number, expiry, CVV, brand detection), and post-scan focus on the cardholder name input. The implementation closely follows the established QR code scanner pattern for navigation, permission handling, and result flow. Card data remains client-side throughout the flow. Test coverage is comprehensive, including ViewModel tests for scan results, partial scans, flag gating, permission states, and Screen tests for UI visibility and focus behavior.

Code Review Details

No findings. The code follows established patterns, handles edge cases well (partial scans preserve existing fields, duplicate scan guard via hasHandledScan, graceful fallback for invalid month values), and includes thorough test coverage.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 26, 2026

Logo
Checkmarx One – Scan Summary & Detailsd4898213-7837-4ea1-afc5-ae0564ab36dc


New Issues (128) Checkmarx found the following issues in this Pull Request
# Severity Issue Source File / Package Checkmarx Insight
1 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/disk/CookieDiskSourceTest.kt: 154
detailsThe web application's `clearCookies should remove all stored cookie configs` method creates a cookie Cookie, at line 154 of /app/src/test/kotlin/...
Attack Vector
2 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/disk/CookieDiskSourceTest.kt: 148
detailsThe web application's `clearCookies should remove all stored cookie configs` method creates a cookie Cookie, at line 148 of /app/src/test/kotlin/...
Attack Vector
3 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/network/NetworkCookieManagerTest.kt: 203
detailsThe web application's Lambda method creates a cookie Cookie, at line 203 of /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/network/...
Attack Vector
4 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/network/NetworkCookieManagerTest.kt: 229
detailsThe web application's Lambda method creates a cookie Cookie, at line 229 of /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/network/...
Attack Vector
5 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/util/CookieConfigurationDataExtensionsTest.kt: 46
detailsThe web application's `toNetworkCookieList should map multiple cookies correctly` method creates a cookie Cookie, at line 46 of /app/src/test/kot...
Attack Vector
6 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/util/CookieConfigurationDataExtensionsTest.kt: 62
detailsThe web application's `toNetworkCookie should map name and value correctly` method creates a cookie Cookie, at line 62 of /app/src/test/kotlin/co...
Attack Vector
7 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/util/CookieConfigurationDataExtensionsTest.kt: 45
detailsThe web application's `toNetworkCookieList should map multiple cookies correctly` method creates a cookie Cookie, at line 45 of /app/src/test/kot...
Attack Vector
8 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/util/CookieConfigurationDataExtensionsTest.kt: 31
detailsThe web application's `toNetworkCookieList should map single cookie correctly` method creates a cookie Cookie, at line 31 of /app/src/test/kotlin...
Attack Vector
9 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/disk/CookieDiskSourceTest.kt: 129
detailsThe web application's `storeCookieConfig with null should not affect other hostnames` method creates a cookie Cookie, at line 129 of /app/src/tes...
Attack Vector
10 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/disk/CookieDiskSourceTest.kt: 123
detailsThe web application's `storeCookieConfig with null should not affect other hostnames` method creates a cookie Cookie, at line 123 of /app/src/tes...
Attack Vector
11 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/disk/CookieDiskSourceTest.kt: 103
detailsThe web application's `storeCookieConfig with null should remove stored config` method creates a cookie Cookie, at line 103 of /app/src/test/kotl...
Attack Vector
12 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/sdk/ServerCommunicationConfigRepositoryTest.kt: 167
detailsThe web application's Lambda method creates a cookie Cookie, at line 167 of /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/sdk/S...
Attack Vector
13 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/sdk/ServerCommunicationConfigRepositoryTest.kt: 168
detailsThe web application's Lambda method creates a cookie Cookie, at line 168 of /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/sdk/S...
Attack Vector
14 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/sdk/ServerCommunicationConfigRepositoryTest.kt: 81
detailsThe web application's Lambda method creates a cookie Cookie, at line 81 of /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/sdk/Se...
Attack Vector
15 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/sdk/ServerCommunicationConfigRepositoryTest.kt: 80
detailsThe web application's Lambda method creates a cookie Cookie, at line 80 of /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/sdk/Se...
Attack Vector
16 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/repository/util/AcquiredCookieExtensionsTest.kt: 39
detailsThe web application's `toConfigurationDataCookies should map list of AcquiredCookie to list of Cookie` method creates a cookie Cookie, at line 39...
Attack Vector
17 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/repository/util/CookieConfigurationDataExtensionsTest.kt: 12
detailsThe web application's `toAcquiredCookie should map Cookie to AcquiredCookie` method creates a cookie Cookie, at line 12 of /app/src/test/kotlin/c...
Attack Vector
18 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/repository/util/CookieConfigurationDataExtensionsTest.kt: 31
detailsThe web application's `toAcquiredCookiesList should map list of Cookie to list of AcquiredCookie` method creates a cookie Cookie, at line 31 of /...
Attack Vector
19 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/repository/util/CookieConfigurationDataExtensionsTest.kt: 32
detailsThe web application's `toAcquiredCookiesList should map list of Cookie to list of AcquiredCookie` method creates a cookie Cookie, at line 32 of /...
Attack Vector
20 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/repository/util/AcquiredCookieExtensionsTest.kt: 40
detailsThe web application's `toConfigurationDataCookies should map list of AcquiredCookie to list of Cookie` method creates a cookie Cookie, at line 40...
Attack Vector
21 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/repository/util/AcquiredCookieExtensionsTest.kt: 20
detailsThe web application's `toConfigurationCookie should map AcquiredCookie to CookieConfigurationData Cookie` method creates a cookie Cookie, at line...
Attack Vector
22 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/disk/CookieDiskSourceTest.kt: 189
detailsThe web application's `storage should isolate configs by hostname` method creates a cookie Cookie, at line 189 of /app/src/test/kotlin/com/x8bit/...
Attack Vector
23 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/disk/CookieDiskSourceTest.kt: 180
detailsThe web application's `storage should isolate configs by hostname` method creates a cookie Cookie, at line 180 of /app/src/test/kotlin/com/x8bit/...
Attack Vector
24 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/disk/CookieDiskSourceTest.kt: 81
detailsThe web application's `storage should handle cookies with multiple values` method creates a cookie Cookie, at line 81 of /app/src/test/kotlin/com...
Attack Vector
25 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/disk/CookieDiskSourceTest.kt: 85
detailsThe web application's `storage should handle cookies with multiple values` method creates a cookie Cookie, at line 85 of /app/src/test/kotlin/com...
Attack Vector
26 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/disk/CookieDiskSourceTest.kt: 51
detailsThe web application's `storeCookieConfig should update existing config` method creates a cookie Cookie, at line 51 of /app/src/test/kotlin/com/x8...
Attack Vector
27 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/disk/CookieDiskSourceTest.kt: 61
detailsThe web application's `storeCookieConfig should update existing config` method creates a cookie Cookie, at line 61 of /app/src/test/kotlin/com/x8...
Attack Vector
28 MEDIUM HttpOnly_Cookie_Flag_Not_Set /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/datasource/disk/CookieDiskSourceTest.kt: 32
detailsThe web application's `storeCookieConfig should persist config and getCookieConfig should retrieve it` method creates a cookie Cookie, at line 32...
Attack Vector
29 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt: 98
detailsMethod createMockCipherView at line 98 of /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt sends user in...
Attack Vector
30 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryViewModelTest.kt: 203
detailsMethod Lambda at line 203 of /app/src/test/kotlin/com/x8bit/bitwarden/ui/tools/feature/generator/passwordhistory/PasswordHistoryViewModelTest.kt s...
Attack Vector
31 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/tools/feature/send/addedit/AddEditSendViewModelTest.kt: 1202
detailsMethod Lambda at line 1202 of /app/src/test/kotlin/com/x8bit/bitwarden/ui/tools/feature/send/addedit/AddEditSendViewModelTest.kt sends user inform...
Attack Vector
32 MEDIUM Privacy_Violation /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest.kt: 429
detailsMethod Lambda at line 429 of /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest...
Attack Vector
33 MEDIUM Privacy_Violation /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest.kt: 386
detailsMethod Lambda at line 386 of /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest...
Attack Vector
34 MEDIUM Privacy_Violation /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest.kt: 402
detailsMethod Lambda at line 402 of /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest...
Attack Vector
35 MEDIUM Privacy_Violation /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest.kt: 334
detailsMethod Lambda at line 334 of /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest...
Attack Vector
36 MEDIUM Privacy_Violation /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest.kt: 305
detailsMethod Lambda at line 305 of /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest...
Attack Vector
37 MEDIUM Privacy_Violation /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest.kt: 265
detailsMethod Lambda at line 265 of /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest...
Attack Vector
38 MEDIUM Privacy_Violation /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest.kt: 237
detailsMethod Lambda at line 237 of /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest...
Attack Vector
39 MEDIUM Privacy_Violation /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest.kt: 206
detailsMethod Lambda at line 206 of /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest...
Attack Vector
40 MEDIUM Privacy_Violation /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest.kt: 170
detailsMethod Lambda at line 170 of /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest...
Attack Vector
41 MEDIUM Privacy_Violation /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest.kt: 110
detailsMethod Lambda at line 110 of /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest...
Attack Vector
42 MEDIUM Privacy_Violation /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest.kt: 90
detailsMethod Lambda at line 90 of /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest....
Attack Vector
43 MEDIUM Privacy_Violation /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest.kt: 70
detailsMethod Lambda at line 70 of /testharness/src/test/kotlin/com/bitwarden/testharness/ui/platform/feature/createpassword/CreatePasswordViewModelTest....
Attack Vector
44 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/verifypassword/VerifyPasswordViewModelTest.kt: 482
detailsMethod Lambda at line 482 of /app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/exportitems/verifypassword/VerifyPasswordViewModelTest.kt s...
Attack Vector
45 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModelTest.kt: 585
detailsMethod Lambda at line 585 of /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModelTest.kt se...
Attack Vector
46 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/vaultunlock/VaultUnlockViewModelTest.kt: 796
detailsMethod `on UnlockClick for password unlock should display error dialog on AuthenticationError` at line 796 of /app/src/test/kotlin/com/x8bit/bitw...
Attack Vector
47 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountViewModelTest.kt: 175
detailsMethod Lambda at line 175 of /app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountViewM...
Attack Vector
48 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt: 61
detailsMethod Lambda at line 61 of /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt sends user information outs...
Attack Vector
49 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt: 61
detailsMethod Lambda at line 61 of /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt sends user information outs...
Attack Vector
50 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt: 125
detailsMethod createMockLoginView at line 125 of /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt sends user in...
Attack Vector
51 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/data/credentials/model/Fido2CredentialAssertionRequestUtil.kt: 12
detailsMethod createMockFido2CredentialAssertionRequest at line 12 of /app/src/test/kotlin/com/x8bit/bitwarden/data/credentials/model/Fido2CredentialAsser...
Attack Vector
52 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/loginapproval/LoginApprovalViewModelTest.kt: 307
detailsMethod Lambda at line 307 of /app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/loginapproval/LoginApprovalViewM...
Attack Vector
53 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/loginapproval/LoginApprovalViewModelTest.kt: 376
detailsMethod Lambda at line 376 of /app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/loginapproval/LoginApprovalViewM...
Attack Vector
54 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/loginapproval/LoginApprovalViewModelTest.kt: 150
detailsMethod `on ApproveAccountChangeClick dialog state should be cleared, user should be switched, and getAuthRequestByIdFlow should be called` at lin...
Attack Vector
55 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModelTest.kt: 675
detailsMethod at line 675 of /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModelTest.kt sends us...
Attack Vector
56 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModelTest.kt: 687
detailsMethod at line 687 of /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModelTest.kt sends us...
Attack Vector
57 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModelTest.kt: 446
detailsMethod Lambda at line 446 of /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModelTest.kt se...
Attack Vector
58 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModelTest.kt: 330
detailsMethod Lambda at line 330 of /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModelTest.kt se...
Attack Vector
59 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModelTest.kt: 362
detailsMethod Lambda at line 362 of /app/src/test/kotlin/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModelTest.kt se...
Attack Vector
60 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt: 77
detailsMethod Lambda at line 77 of /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt sends user information outs...
Attack Vector
61 MEDIUM Privacy_Violation /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt: 77
detailsMethod Lambda at line 77 of /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/datasource/sdk/model/CipherViewUtil.kt sends user information outs...
Attack Vector
62 MEDIUM Use_of_Hardcoded_Password /app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/attachments/AttachmentsViewModelTest.kt: 596
detailsThe application uses the hard-coded password "mockId-1" for authentication purposes, either using it to verify users' identities, or to access an...
Attack Vector
63 MEDIUM Use_of_Hardcoded_Password /app/src/test/kotlin/com/x8bit/bitwarden/data/platform/manager/sdk/repository/SdkCipherRepositoryTest.kt: 205
detailsThe application uses the hard-coded password "cipherId" for authentication purposes, either using it to verify users' identities, or to access ano...
Attack Vector
64 MEDIUM Use_of_Hardcoded_Password /app/src/test/kotlin/com/x8bit/bitwarden/ui/tools/feature/send/addedit/AddEditSendViewModelTest.kt: 573
detailsThe application uses the hard-coded password "some-password" for authentication purposes, either using it to verify users' identities, or to acce...
Attack Vector
65 MEDIUM Use_of_Hardcoded_Password /app/src/test/kotlin/com/x8bit/bitwarden/ui/platform/feature/rootnav/RootNavViewModelTest.kt: 772
detailsThe application uses the hard-coded password "testPassword123" for authentication purposes, either using it to verify users' identities, or to acc...
Attack Vector
66 MEDIUM Use_of_Hardcoded_Password /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt: 1955
detailsThe application uses the hard-coded password "mockValue" for authentication purposes, either using it to verify users' identities, or to access an...
Attack Vector
67 MEDIUM Use_of_Hardcoded_Password /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt: 2011
detailsThe application uses the hard-coded password "mockValue" for authentication purposes, either using it to verify users' identities, or to access an...
Attack Vector
68 MEDIUM Use_of_Hardcoded_Password /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt: 1252
detailsThe application uses the hard-coded password "mockValue" for authentication purposes, either using it to verify users' identities, or to access an...
Attack Vector
69 MEDIUM Use_of_Hardcoded_Password /app/src/test/kotlin/com/x8bit/bitwarden/data/vault/manager/VaultLockManagerTest.kt: 1162
detailsThe application uses the hard-coded password "mockValue" for authentication purposes, either using it to verify users' identities, or to access an...
Attack Vector

More results are available on the CxOne platform

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 64.16667% with 43 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.69%. Comparing base (de47c50) to head (5f9f445).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
.../ui/vault/feature/addedit/VaultAddEditViewModel.kt 73.61% 3 Missing and 16 partials ⚠️
...den/ui/vault/feature/addedit/VaultAddEditScreen.kt 31.81% 13 Missing and 2 partials ⚠️
...i/vault/feature/addedit/VaultAddEditItemContent.kt 28.57% 4 Missing and 1 partial ⚠️
...e/addedit/handlers/VaultAddEditCardTypeHandlers.kt 40.00% 3 Missing ⚠️
...ui/vault/feature/addedit/VaultAddEditNavigation.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6722      +/-   ##
==========================================
+ Coverage   84.85%   85.69%   +0.83%     
==========================================
  Files         844      827      -17     
  Lines       59037    58549     -488     
  Branches     8563     8589      +26     
==========================================
+ Hits        50097    50173      +76     
+ Misses       5958     5376     -582     
- Partials     2982     3000      +18     
Flag Coverage Δ
app-data 17.48% <0.00%> (-0.04%) ⬇️
app-ui-auth-tools 20.38% <0.00%> (-0.05%) ⬇️
app-ui-platform 15.27% <0.00%> (-0.04%) ⬇️
app-ui-vault 25.96% <64.16%> (+0.07%) ⬆️
authenticator 6.55% <0.00%> (-0.02%) ⬇️
lib-core-network-bridge 4.31% <0.00%> (+0.06%) ⬆️
lib-data-ui 1.03% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SaintPatrck SaintPatrck force-pushed the card-scanner/4-addedit-integration branch from 583a110 to 7c9d521 Compare March 26, 2026 12:56
@SaintPatrck SaintPatrck force-pushed the card-scanner/4-addedit-integration branch from 7c9d521 to 204305e Compare March 26, 2026 13:19
@SaintPatrck SaintPatrck added the innovation Feature work related to Innovation Sprint or BEEEP projects label Mar 27, 2026
@SaintPatrck SaintPatrck force-pushed the card-scanner/3-card-scan-screen branch from be951b7 to ff88fbb Compare April 1, 2026 14:10
@SaintPatrck SaintPatrck force-pushed the card-scanner/4-addedit-integration branch from 204305e to ca82c3b Compare April 1, 2026 14:10
@SaintPatrck SaintPatrck added the hold do not merge yet label Apr 1, 2026
@github-actions github-actions bot added the app:authenticator Bitwarden Authenticator app context label Apr 1, 2026
@SaintPatrck SaintPatrck force-pushed the card-scanner/4-addedit-integration branch from 21a7f1a to 31ae25f Compare April 1, 2026 18:21
@github-actions github-actions bot removed the app:authenticator Bitwarden Authenticator app context label Apr 1, 2026
@SaintPatrck SaintPatrck force-pushed the card-scanner/4-addedit-integration branch from 31ae25f to cb0433e Compare April 2, 2026 17:34
@SaintPatrck SaintPatrck marked this pull request as ready for review April 2, 2026 17:34
@SaintPatrck SaintPatrck requested a review from a team as a code owner April 2, 2026 17:34
} else {
toastManager.show(
messageId = BitwardenString
.enable_camera_permission_to_use_the_scanner,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should this be a Snackbar?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That's a good question. I'll have to check with design. Good catch.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We use a dialog with an option to navigate to settings or dismiss the dialog in other places. That's what happens here now, too.

@SaintPatrck SaintPatrck force-pushed the card-scanner/3-card-scan-screen branch from eeede50 to d076c37 Compare April 7, 2026 11:23
@SaintPatrck SaintPatrck force-pushed the card-scanner/4-addedit-integration branch from d16f24a to 009a1bc Compare April 7, 2026 11:30
@github-actions github-actions bot added the app:authenticator Bitwarden Authenticator app context label Apr 7, 2026
@SaintPatrck SaintPatrck removed the hold do not merge yet label Apr 7, 2026
Base automatically changed from card-scanner/3-card-scan-screen to main April 7, 2026 20:00
@SaintPatrck SaintPatrck force-pushed the card-scanner/4-addedit-integration branch from 4f8369b to 2b11285 Compare April 7, 2026 20:10
Wire the card scanner into the card cipher add/edit flow:
- VaultAddEditViewModel: inject CardScanManager, handle scan results,
  populate card fields with brand-aware CVV validation
- VaultAddEditScreen: pass scanner enabled state and click handler
- VaultAddEditCardItems: conditionally render Scan Card button
- VaultUnlockedNavigation: register card scan route
@SaintPatrck SaintPatrck force-pushed the card-scanner/4-addedit-integration branch from 2b11285 to daa0596 Compare April 7, 2026 20:10
class CardScanViewModel @Inject constructor(
savedStateHandle: SavedStateHandle,
private val cardScanManager: CardScanManager,
savedStateHandle: SavedStateHandle,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What's up with this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Another rebase artifact 🤦

CardScanViewModel(
savedStateHandle = SavedStateHandle(),
savedStateHandle = SavedStateHandle().apply {
set("state", initialState)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@SaintPatrck SaintPatrck added this pull request to the merge queue Apr 9, 2026
Merged via the queue into main with commit 29e73ad Apr 9, 2026
32 checks passed
@SaintPatrck SaintPatrck deleted the card-scanner/4-addedit-integration branch April 9, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review-vnext Request a Claude code review using the vNext workflow app:authenticator Bitwarden Authenticator app context app:password-manager Bitwarden Password Manager app context innovation Feature work related to Innovation Sprint or BEEEP projects t:feature Change Type - Feature Development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants