Skip to content

Commit

Permalink
chore(deps): bump elliptic to ^6.6.0 (#12979)
Browse files Browse the repository at this point in the history
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
This PR bumps `elliptic` in the dependency tree to mitigate the
following security advisories:
- https://github.com/MetaMask/metamask-mobile/security/dependabot/154
- https://github.com/MetaMask/metamask-mobile/security/dependabot/146
- https://github.com/MetaMask/metamask-mobile/security/dependabot/129
- https://github.com/MetaMask/metamask-mobile/security/dependabot/128
- https://github.com/MetaMask/metamask-mobile/security/dependabot/127
    
The closer version that mitigates all the above advisories is `6.6.0`. 

Currently on `main`, these are the versions we have for `elliptic`:
```bash
> yarn why elliptic
=> Found "[email protected]"
info Has been hoisted to "elliptic"
info Reasons this module exists
   - Hoisted from "@WalletConnect#utils#elliptic"
   - Hoisted from "@MetaMask#ppom-validator#elliptic"
   - Hoisted from "secp256k1#elliptic"
   - Hoisted from "ethereumjs-abi#ethereumjs-util#elliptic"
   - Hoisted from "react-native-crypto#create-ecdh#elliptic"
   - Hoisted from "react-native-crypto#browserify-sign#elliptic"
   - Hoisted from "ethereumjs-util#secp256k1#elliptic"
info Disk size without dependencies: "288KB"
info Disk size with unique dependencies: "656KB"
info Disk size with transitive dependencies: "656KB"
info Number of shared dependencies: 7
=> Found "@ethersproject/signing-key#[email protected]"
info This module exists because "ethers#@ethersproject#signing-key" depends on it.
info Disk size without dependencies: "288KB"
info Disk size with unique dependencies: "656KB"
info Disk size with transitive dependencies: "656KB"
info Number of shared dependencies: 7
=> Found "@reown/walletkit#[email protected]"
info Reasons this module exists
   - "@WalletConnect#se-sdk#@Reown#walletkit#@WalletConnect#utils" depends on it
   - Hoisted from "@WalletConnect#se-sdk#@Reown#walletkit#@WalletConnect#utils#elliptic"
info Disk size without dependencies: "172KB"
info Disk size with unique dependencies: "540KB"
info Disk size with transitive dependencies: "540KB"
info Number of shared dependencies: 7
=> Found "@walletconnect/sign-client#[email protected]"
info Reasons this module exists
   - "@WalletConnect#se-sdk#@Reown#walletkit#@WalletConnect#sign-client#@WalletConnect#utils" depends on it
   - Hoisted from "@WalletConnect#se-sdk#@Reown#walletkit#@WalletConnect#sign-client#@WalletConnect#utils#elliptic"
info Disk size without dependencies: "172KB"
info Disk size with unique dependencies: "540KB"
info Disk size with transitive dependencies: "540KB"
info Number of shared dependencies: 7
```

The added resolution forces the package on `^6.6.0` which currently
resolves to `6.6.1`

## **Related issues**

Related: MetaMask/core#4847

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.

---------

Co-authored-by: Mark Stacey <[email protected]>
  • Loading branch information
mikesposito and Gudahtt authored Feb 11, 2025
1 parent 83b5069 commit fd9da65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 31 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@
"sha256-uint8array": "0.10.3",
"express": "4.21.2",
"nanoid": "^3.3.8",
"undici": "5.28.5"
"undici": "5.28.5",
"**/@ethersproject/signing-key/elliptic": "^6.6.0",
"**/@walletconnect/utils/elliptic": "^6.6.0"
},
"dependencies": {
"@config-plugins/detox": "^8.0.0",
Expand Down
34 changes: 4 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15686,36 +15686,10 @@ electron-to-chromium@^1.5.41:
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.55.tgz#73684752aa2e1aa49cafb355a41386c6637e76a9"
integrity sha512-6maZ2ASDOTBtjt9FhqYPRnbvKU5tjG0IN9SztUOWYw2AzNDNpKJYLJmlK0/En4Hs/aiWnB+JZ+gW19PIGszgKg==

[email protected]:
version "6.5.4"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb"
integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==
dependencies:
bn.js "^4.11.9"
brorand "^1.1.0"
hash.js "^1.0.0"
hmac-drbg "^1.0.1"
inherits "^2.0.4"
minimalistic-assert "^1.0.1"
minimalistic-crypto-utils "^1.0.1"

[email protected]:
version "6.5.7"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.7.tgz#8ec4da2cb2939926a1b9a73619d768207e647c8b"
integrity sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==
dependencies:
bn.js "^4.11.9"
brorand "^1.1.0"
hash.js "^1.0.0"
hmac-drbg "^1.0.1"
inherits "^2.0.4"
minimalistic-assert "^1.0.1"
minimalistic-crypto-utils "^1.0.1"

[email protected], elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4, elliptic@^6.5.7:
version "6.6.0"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.0.tgz#5919ec723286c1edf28685aa89261d4761afa210"
integrity sha512-dpwoQcLc/2WLQvJvLRHKZ+f9FgOdjnq11rurqwekGQygGPsYSK29OMMD2WalatiqQ+XGFDglTNixpPfI+lpaAA==
[email protected], [email protected], [email protected], elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4, elliptic@^6.5.7, elliptic@^6.6.0:
version "6.6.1"
resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.6.1.tgz#3b8ffb02670bf69e382c7f65bf524c97c5405c06"
integrity sha512-RaddvvMatK2LJHqFJ+YA4WysVN5Ita9E35botqIYspQ4TkRAlCicdzKOjlyv/1Za5RyTNn7di//eEV0uTAfe3g==
dependencies:
bn.js "^4.11.9"
brorand "^1.1.0"
Expand Down

0 comments on commit fd9da65

Please sign in to comment.