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-15804, PM-17130: Add logic to monitor when the screen on state to ensure the vault locks properly #4618

Merged

Conversation

david-livefront
Copy link
Collaborator

🎟️ Tracking

PM-17130
PM-15804

📔 Objective

This PR adds a broadcast receiver to the VaultLockManager in order to ensure that we lock the vault at the soonest possible moment.

There seems to be an issue in the way delay works inside a coroutine scope when the screen is off. The delay will take significantly longer to complete and cause the vault to not lock when it is supposed to. This new solution restarts the delay with an appropriate remaining time when the screen is turned back on to ensure we lock the vault correctly.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation 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

Copy link
Contributor

Logo
Checkmarx One – Scan Summary & Details33ab6969-a053-46af-aed7-9c3ffee6cbb9

New Issues (12)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 346
detailsMethod Lambda at line 346 of /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt sends use...
Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 346
detailsMethod Lambda at line 346 of /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt sends use...
Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModel.kt: 321
detailsMethod Lambda at line 321 of /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModel.kt sends user information ...
Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModel.kt: 321
detailsMethod Lambda at line 321 of /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/createaccount/CreateAccountViewModel.kt sends user information ...
Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemViewModel.kt: 905
detailsMethod Lambda at line 905 of /app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/item/VaultItemViewModel.kt sends user information outside the ...
Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/data/tools/generator/repository/utils/GeneratorRepositoryExtensions.kt: 11
detailsMethod generateRandomString at line 11 of /app/src/main/java/com/x8bit/bitwarden/data/tools/generator/repository/utils/GeneratorRepositoryExtension...
Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/data/autofill/manager/AutofillTotpManagerImpl.kt: 37
detailsMethod tryCopyTotpToClipboard at line 37 of /app/src/main/java/com/x8bit/bitwarden/data/autofill/manager/AutofillTotpManagerImpl.kt sends user info...
Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountViewModel.kt: 94
detailsMethod Lambda at line 94 of /app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccount/DeleteAccountViewMode...
Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 237
detailsMethod Lambda at line 237 of /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt sends use...
Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 259
detailsMethod Lambda at line 259 of /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt sends use...
Attack Vector
MEDIUM Privacy_Violation /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt: 248
detailsMethod Lambda at line 248 of /app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/completeregistration/CompleteRegistrationViewModel.kt sends use...
Attack Vector
LOW Use_of_Hardcoded_Password /app/src/main/java/com/x8bit/bitwarden/data/autofill/util/HtmlInfoExtensions.kt: 20 Attack Vector

Copy link
Collaborator

@dseverns-livefront dseverns-livefront left a comment

Choose a reason for hiding this comment

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

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.31%. Comparing base (e63a549) to head (d80fe2f).
Report is 1 commits behind head on release/2025.01-rc14.

Additional details and impacted files
@@                   Coverage Diff                    @@
##           release/2025.01-rc14    #4618      +/-   ##
========================================================
- Coverage                 88.31%   88.31%   -0.01%     
========================================================
  Files                       603      603              
  Lines                     40269    40291      +22     
  Branches                   5697     5697              
========================================================
+ Hits                      35562    35581      +19     
  Misses                     2721     2721              
- Partials                   1986     1989       +3     

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

@david-livefront
Copy link
Collaborator Author

Thanks @phil-livefront & @dseverns-livefront

@david-livefront david-livefront merged commit 54456d3 into release/2025.01-rc14 Jan 23, 2025
8 checks passed
@david-livefront david-livefront deleted the PM-17130-cherry-pick-vault-lock-timeout branch January 23, 2025 22:51
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