-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
refactor: migrate Encryptor
to TypeScript and increase PBKDF2 iterations number
#8828
Conversation
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@metamask/[email protected], npm/@metamask/[email protected] |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. Ignoring: Next stepsTake a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8828 +/- ##
==========================================
+ Coverage 45.58% 45.68% +0.10%
==========================================
Files 1276 1277 +1
Lines 31301 31326 +25
Branches 3202 3211 +9
==========================================
+ Hits 14269 14312 +43
+ Misses 16186 16168 -18
Partials 846 846 ☔ View full report in Codecov by Sentry. |
@SocketSecurity ignore npm/@metamask/[email protected] |
Bitrise❌❌❌ Commit hash: e96b45d Note
|
@SocketSecurity ignore npm/@babel/[email protected] |
Those dependencies were not introduced in this PR |
Bitrise❌❌❌ Commit hash: cbbd8c9 Note
|
I think we could use a more explicit PR name, something like:
WDYT? |
Encryptor
to TypeScript and increase PBKDF2 iterations number
Bitrise✅✅✅ Commit hash: 07d26b0 Note
|
283cdba
to
7c405b4
Compare
7c405b4
to
ec5c5af
Compare
Co-authored-by: Gustavo Antunes <[email protected]>
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
This reverts commit 4a4fbe6.
Quality Gate passedIssues Measures |
Diff between branches git diff refactor/encryptor refactor/encryptor-class
diff --git a/yarn.lock b/yarn.lock
index c3207f56c..c087ed70a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4052,16 +4052,6 @@
"@metamask/safe-event-emitter" "^3.0.0"
"@metamask/utils" "^8.3.0"
-"@metamask/json-rpc-middleware-stream@^6.0.2":
- version "6.0.2"
- resolved "https://registry.yarnpkg.com/@metamask/json-rpc-middleware-stream/-/json-rpc-middleware-stream-6.0.2.tgz#75852ce481f8f9f091edbfc04ffdf964f8f3cabd"
- integrity sha512-jtyx3PRfc1kqoLpYveIVQNwsxYKefc64/LCl9h9Da1m3nUKEvypbYuXSIwi237qvOjKmNHQKsDOZg6f4uBf62Q==
- dependencies:
- "@metamask/json-rpc-engine" "^7.3.2"
- "@metamask/safe-event-emitter" "^3.0.0"
- "@metamask/utils" "^8.3.0"
- readable-stream "^3.6.2"
-
"@metamask/key-tree@^9.0.0":
version "9.0.0"
resolved "https://registry.yarnpkg.com/@metamask/key-tree/-/key-tree-9.0.0.tgz#ce880a79f35af5b3b540b44be16ff98cc77be4c1"
@@ -4087,13 +4077,13 @@
uuid "^9.0.0"
"@metamask/keyring-api@^4.0.0":
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/@metamask/keyring-api/-/keyring-api-4.0.2.tgz#dc7ba93cf5cfd381c091dc231895dcfef72affc8"
- integrity sha512-5Jc376i2ULXEopi5S6y/BZzloW4lrNOatMczKrsYVMiJdTHYZh9nPZY41ggZVxM1zwETvCQAX+QrAV2FXZQxAw==
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/@metamask/keyring-api/-/keyring-api-4.0.0.tgz#5e9eba65d6db56c2a64d4eaae2ba26d0ded036e2"
+ integrity sha512-wkApdp5UOwmPW4SuX+bj9vu73hxNzzrFBnwvDA0HN7oIiCDSH/97o8C5LsZ7Hmn6YplMEwOl28AhuQgFjOR2+w==
dependencies:
- "@metamask/providers" "^15.0.0"
- "@metamask/snaps-sdk" "^3.1.1"
- "@metamask/utils" "^8.3.0"
+ "@metamask/providers" "^14.0.1"
+ "@metamask/snaps-sdk" "^1.3.2"
+ "@metamask/utils" "^8.1.0"
"@types/uuid" "^9.0.1"
superstruct "^1.0.3"
uuid "^9.0.0"
@@ -4354,42 +4344,6 @@
readable-stream "^3.6.2"
webextension-polyfill "^0.10.0"
-"@metamask/providers@^15.0.0":
- version "15.0.0"
- resolved "https://registry.yarnpkg.com/@metamask/providers/-/providers-15.0.0.tgz#e8957bb89d2f3379b32b60117d79a141e44db2bc"
- integrity sha512-FXvL1NQNl6I7fMOJTfQYcBlBZ33vSlm6w80cMpmn8sJh0Lb7wcBpe02UwBsNlARnI+Qsr26XeDs6WHUHQh8CuA==
- dependencies:
- "@metamask/json-rpc-engine" "^7.3.2"
- "@metamask/json-rpc-middleware-stream" "^6.0.2"
- "@metamask/object-multiplex" "^2.0.0"
- "@metamask/rpc-errors" "^6.2.1"
- "@metamask/safe-event-emitter" "^3.0.0"
- "@metamask/utils" "^8.3.0"
- detect-browser "^5.2.0"
- extension-port-stream "^3.0.0"
- fast-deep-equal "^3.1.3"
- is-stream "^2.0.0"
- readable-stream "^3.6.2"
- webextension-polyfill "^0.10.0"
-
-"@metamask/providers@^16.0.0":
- version "16.0.0"
- resolved "https://registry.yarnpkg.com/@metamask/providers/-/providers-16.0.0.tgz#5ba3bcbdc59b334958f1dcf6ed9b7f68de55eff1"
- integrity sha512-zqZpn7Tg+QuvhL9x1WYCdXjFclZrMR2LOU2a3kHVFms5pOfizzFApB492VFgHuv/5xKohSxDkhXpAZ/TNGmM4g==
- dependencies:
- "@metamask/json-rpc-engine" "^7.3.2"
- "@metamask/json-rpc-middleware-stream" "^6.0.2"
- "@metamask/object-multiplex" "^2.0.0"
- "@metamask/rpc-errors" "^6.2.1"
- "@metamask/safe-event-emitter" "^3.0.0"
- "@metamask/utils" "^8.3.0"
- detect-browser "^5.2.0"
- extension-port-stream "^3.0.0"
- fast-deep-equal "^3.1.3"
- is-stream "^2.0.0"
- readable-stream "^3.6.2"
- webextension-polyfill "^0.10.0"
-
"@metamask/react-native-button@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@metamask/react-native-button/-/react-native-button-3.0.0.tgz#4af8affd11e2b285cfc1b1752280797e1b33e62b"
@@ -4540,18 +4494,6 @@
fast-xml-parser "^4.3.4"
superstruct "^1.0.3"
-"@metamask/snaps-sdk@^3.1.1":
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/@metamask/snaps-sdk/-/snaps-sdk-3.2.0.tgz#66d60869697a479a3484adc9532d82c3b568fc19"
- integrity sha512-Xfsc6seyucs7TP2JLXoKYrWm5FbrttdHnMOTfuzTb4T+qmdmoc3wdw83RAGjRFiOOaHGFc6JJSCdP33fBmw4Hg==
- dependencies:
- "@metamask/key-tree" "^9.0.0"
- "@metamask/providers" "^16.0.0"
- "@metamask/rpc-errors" "^6.2.1"
- "@metamask/utils" "^8.3.0"
- fast-xml-parser "^4.3.4"
- superstruct "^1.0.3"
-
"@metamask/snaps-utils@^5.1.2":
version "5.2.0"
resolved "https://registry.yarnpkg.com/@metamask/snaps-utils/-/snaps-utils-5.2.0.tgz#ff43b97ff176846230d8bdedb1769b269effc4d8"
@@ -26144,7 +26086,7 @@ string-range@~1.2, string-range@~1.2.1:
resolved "https://registry.yarnpkg.com/string-range/-/string-range-1.2.2.tgz#a893ed347e72299bc83befbbf2a692a8d239d5dd"
integrity sha1-qJPtNH5yKZvIO++78qaSqNI51d0=
-"string-width-cjs@npm:string-width@^4.2.0":
+"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
@@ -26162,15 +26104,6 @@ string-width@^1.0.1, string-width@^1.0.2:
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"
-"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
- version "4.2.3"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
- integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
- dependencies:
- emoji-regex "^8.0.0"
- is-fullwidth-code-point "^3.0.0"
- strip-ansi "^6.0.1"
-
string-width@^2.0.0, string-width@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e"
@@ -26285,14 +26218,7 @@ stringify-object@^3.3.0:
is-obj "^1.0.1"
is-regexp "^1.0.0"
-"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
- integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
- dependencies:
- ansi-regex "^5.0.1"
-
-[email protected], strip-ansi@^6.0.0, strip-ansi@^6.0.1:
+"strip-ansi-cjs@npm:strip-ansi@^6.0.1", [email protected], strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
@@ -28184,7 +28110,8 @@ wordwrap@^1.0.0:
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"
integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==
-"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
+"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
+ name wrap-ansi-cjs
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
@@ -28219,15 +28146,6 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"
-wrap-ansi@^7.0.0:
- version "7.0.0"
- resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
- integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
- dependencies:
- ansi-styles "^4.0.0"
- string-width "^4.1.0"
- strip-ansi "^6.0.0"
-
wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" |
There have been type errors showing up on some PRs relating to image imports; TypeScript interprets them as strings, but we have them typed as `ImageSourcePropType`. The mismatch is there because these image imports are modified later in the build system. Normally this is handled by our type declarations, which declare upfront which types these imports should have. But on some PRs, it seems that TypeScript will evaluate these declarations too late, after files including image imports. I had trouble reproducing this problem on `main`, but it can be seen in the PR #8828 (commit b027cfa). If you include this change on that branch, it resolves the problem.
Closed in favour of #9093 |
Description
This PR introduces the following modifications
@metamask/keyring-controller
bump fromv8.1.0
tov9.0.0
CHANGELOG from
@metamask/keyring-controller
Related issues
Progresses: https://github.com/MetaMask/accounts-planning/issues/100
Manual testing steps
Test case 1: Upgrade the client from the current version to feature branch
Test case 2: Lock and unlock the wallet
Test case 3: Reveal SRP and private key
Test case 4: Connect QR wallet
Test case 5: Connect Ledger wallet
Test case 6: Sign a transaction with each account type
Test case 7: Sign a different messages with each account type
Test case 8: Change password
Test case 9: Unlock with biometrics
Test case 10: Remember me
Test case 11: Onboarding with biometrics
Unit Tests and Coverage
Screenshots/Recordings
Not applicable. No changes to the UI/UX.
Pre-merge author checklist
Pre-merge reviewer checklist