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

fix(deps): replace react-native-aes-crypto-forked with react-native-aes-crypto #9540

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

legobeat
Copy link
Contributor

@legobeat legobeat commented May 4, 2024

Description

Instead of pulling in react-native-aes-crypto-forked from a git-commit and then patching it (!(?)), this migrates to a published version of the package under the name @metamask/react-native-aes-crypto with the same effect.

The separate dependency react-native-aes-crypto is left unaddressed.

Related issues

Blocked by

Manual testing steps

Screenshots/Recordings

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • 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 format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). 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.

Copy link
Contributor

github-actions bot commented May 4, 2024

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.

@legobeat legobeat added dependencies Pull requests that update a dependency file team-security labels May 4, 2024
@legobeat legobeat mentioned this pull request May 4, 2024
8 tasks
@legobeat legobeat requested a review from rickycodes May 4, 2024 00:54
Copy link

socket-security bot commented May 4, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@metamask/[email protected] None 0 43.9 kB lgbot

🚮 Removed packages: npm/[email protected])

View full report↗︎

@legobeat legobeat force-pushed the deps-mm-react-native-aes-crypto branch from 20011ca to df9d0da Compare May 4, 2024 00:59
@legobeat legobeat added the Run Smoke E2E Triggers smoke e2e on Bitrise label May 4, 2024

This comment was marked as outdated.

@legobeat

This comment was marked as resolved.

@legobeat legobeat added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels May 5, 2024

This comment was marked as outdated.

@legobeat legobeat marked this pull request as ready for review May 5, 2024 12:38
@legobeat legobeat requested review from a team as code owners May 5, 2024 12:38
@legobeat legobeat added the DO-NOT-MERGE Pull requests that should not be merged label May 5, 2024
@legobeat legobeat force-pushed the deps-mm-react-native-aes-crypto branch 2 times, most recently from 3bbf657 to 55ec4c6 Compare May 6, 2024 11:40
@legobeat legobeat added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels May 6, 2024

This comment was marked as outdated.

@legobeat legobeat force-pushed the deps-mm-react-native-aes-crypto branch 3 times, most recently from 0dfba57 to 6ee5042 Compare May 9, 2024 09:48
Copy link

socket-security bot commented May 9, 2024

👍 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: npm/@metamask/[email protected]

View full report↗︎

Next steps

Take a deeper look at the dependency

Take 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 package

If 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 risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

@legobeat legobeat force-pushed the deps-mm-react-native-aes-crypto branch 3 times, most recently from 0acc26f to b8331c7 Compare May 16, 2024 09:42
@legobeat legobeat force-pushed the deps-mm-react-native-aes-crypto branch from b8331c7 to c8a6259 Compare May 16, 2024 23:09
owencraston added a commit that referenced this pull request Jul 23, 2024
<!--
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?
-->

The changes on this PR includes,

- Bump of the `aes-react-native` module from 1.3.9 to 3.0.2

This PR depends on #9898

## **Related issues**

Fixes: MetaMask/mobile-planning#1551
- #9540

## **Manual testing steps**

### Upgrade app - Wallet creation

1. Build the latest release of the app and create a wallet
2. Add an account by importing the private key
3. Lock the wallet
4. Change branches to this one (`feat/bump-rn-aes`)
5. Unlock the wallet
6. Lock and Unlock again
7. Check SRP and private keys are accessible
8. Use the MM Test Dapp to sign messages
9. Use the send transaction feature with a testnet

### Upgrade app - Import SRP

1. Build the latest release of the app and import a SRP
2. Follow the steps from the first test case from step 2

### Create a wallet

1. Create a new wallet
2. Follow the steps from the first test case from step 2

### Import a SRP

1. Import a SRP
2. Follow the steps from the first test case from step 2

## **Screenshots/Recordings**


https://github.com/MetaMask/metamask-mobile/assets/17601467/982a879b-9d22-4afd-9b47-65db1b0120d7

## **Pre-merge author checklist**

- [x] 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).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] 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: legobeat <[email protected]>
Co-authored-by: Daniel Rocha <[email protected]>
Co-authored-by: Owen Craston <[email protected]>
legobeat and others added 6 commits July 23, 2024 02:55
- package.json
- yarn.lock (run deduplicate)
- react-native.config.js (removed in RN 0.74)
- depcheck
- Fix CompileC RCTAesForked.m failure
  - Fix fatal error: 'React/RCTBridgeModule.h' file not found in
    - #import <React/RCTBridgeModule.h>
- Remove libRCTAesForked.a via Xcode
@legobeat legobeat force-pushed the deps-mm-react-native-aes-crypto branch from 332ea5b to b9307d8 Compare July 23, 2024 03:16
@legobeat legobeat added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jul 23, 2024
Copy link
Contributor

github-actions bot commented Jul 23, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: b9307d8
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/eec579ed-d986-4b67-8a7b-c37d4d5eb5ce

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

- minSdkVersion 19
- targetSdkVersion 22
+ minSdkVersion 21
+ targetSdkVersion 33
Copy link
Contributor Author

@legobeat legobeat Jul 23, 2024

Choose a reason for hiding this comment

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

devin-ai-integration bot pushed a commit that referenced this pull request Jul 23, 2024
<!--
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?
-->

The changes on this PR includes,

- Bump of the `aes-react-native` module from 1.3.9 to 3.0.2

This PR depends on #9898

## **Related issues**

Fixes: https://github.com/MetaMask/mobile-planning/issues/1551
- #9540

## **Manual testing steps**

### Upgrade app - Wallet creation

1. Build the latest release of the app and create a wallet
2. Add an account by importing the private key
3. Lock the wallet
4. Change branches to this one (`feat/bump-rn-aes`)
5. Unlock the wallet
6. Lock and Unlock again
7. Check SRP and private keys are accessible
8. Use the MM Test Dapp to sign messages
9. Use the send transaction feature with a testnet

### Upgrade app - Import SRP

1. Build the latest release of the app and import a SRP
2. Follow the steps from the first test case from step 2

### Create a wallet

1. Create a new wallet
2. Follow the steps from the first test case from step 2

### Import a SRP

1. Import a SRP
2. Follow the steps from the first test case from step 2

## **Screenshots/Recordings**


https://github.com/MetaMask/metamask-mobile/assets/17601467/982a879b-9d22-4afd-9b47-65db1b0120d7

## **Pre-merge author checklist**

- [x] 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).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] 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: legobeat <[email protected]>
Co-authored-by: Daniel Rocha <[email protected]>
Co-authored-by: Owen Craston <[email protected]>
@legobeat legobeat added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jul 25, 2024

This comment was marked as outdated.

@legobeat legobeat added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Aug 28, 2024
Copy link
Contributor

github-actions bot commented Aug 28, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 84cb7fe
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3945486c-965b-4e91-8d15-a3c4cd57d396

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Copy link

sonarcloud bot commented Aug 28, 2024

@legobeat legobeat marked this pull request as draft August 28, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file needs-research Run Smoke E2E Triggers smoke e2e on Bitrise team-security
Projects
Status: Needs more work from the author
Development

Successfully merging this pull request may close these issues.

3 participants