Skip to content

Conversation

runway-github[bot]
Copy link
Contributor

@runway-github runway-github bot commented Oct 13, 2025

Description

Introduces URL path based blocking within the extension. This allows
websites like example.com/path to be blocked rather than blocking all
of example.com.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: Added path-based blocking for URLs

Related issues

Fixes:

Manual testing steps

  1. Go to sites.google.com/view/aoooop/aave-com and make sure that it
    you are redirected to the Phishing Warning Page
  2. Go to sites.google.com/view/aoooop/ and make sure that it does not
    redirect you.
  3. Go to sites.google.com/view/aoooop/aave-com/path and make sure that
    you are redirected to the Phishing Warning Page.
  4. Click proceed anyway
  5. Going to sites.google.com/view/aoooop/aave-com should also no
    longer redirect to the Phishing Warning Page.
  6. Going to sites.google.com/view/aoooop/aave-com/path should also no
    longer redirect to the Phishing Warning Page (implicit in step 4).

Screenshots/Recordings

Before

After

Pre-merge author checklist

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.

Note

Adds path-based phishing detection (blocklistPaths + whitelistPaths), updates diffs API to v2, and extends tests/mocks/policies accordingly.

  • Phishing detection:
    • Introduce PathTrie with insertToTrie, deleteFromTrie, matchedPathPrefix, and helpers for efficient path checks.
    • Extend PhishingDetector to block by blocklistPaths and expose blockingPath(url).
    • Update PhishingController:
      • Support whitelistPaths state and path-based bypass logic.
      • Use matchedPathPrefix to allow whitelisted paths.
      • Parse paths via getPathnameFromUrl.
  • Utils:
    • Add getHostnameAndPathComponents and getPathnameFromUrl.
    • Enhance applyDiffs to handle blocklistPaths with trie ops and deep copy (deepCopyPathTrie).
    • Keep domain lists processing unchanged for hostnames.
  • API:
    • Change hotlist diffs endpoint to '/v2/diffsSince'.
  • State/metadata:
    • Persist whitelistPaths; default state includes empty trie; update removal keys and metrics allowlist.
  • Tests & mocks:
    • Update phishing mocks to new stalelist shape and add blocklistPaths support.
    • Add E2E fixtures/pages for path scenarios; new tests for blocklisted and whitelisted paths; adjust existing tests for v2 endpoint.
    • Update unit tests to include blocklistPaths in list state.
  • Build/security:
    • Update LavaMoat policies with PathTrie_* globals.
    • Patch @metamask/phishing-controller via Yarn; bump related deps (@metamask/base-controller, @metamask/controller-utils, @metamask/messenger, @metamask/utils, @metamask/phishing-warning).

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


Co-authored-by: augmentedmode [email protected] 8bdd1e1

@runway-github runway-github bot requested a review from a team as a code owner October 13, 2025 16:08
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.

@metamaskbot metamaskbot added the team-runway-bot Runway bot team (for Runway Bot) label Oct 13, 2025
@metamaskbot
Copy link
Collaborator

metamaskbot commented Oct 13, 2025

✨ Files requiring CODEOWNER review ✨

🔑 @MetaMask/accounts-engineers (1 files, +1 -0)
  • 📁 app/
    • 📁 scripts/
      • 📁 lib/
        • 📁 snap-keyring/
          • 📁 utils/
            • 📄 isBlockedUrl.test.ts +1 -0

🧩 @MetaMask/extension-devs (4 files, +20 -0)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +5 -0
      • 📁 experimental/
        • 📄 policy.json +5 -0
      • 📁 flask/
        • 📄 policy.json +5 -0
      • 📁 main/
        • 📄 policy.json +5 -0

📜 @MetaMask/policy-reviewers (4 files, +20 -0)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +5 -0
      • 📁 experimental/
        • 📄 policy.json +5 -0
      • 📁 flask/
        • 📄 policy.json +5 -0
      • 📁 main/
        • 📄 policy.json +5 -0

Tip

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


🔗 @MetaMask/supply-chain (4 files, +20 -0)
  • 📁 lavamoat/
    • 📁 browserify/
      • 📁 beta/
        • 📄 policy.json +5 -0
      • 📁 experimental/
        • 📄 policy.json +5 -0
      • 📁 flask/
        • 📄 policy.json +5 -0
      • 📁 main/
        • 📄 policy.json +5 -0

Copy link

