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: bump axios #7758

Merged
merged 2 commits into from
Nov 10, 2023
Merged

fix: bump axios #7758

merged 2 commits into from
Nov 10, 2023

Conversation

leotm
Copy link
Contributor

@leotm leotm commented Nov 10, 2023

Description

Fix CI failing on Improved Yarn Audit step

metamask@7.10.0 /Users/leo/Documents/GitHub/metamask-mobile
├─┬ @consensys/on-ramp-sdk@1.23.0
│ └── axios@0.27.2
├─┬ appium-adb@9.14.11
│ └─┬ @appium/support@4.1.6
│   └── axios@1.4.0
├─┬ appium@1.22.3
│ ├─┬ appium-android-driver@4.54.0
│ │ ├─┬ appium-chromedriver@4.28.0
│ │ │ └── axios@0.27.2
│ │ └── axios@0.27.2
│ ├─┬ appium-base-driver@7.11.3
│ │ └── axios@0.27.2
│ ├─┬ appium-ios-driver@4.8.3
│ │ └── axios@0.27.2
│ ├─┬ appium-mac2-driver@0.14.1
│ │ └── axios@0.27.2
│ ├─┬ appium-support@2.55.0
│ │ └── axios@0.27.2
│ ├─┬ appium-uiautomator2-driver@1.75.0
│ │ └── axios@0.27.2
│ ├─┬ appium-xcuitest-driver@3.62.0
│ │ └─┬ appium-webdriveragent@3.17.0
│ │   └── axios@0.27.2
│ └── axios@0.27.2
├── axios@0.26.1
└─┬ chromedriver@99.0.0
  └── axios@0.24.0

Related issues

Manual testing steps

yarn audit:ci

Screenshots/Recordings

Before

Vulnerability Found:

  Severity: MODERATE
  Modules: @consensys/on-ramp-sdk>axios, appium-adb>@appium/support>axios, axios
  URL: https://github.com/advisories/GHSA-wf5p-g6vw-rhxx

Vulnerability Found:

  Severity: MODERATE
  Modules: @consensys/on-ramp-sdk>axios, appium-adb>@appium/support>axios, axios
  URL: https://github.com/advisories/GHSA-wf5p-g6vw-rhxx

Vulnerability Found:

  Severity: MODERATE
  Modules: @consensys/on-ramp-sdk>axios, appium-adb>@appium/support>axios, axios
  URL: https://github.com/advisories/GHSA-wf5p-g6vw-rhxx
Vulnerability Found:

  Severity: MODERATE
  Modules: axios
  URL: https://github.com/advisories/GHSA-wf5p-g6vw-rhxx

After

metamask-mobile git:(fix/unbreak-ci-audit-fix-CVE-2023-45857) ✗ yarn audit:ci
yarn run v1.22.19
warning ../package.json: No license field
$ ./scripts/yarn-audit.sh
warning ../package.json: No license field
$ /Users/leo/Documents/GitHub/metamask-mobile/node_modules/.bin/improved-yarn-audit --ignore-dev-deps --min-severity moderate --fail-on-missing-exclusions
Improved Yarn Audit - v3.0.0

Reading excluded advisories from .iyarc
Minimum severity level to report: moderate
Excluded Advisories: ["GHSA-p8p7-x288-28g6","GHSA-c2qf-rxjj-qqgw"]

Running yarn audit...

Found 0 vulnerabilities

2 ignored because they are dev dependencies

6 ignored because of advisory exclusions

Run `yarn audit` for more information
✔ Audit shows _zero_ moderate or high severity advisories _in the production dependencies_
✨  Done in 2.32s.

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • 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.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

Vulnerability Found:

  Severity: MODERATE
  Modules: @consensys/on-ramp-sdk>axios, appium-adb>@appium/support>axios, axios
  URL: GHSA-wf5p-g6vw-rhxx

Vulnerability Found:

  Severity: MODERATE
  Modules: @consensys/on-ramp-sdk>axios, appium-adb>@appium/support>axios, axios
  URL: GHSA-wf5p-g6vw-rhxx

Vulnerability Found:

  Severity: MODERATE
  Modules: @consensys/on-ramp-sdk>axios, appium-adb>@appium/support>axios, axios
  URL: GHSA-wf5p-g6vw-rhxx
Vulnerability Found:

  Severity: MODERATE
  Modules: axios
  URL: GHSA-wf5p-g6vw-rhxx
@leotm leotm requested a review from a team as a code owner November 10, 2023 12:58
Copy link
Contributor

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.

Copy link
Contributor Author

@leotm leotm left a comment

Choose a reason for hiding this comment

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

package.json Show resolved Hide resolved
package.json Show resolved Hide resolved
Copy link

Updated dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
axios 0.26.1...1.6.0 network +0/-0 1.79 MB jasonsaayman

Copy link

socket-security bot commented Nov 10, 2023

👍 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: axios@1.6.0

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 package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

@leotm
Copy link
Contributor Author

leotm commented Nov 10, 2023

@SocketSecurity ignore axios@1.6.0

network access expected

Promise based HTTP client for the browser and node.js

package.json Show resolved Hide resolved
package.json Show resolved Hide resolved
Copy link

sonarcloud bot commented Nov 10, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e821b6e) 35.10% compared to head (1e0aacb) 35.10%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7758   +/-   ##
=======================================
  Coverage   35.10%   35.10%           
=======================================
  Files        1039     1039           
  Lines       27619    27619           
  Branches     2336     2336           
=======================================
  Hits         9695     9695           
  Misses      17401    17401           
  Partials      523      523           

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

@leotm leotm added dependencies Pull requests that update a dependency file No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. javascript Pull requests that update Javascript code Run Smoke E2E labels Nov 10, 2023
package.json Show resolved Hide resolved
Copy link
Contributor

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/9347946f-db7b-4146-8078-f5b342539d43
You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

@leotm leotm mentioned this pull request Nov 10, 2023
13 tasks
@leotm
Copy link
Contributor Author

leotm commented Nov 10, 2023

E2E test started on Bitrise: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/9347946f-db7b-4146-8078-f5b342539d43 You can also kick off another Bitrise E2E smoke test by removing and re-applying the (Run Smoke E2E) label

ios_e2e_test

android_e2e_test

package.json Show resolved Hide resolved
Copy link
Member

@Andepande Andepande left a comment

Choose a reason for hiding this comment

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

LG

Copy link
Contributor

@tommasini tommasini left a comment

Choose a reason for hiding this comment

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

LGTM, do we test the on ramp on the release testing @Andepande ? it would be good to check it since we are doing a major upgrade version on axios, since it is used by them

yarn.lock Show resolved Hide resolved
@leotm leotm merged commit 901e29b into main Nov 10, 2023
80 of 81 checks passed
@leotm leotm deleted the fix/unbreak-ci-audit-fix-CVE-2023-45857 branch November 10, 2023 14:32
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2023
@metamaskbot metamaskbot added the release-7.12.0 Issue or pull request that will be included in release 7.12.0 label Nov 10, 2023
@leotm
Copy link
Contributor Author

leotm commented Nov 10, 2023

merged after discussions ^ we can follow-up on comments if agreed later to

leotm referenced this pull request Nov 10, 2023
## **Description**
- Updates the documentation and `js.env.example` file with the new
variable `METAMASK_ENVIRONMENT`.
- Adds a small note on the `README.md` with instructions for updating
envars

## **Related issues**

Fixes: #

## **Manual testing steps**

Not applicable

## **Screenshots/Recordings**

### **Before**

Not applicable

### **After**

Not applicable

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've clearly explained what problem this PR is solving and how it
is solved.
- [ ] I've linked related issues
- [ ] I've included manual testing steps
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] 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.
- [x] I’ve properly set the pull request status:
  - [x] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to
"non-draft".

## **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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code No QA Needed/E2E Only Apply this label when your PR does not need any QA effort. release-7.12.0 Issue or pull request that will be included in release 7.12.0 team-security
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants