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-15994] Move encrypt service to km ownership #13220

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

quexten
Copy link
Contributor

@quexten quexten commented Feb 3, 2025

🎟️ Tracking

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

📔 Objective

Moves the encrypt services and encrypt service worker to KM ownership.

📸 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

Copy link
Contributor

github-actions bot commented Feb 3, 2025

Logo
Checkmarx One – Scan Summary & Detailsb328b729-fad1-4930-91f2-e6b4964d1731

Fixed Issues (1)

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

Severity Issue Source File / Package
LOW Angular_Usage_of_Unsafe_DOM_Sanitizer /libs/components/src/avatar/avatar.component.ts: 87

Copy link

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 40.29851% with 40 lines in your changes missing coverage. Please review.

Project coverage is 35.41%. Comparing base (72434bf) to head (0787576).

Files with missing lines Patch % Lines
...c/key-management/crypto/services/encrypt.worker.ts 0.00% 5 Missing ⚠️
apps/browser/src/background/main.background.ts 0.00% 4 Missing ⚠️
libs/angular/src/services/jslib-services.module.ts 0.00% 4 Missing ⚠️
...to/services/bulk-encrypt.service.implementation.ts 0.00% 2 Missing ⚠️
...ices/multithread-encrypt.service.implementation.ts 0.00% 2 Missing ⚠️
apps/browser/src/popup/services/services.module.ts 0.00% 1 Missing ⚠️
apps/desktop/src/app/services/init.service.ts 0.00% 1 Missing ⚠️
apps/desktop/src/app/services/services.module.ts 0.00% 1 Missing ⚠️
apps/desktop/src/auth/set-password.component.ts 0.00% 1 Missing ⚠️
...src/services/duckduckgo-message-handler.service.ts 0.00% 1 Missing ⚠️
... and 18 more
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #13220   +/-   ##
=======================================
  Coverage   35.41%   35.41%           
=======================================
  Files        3007     3007           
  Lines       90716    90716           
  Branches    16858    16858           
=======================================
  Hits        32129    32129           
  Misses      56123    56123           
  Partials     2464     2464           

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

Copy link
Contributor

@coroiu coroiu left a comment

Choose a reason for hiding this comment

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

Ouf, we have a PR bingo winner!

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks great! Thank you for breaking this up. Just found 2 services with relative imports, curious if those should be changed. Non blocking questions.

@@ -1,7 +1,7 @@
import { mock, MockProxy } from "jest-mock-extended";

import { makeEncString, makeSymmetricCryptoKey } from "../../../../spec";
import { EncryptService } from "../../abstractions/encrypt.service";
import { EncryptService } from "../../../key-management/crypto/abstractions/encrypt.service";
Copy link
Contributor

Choose a reason for hiding this comment

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

There are still some relative imports for EncryptService, is that worth taking another look at?

@@ -23,13 +23,13 @@ import { AccountService } from "../../auth/abstractions/account.service";
import { AutofillSettingsServiceAbstraction } from "../../autofill/services/autofill-settings.service";
import { DomainSettingsService } from "../../autofill/services/domain-settings.service";
import { FeatureFlag } from "../../enums/feature-flag.enum";
import { BulkEncryptService } from "../../key-management/crypto/abstractions/bulk-encrypt.service";
Copy link
Contributor

Choose a reason for hiding this comment

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

Relative import for the BulkEncryptService, is this worth taking a second look at?

Copy link
Member

@coltonhurst coltonhurst left a comment

Choose a reason for hiding this comment

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

Autofill changes look good, thanks @quexten

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.

4 participants