socket-security bot commented Oct 13, 2025

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​metamask/​messenger@​0.2.0 ⏵ 0.3.010010076 +189 -1100
Updated@​metamask/​base-controller@​8.3.0 ⏵ 8.4.11001007795 +1100
Updated@​metamask/​controller-utils@​11.12.0 ⏵ 11.14.199 +110077 +196 +3100
Updated@​metamask/​utils@​11.7.0 ⏵ 11.8.199 +110094 +194 -2100
Updated@​metamask/​phishing-warning@​5.0.1 ⏵ 5.1.0100 +8100100 +7100 +10100

View full report

@metamaskbot metamaskbot requested review from a team as code owners October 13, 2025 16:16
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: ecbd824 | Date: 10/13/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±73ms) 🟡 | historical mean value: 1.05s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 735ms (±70ms) 🟢 | historical mean value: 739ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 75ms (±13ms) 🟢 | historical mean value: 77ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 73ms 1.01s 1.33s 1.28s 1.33s
domContentLoaded 735ms 70ms 697ms 1.01s 945ms 1.01s
firstPaint 75ms 13ms 60ms 188ms 84ms 188ms
firstContentfulPaint 75ms 13ms 60ms 188ms 84ms 188ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [ecbd824]
UI Startup Metrics (1258 ± 73 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1258111214967313111363
load109096012996811401193
domContentLoaded108195312846711331183
domInteractive18144561836
firstPaint59894129443710921163
backgroundConnect25123243321254270
firstReactRender25175162739
getState1456781728
initialActions51506611
loadScripts838719101566891936
setupStore1062331017
WebpackHomeuiStartup19751424252127721582457
load15891118193721117541861
domContentLoaded15791114192321317481850
domInteractive171292121545
firstPaint1636640766188287
backgroundConnect3315291383156
firstReactRender82393306078305
getState3052896914270
initialActions62315620
loadScripts15751112191121217451838
setupStore186248351325
FirefoxBrowserifyHomeuiStartup1368120918059914221537
load1186106113676712471305
domContentLoaded1185106013666712471305
domInteractive973029247110214
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3119135133545
firstReactRender27236062734
getState7310810612
initialActions40477312
loadScripts1161104212986312211258
setupStore11419620825
WebpackHomeuiStartup15571362186313316651836
load13261167160412014211567
domContentLoaded13261167160312014201566
domInteractive1053331453105280
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3321100103848
firstReactRender37314933841
getState63132711
initialActions3110236
loadScripts13001131158412113981539
setupStore11514115920

@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 5b54350 | Date: 10/13/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.06s (±78ms) 🟡 | historical mean value: 1.05s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 741ms (±85ms) 🟢 | historical mean value: 739ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 89ms (±126ms) 🟢 | historical mean value: 77ms ⬆️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.06s 78ms 1.01s 1.44s 1.29s 1.44s
domContentLoaded 741ms 85ms 699ms 1.28s 969ms 1.28s
firstPaint 89ms 126ms 60ms 1.34s 88ms 1.34s
firstContentfulPaint 89ms 126ms 60ms 1.34s 88ms 1.34s
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [5b54350]
UI Startup Metrics (1239 ± 72 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1239110414407212701383
load107195412606511031206
domContentLoaded106294112536510921198
domInteractive18144761738
firstPaint54892121741510461175
backgroundConnect25324035413256279
firstReactRender25168992940
getState15692121929
initialActions51698613
loadScripts81769299964849945
setupStore1072331117
WebpackHomeuiStartup19061468250628421252430
load15281178192621416911848
domContentLoaded15211172191521316871836
domInteractive171283131441
firstPaint1686547167182297
backgroundConnect271371102856
firstReactRender91363407479329
getState3253047313281
initialActions62245519
loadScripts15171169190421216851824
setupStore146244231323
FirefoxBrowserifyHomeuiStartup14151218178212014861696
load1221106815198312831351
domContentLoaded1220106815188312821350
domInteractive1073550565111239
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect38211842838104
firstReactRender28247972934
getState936011743
initialActions3014238
loadScripts1193104814717912511314
setupStore94335822
WebpackHomeuiStartup15351312188616216741850
load13071113158413614031560
domContentLoaded13071113158313614021559
domInteractive1063529760102287
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect331987113846
firstReactRender36305443744
getState7315515610
initialActions411061035
loadScripts12831094156213813811541
setupStore95828817

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team-runway-bot Runway bot team (for Runway Bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants