Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-17035] Fix biometric unlock badge in mv2 #12854

Merged
merged 22 commits into from
Jan 15, 2025
Merged

[PM-17035] Fix biometric unlock badge in mv2 #12854

merged 22 commits into from
Jan 15, 2025

Conversation

quexten
Copy link
Contributor

@quexten quexten commented Jan 14, 2025

🎟️ Tracking

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

📔 Objective

For whatever reason, main.background.ts only updates the badge on:

  • account switch
  • logout

This PR forces a switchaccount call, after setting the userkey, such that the actions that main.background.ts does are performed. These are:

  • Updating the badge
  • Refreshing the notification websocket
  • Refresh menu / overlay
  • etc.

Note: It is unclear to me whether this is the intended method to have the badge refreshed.

📸 Screenshots

⏰ 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

  • 👍 (:+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

@quexten quexten changed the title Fix biometric unlock badge in mv2 [PM-17035] Fix biometric unlock badge in mv2 Jan 14, 2025
Copy link
Contributor

github-actions bot commented Jan 14, 2025

Logo
Checkmarx One – Scan Summary & Detailsacbf6153-bc4c-4b08-a00f-1fd7b622233e

New Issues (12)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Angular_Improper_Type_Pipe_Usage /apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.html: 107
detailsThe value used in hideAutofillButton$ at /apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.co...
Attack Vector
MEDIUM Angular_Improper_Type_Pipe_Usage /apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.html: 33
detailsThe value used in loading$ at /apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.html in line 33 may throw an exception with the ...
Attack Vector
MEDIUM Client_Privacy_Violation /bitwarden_license/bit-web/src/app/tools/access-intelligence/org-at-risk-apps-dialog.component.html: 15
detailsMethod org_at_risk_apps_dialog_component at line 15 of /bitwarden_license/bit-web/src/app/tools/access-intelligence/org-at-risk-apps-dialog.compone...
Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.html: 78
detailsMethod vault_v2_component at line 78 of /apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.html sends user information outside th...
Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.html: 72
detailsMethod vault_v2_component at line 72 of /apps/browser/src/vault/popup/components/vault-v2/vault-v2.component.html sends user information outside th...
Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-list-items.component.html: 3
detailsMethod autofill_vault_list_items_component at line 3 of /apps/browser/src/vault/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-...
Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.html: 104
detailsMethod itemGroup at line 104 of /apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.h...
Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.html: 91
detailsMethod itemGroup at line 91 of /apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.ht...
Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.ts: 117
detailsMethod at line 117 of /apps/browser/src/vault/popup/components/vault-v2/vault-list-items-container/vault-list-items-container.component.ts sends u...
Attack Vector
MEDIUM Client_Privacy_Violation /apps/browser/src/vault/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-list-items.component.html: 1
detailsMethod autofill_vault_list_items_component at line 1 of /apps/browser/src/vault/popup/components/vault-v2/autofill-vault-list-items/autofill-vault-...
Attack Vector
MEDIUM Client_Privacy_Violation /bitwarden_license/bit-web/src/app/tools/access-intelligence/all-applications.component.html: 92
detailsMethod all_applications_component at line 92 of /bitwarden_license/bit-web/src/app/tools/access-intelligence/all-applications.component.html sends ...
Attack Vector
MEDIUM Client_Privacy_Violation /bitwarden_license/bit-web/src/app/tools/access-intelligence/all-applications.component.html: 97
detailsMethod all_applications_component at line 97 of /bitwarden_license/bit-web/src/app/tools/access-intelligence/all-applications.component.html sends ...
Attack Vector
Fixed Issues (2)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
MEDIUM Client_Privacy_Violation /bitwarden_license/bit-web/src/app/tools/access-intelligence/org-at-risk-apps-dialog.component.html: 15
MEDIUM Client_Privacy_Violation /libs/tools/generator/components/src/username-generator.component.html: 3

Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 34.29%. Comparing base (f6f4bc9) to head (b4b7900).
Report is 5 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
.../auth/popup/settings/account-security.component.ts 0.00% 4 Missing ⚠️
...iometrics/background-browser-biometrics.service.ts 0.00% 4 Missing ⚠️
...ment/src/angular/lock/components/lock.component.ts 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12854      +/-   ##
==========================================
- Coverage   34.29%   34.29%   -0.01%     
==========================================
  Files        2935     2935              
  Lines       90237    90247      +10     
  Branches    16945    16948       +3     
==========================================
  Hits        30951    30951              
- Misses      56822    56832      +10     
  Partials     2464     2464              

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

@quexten quexten marked this pull request as ready for review January 14, 2025 12:16
@quexten quexten requested a review from a team as a code owner January 14, 2025 12:16
mzieniukbw
mzieniukbw previously approved these changes Jan 14, 2025
@quexten quexten changed the base branch from km/fix-autoprompt to main January 14, 2025 15:26
@quexten quexten dismissed mzieniukbw’s stale review January 14, 2025 15:26

The base branch was changed.

@quexten quexten requested a review from a team as a code owner January 14, 2025 15:26
@quexten quexten changed the base branch from main to km/fix-autoprompt January 14, 2025 15:27
@quexten quexten removed the request for review from a team January 14, 2025 15:27
@quexten quexten removed the request for review from Patrick-Pimentel-Bitwarden January 14, 2025 15:27
@quexten quexten marked this pull request as draft January 14, 2025 15:27
Base automatically changed from km/fix-autoprompt to main January 14, 2025 17:29
@quexten quexten requested a review from mzieniukbw January 15, 2025 13:22
@quexten quexten marked this pull request as ready for review January 15, 2025 13:22
@quexten
Copy link
Contributor Author

quexten commented Jan 15, 2025

Oh, seems the fix-autoprompt on firefox pr was targeting this branch. That's fine though, since both have been QA'd and are approved for merge/cherry-pick.

@quexten quexten enabled auto-merge (squash) January 15, 2025 14:06
@quexten quexten disabled auto-merge January 15, 2025 14:08
mzieniukbw
mzieniukbw previously approved these changes Jan 15, 2025
@quexten quexten requested review from JaredSnider-Bitwarden and a team January 15, 2025 14:47
@quexten
Copy link
Contributor Author

quexten commented Jan 15, 2025

Resolved merge conflicts.

@quexten quexten merged commit a5dce05 into main Jan 15, 2025
82 checks passed
@quexten quexten deleted the km/fix-badge-mv2 branch January 15, 2025 16:59
quexten added a commit that referenced this pull request Jan 15, 2025
* Fix biometrics not working in firefox or windows

* Remove logs

* Update badge after biometric unlock

* Add removal todo note

* Remove debug logging

* Fix type warnings

* Fix userkey typing in background biometrics service

* Simplify types for userkey in foreground-browser-biometrics and runtime.background.ts

* Add process reload logging

* Fix autoprompt not working when no process reload happened

* Fix biometric unlock badge in mv2

* Fix instant reprompt on firefox lock

* Remove biometrics autoprompt on firefox (#12856)

(cherry picked from commit a5dce05)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants