Skip to content

bump: mockttp and webpack-dev-server to remove node-forge cp-13.25.0#41288

Merged
HowardBraham merged 5 commits into
mainfrom
node-forge
Mar 27, 2026
Merged

bump: mockttp and webpack-dev-server to remove node-forge cp-13.25.0#41288
HowardBraham merged 5 commits into
mainfrom
node-forge

Conversation

@HowardBraham

@HowardBraham HowardBraham commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Description

I initially wrote this to fix a node-forge audit error, but someone else got a resolution fix in first.

This PR updates mockttp and webpack-dev-server, which eliminates node-forge entirely.

Changelog

CHANGELOG entry: null


Note

Medium Risk
Dependency upgrades and Lavamoat policy regeneration may affect dev-server/test tooling and bundling behavior, though changes are largely config/third-party updates rather than app logic.

Overview
Resolves the node-forge audit finding by upgrading mockttp to ^4.2.3 and webpack-dev-server to ^5.2.3, and removing the explicit node-forge entry from package.json.

Regenerates multiple Lavamoat policy.json files to reflect the new dependency graphs (notably shifting async-mutex allowances to mockttp>async-mutex, adding new @peculiar/x509 chains for mockttp, and updating some webpack-dev-server builtin module references). Updates the Jest setup helper to polyfill crypto.randomUUID when missing in the test environment.

Written by Cursor Bugbot for commit 635717d. This will update automatically on new commits. Configure here.

@github-actions

Copy link
Copy Markdown
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.

@HowardBraham

Copy link
Copy Markdown
Contributor Author

@metamaskbot update-policies

@metamaskbot metamaskbot added the team-extension-platform Extension Platform team label Mar 27, 2026
@socket-security

socket-security Bot commented Mar 27, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedwebpack-dev-server@​5.2.2 ⏵ 5.2.39410010087100
Updatedmockttp@​3.10.1 ⏵ 4.2.393 -110010091 +2100

View full report

@socket-security

socket-security Bot commented Mar 27, 2026

Copy link
Copy Markdown

Caution

MetaMask internal reviewing guidelines:

  • Do not ignore-all
  • Each alert has instructions on how to review if you don't know what it means. If lost, ask your Security Liaison or the supply-chain group
  • Copy-paste ignore lines for specific packages or a group of one kind with a note on what research you did to deem it safe.
    @SocketSecurity ignore npm/PACKAGE@VERSION
Action Severity Alert  (click "▶" to expand/collapse)
Block Medium
Network access: npm on-headers in module http

Module: http

Location: Package overview

From: ?npm/storybook@7.6.21npm/webpack-dev-server@5.2.3npm/on-headers@1.1.0

ℹ Read more on: This package | This alert | What is network access?

Next steps: 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@socket.dev.

Suggestion: Packages should remove all network access that is functionally unnecessary. Consumers should audit network access to ensure legitimate use.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/on-headers@1.1.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Publisher changed: npm finalhandler is now published by ulisesgascon instead of wesleytodd

New Author: ulisesgascon

Previous Author: wesleytodd

From: ?npm/@storybook/react-webpack5@7.6.21npm/storybook@7.6.21npm/webpack-dev-server@5.2.3npm/mockttp@4.2.3npm/@metamask/test-bundler@1.0.0npm/finalhandler@1.3.2

ℹ Read more on: This package | This alert | What is new author?

Next steps: 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@socket.dev.

Suggestion: Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/finalhandler@1.3.2. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Publisher changed: npm negotiator is now published by blakeembrey instead of wesleytodd

New Author: blakeembrey

Previous Author: wesleytodd

From: ?npm/storybook@7.6.21npm/webpack-dev-server@5.2.3npm/negotiator@0.6.4

ℹ Read more on: This package | This alert | What is new author?

Next steps: 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@socket.dev.

Suggestion: Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/negotiator@0.6.4. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Block Low
Publisher changed: npm on-headers is now published by ulisesgascon instead of dougwilson

New Author: ulisesgascon

Previous Author: dougwilson

From: ?npm/storybook@7.6.21npm/webpack-dev-server@5.2.3npm/on-headers@1.1.0

ℹ Read more on: This package | This alert | What is new author?

Next steps: 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@socket.dev.

Suggestion: Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/on-headers@1.1.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@HowardBraham HowardBraham changed the title fix: node-forge fix: audit for node-forge Mar 27, 2026
@metamaskbot

Copy link
Copy Markdown
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

👀 lavamoat/browserify/beta/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/browserify/experimental/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/browserify/flask/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/webpack/mv2/beta/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv2/experimental/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv2/flask/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv3/beta/policy.json changes differ from mv3/main/policy.json policy changes
👀 lavamoat/webpack/mv3/experimental/policy.json changes differ from mv3/main/policy.json policy changes
👀 lavamoat/webpack/mv3/flask/policy.json changes differ from mv3/main/policy.json policy changes

@HowardBraham HowardBraham added the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Mar 27, 2026
@metamaskbotv2

metamaskbotv2 Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor
Builds ready [3a0384f]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account112811211134511341134
total112811211134511341134
Confirm Txconfirm_tx6053600161114060786111
total6053600161114060786111
Bridge User Actionsbridge_load_page2962912993296299
bridge_load_asset_picker30623536552362365
bridge_search_token84175796394950963
total14381283162114916111621
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Chrome Browserify Startup Standard HomeuiStartup1510131918577915551633
load1244106415267212811356
domContentLoaded1238105415077112751350
domInteractive2818143142747
firstPaint1527538070211281
backgroundConnect23221427410237246
firstReactRender22136082337
initialActions105124
loadScripts101984412737010541128
setupStore1476381627
numNetworkReqs35315973846
Chrome Browserify Startup Power User HomeuiStartup4976193215900222157247562
load12971152205412713371507
domContentLoaded12781144196811713231471
domInteractive3220174183459
firstPaint217851468206256352
backgroundConnect211630512474195928654358
firstReactRender26186162934
initialActions107113
loadScripts1052931164210710861238
setupStore17679101930
numNetworkReqs2228234460259311
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2192172201220220
srpButtonToSrpForm94949519495
confirmSrpToPwForm22212202222
pwFormToMetricsScreen16151601616
metricsToWalletReadyScreen16161711717
doneButtonToHomeScreen56551067767559677
openAccountMenuToAccountListLoaded290629012915629152915
total38743778405311239594053
Onboarding New WalletcreateWalletToSocialScreen2182172201219220
srpButtonToPwForm1181111246123124
createPwToRecoveryScreen989099
skipBackupToMetricsScreen40384633946
agreeButtonToOnboardingSuccess16161701617
doneButtonToAssetList51550153815518538
total9708931106779821106
Asset DetailsassetClickToPriceChart74698257782
total74698257782
Solana Asset DetailsassetClickToPriceChart57546445764
total57546445764
Import Srp HomeloginToHomeScreen20631956225310720992253
openAccountMenuAfterLogin53535305353
homeAfterImportWithNewWallet11872842580104923572580
total329923154662110646424662
Send TransactionsopenSendPageFromHome30194293342
selectTokenToSendFormLoaded28233543135
reviewTransactionToConfirmationPage1213997139416413921394
total12891064155218714481552
SwapopenSwapPageFromHome1231151378126137
fetchAndDisplaySwapQuotes269026842695426922695
total280928062813328112813
🌐 Dapp Page Load Benchmarks

Current Commit: 3a0384f | Date: 3/27/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±53ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 731ms (±50ms) 🟢 | historical mean value: 730ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 85ms (±10ms) 🟢 | historical mean value: 84ms ⬆️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 53ms 1.01s 1.33s 1.10s 1.33s
domContentLoaded 731ms 50ms 699ms 1.01s 789ms 1.01s
firstPaint 85ms 10ms 68ms 168ms 92ms 168ms
firstContentfulPaint 85ms 10ms 68ms 168ms 92ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 706 Bytes (0.01%)

@github-actions github-actions Bot removed the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Mar 27, 2026
@HowardBraham HowardBraham added the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Mar 27, 2026
@github-actions github-actions Bot removed the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Mar 27, 2026
@HowardBraham HowardBraham marked this pull request as ready for review March 27, 2026 01:38
@HowardBraham HowardBraham requested review from a team as code owners March 27, 2026 01:38
nickewansmith
nickewansmith previously approved these changes Mar 27, 2026
@nickewansmith

Copy link
Copy Markdown
Contributor

@HowardBraham if for some reason your PR is taking a while for review or other, this PR here is green as well and could be a temporary fix.

Comment thread lavamoat/webpack/build/policy.json
Comment thread test/e2e/helpers/identity/user-storage/userStorageMockttpController.ts Outdated
Comment thread test/setup.js Outdated
Comment thread test/setup.js Outdated
Comment thread test/setup.js Outdated
Comment thread test/setup.js Outdated
@metamaskbot

Copy link
Copy Markdown
Collaborator

Policies updated.
👀 Please review the diff for suspicious new powers.

🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff

👀 lavamoat/browserify/beta/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/browserify/experimental/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/browserify/flask/policy.json changes differ from main/policy.json policy changes
👀 lavamoat/webpack/mv2/beta/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv2/experimental/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv2/flask/policy.json changes differ from mv2/main/policy.json policy changes
👀 lavamoat/webpack/mv3/beta/policy.json changes differ from mv3/main/policy.json policy changes
👀 lavamoat/webpack/mv3/experimental/policy.json changes differ from mv3/main/policy.json policy changes
👀 lavamoat/webpack/mv3/flask/policy.json changes differ from mv3/main/policy.json policy changes

@metamaskbotv2

metamaskbotv2 Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

✨ Files requiring CODEOWNER review ✨

📜 @MetaMask/policy-reviewers (13 files, +427 -242)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +19 -19
      • 📁 experimental/
        • 📄 policy.json +19 -19
      • 📁 flask/
        • 📄 policy.json +19 -19
      • 📁 main/
        • 📄 policy.json +19 -19
    • 📁 webpack/
      • 📁 build/
        • 📄 policy.json +251 -66
      • 📁 mv2/
        • 📁 beta/
          • 📄 policy.json +16 -16
        • 📁 experimental/
          • 📄 policy.json +16 -16
        • 📁 flask/
          • 📄 policy.json +16 -16
        • 📁 main/
          • 📄 policy.json +16 -16
      • 📁 mv3/
        • 📁 beta/
          • 📄 policy.json +9 -9
        • 📁 experimental/
          • 📄 policy.json +9 -9
        • 📁 flask/
          • 📄 policy.json +9 -9
        • 📁 main/
          • 📄 policy.json +9 -9

Tip

Follow the policy review process outlined in the LavaMoat Policy Review Process doc before expecting an approval from Policy Reviewers.

@HowardBraham HowardBraham removed the request for review from a team March 27, 2026 17:34
@sonarqubecloud

Copy link
Copy Markdown

@HowardBraham HowardBraham changed the title fix: audit for node-forge bump: mockttp and webpack-dev-server to remove node-forge Mar 27, 2026
@HowardBraham HowardBraham added the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Mar 27, 2026
@metamaskbotv2

metamaskbotv2 Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor
Builds ready [635717d]
⚡ Performance Benchmarks
👆 Interaction Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Load New Accountload_new_account102495611378011371137
total102495611378011371137
Confirm Txconfirm_tx6053603160902260466090
total6053603160902260466090
Bridge User Actionsbridge_load_page30225337141312371
bridge_load_asset_picker27115533870332338
bridge_search_token1073734147132114541471
total16461232210735920452107
🔌 Startup Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Chrome Browserify Startup Standard HomeuiStartup15381271190012116031794
load12671024156510713251455
domContentLoaded12591020155310713191448
domInteractive28186993050
firstPaint229721383204270303
backgroundConnect21919326015226249
firstReactRender21154552330
initialActions106114
loadScripts1056823135210111211234
setupStore1477091622
numNetworkReqs34316163743
Chrome Browserify Startup Power User HomeuiStartup52502112161663015584612729
load13361137178912913971566
domContentLoaded13061127177910913551500
domInteractive3823119184276
firstPaint2661031514183314380
backgroundConnect210630313771274727248414
firstReactRender29187893140
initialActions108113
loadScripts1092925153910211331260
setupStore1774572131
numNetworkReqs1848838867224303
🧭 User Journey Benchmarks
BenchmarkMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P75 (ms)P95 (ms)
Onboarding Import WalletimportWalletToSocialScreen2172162181217218
srpButtonToSrpForm98979819898
confirmSrpToPwForm22222302223
pwFormToMetricsScreen15151601516
metricsToWalletReadyScreen15151601616
doneButtonToHomeScreen53051654812529548
openAccountMenuToAccountListLoaded28952707312816329933128
total3882380340108138914010
Onboarding New WalletcreateWalletToSocialScreen2212202231221223
srpButtonToPwForm1121071205117120
createPwToRecoveryScreen888088
skipBackupToMetricsScreen38364123941
agreeButtonToOnboardingSuccess15151601616
doneButtonToAssetList49247651314496513
total88687489911896899
Asset DetailsassetClickToPriceChart72657757677
total72657757677
Solana Asset DetailsassetClickToPriceChart60546756367
total60546756367
Import Srp HomeloginToHomeScreen2107207621382521382138
openAccountMenuAfterLogin68607867278
homeAfterImportWithNewWallet11792692424100523912424
total338424054898112046014898
Send TransactionsopenSendPageFromHome382156145156
selectTokenToSendFormLoaded352455124355
reviewTransactionToConfirmationPage1104890124913711941249
total1241118013015013011301
SwapopenSwapPageFromHome113981218120121
fetchAndDisplaySwapQuotes268526822687226862687
total2801278528151128082815
🌐 Dapp Page Load Benchmarks

Current Commit: 635717d | Date: 3/27/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±71ms) 🟡 | historical mean value: 1.03s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 746ms (±69ms) 🟢 | historical mean value: 728ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 86ms (±10ms) 🟢 | historical mean value: 87ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 71ms 1.01s 1.33s 1.26s 1.33s
domContentLoaded 746ms 69ms 710ms 1.01s 950ms 1.01s
firstPaint 86ms 10ms 68ms 160ms 96ms 160ms
firstContentfulPaint 86ms 10ms 68ms 160ms 96ms 160ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 684 Bytes (0.01%)

@github-actions github-actions Bot removed the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Mar 27, 2026
@HowardBraham HowardBraham added the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Mar 27, 2026
@github-actions github-actions Bot removed the retry-ci Tells GitHub Actions to retry failed jobs, label removed automatically before the retry label Mar 27, 2026

@Gudahtt Gudahtt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@HowardBraham HowardBraham self-assigned this Mar 27, 2026
@HowardBraham HowardBraham added this pull request to the merge queue Mar 27, 2026
@DDDDDanica

Copy link
Copy Markdown
Contributor

LGTM ✅

@HowardBraham HowardBraham changed the title bump: mockttp and webpack-dev-server to remove node-forge bump: mockttp and webpack-dev-server to remove node-forge cp-13.25.0 Mar 27, 2026
Merged via the queue into main with commit 49f46cd Mar 27, 2026
587 of 594 checks passed
@HowardBraham HowardBraham deleted the node-forge branch March 27, 2026 20:13
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2026
@metamaskbot metamaskbot added the release-13.26.0 Issue or pull request that will be included in release 13.26.0 label Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.26.0 Issue or pull request that will be included in release 13.26.0 size-S skip-release-validation team-extension-platform Extension Platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants