-
Notifications
You must be signed in to change notification settings - Fork 5.4k
release(runway): cherry-pick feat: path based blocking #36824
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
base: release/13.4.3
Are you sure you want to change the base?
Conversation
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. |
✨ Files requiring CODEOWNER review ✨🔑 @MetaMask/accounts-engineers (1 files, +1 -0)
🧩 @MetaMask/extension-devs (4 files, +20 -0)
📜 @MetaMask/policy-reviewers (4 files, +20 -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)
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…ask/metamask-extension into cherry-pick-13-4-3-8bdd1e1
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [ecbd824]
UI Startup Metrics (1258 ± 73 ms)
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [5b54350]
UI Startup Metrics (1239 ± 72 ms)
|
Description
Introduces URL path based blocking within the extension. This allows
websites like
example.com/path
to be blocked rather than blocking allof
example.com
.Changelog
CHANGELOG entry: Added path-based blocking for URLs
Related issues
Fixes:
Manual testing steps
sites.google.com/view/aoooop/aave-com
and make sure that ityou are redirected to the Phishing Warning Page
sites.google.com/view/aoooop/
and make sure that it does notredirect you.
sites.google.com/view/aoooop/aave-com/path
and make sure thatyou are redirected to the Phishing Warning Page.
sites.google.com/view/aoooop/aave-com
should also nolonger redirect to the Phishing Warning Page.
sites.google.com/view/aoooop/aave-com/path
should also nolonger redirect to the Phishing Warning Page (implicit in step 4).
Screenshots/Recordings
Before
After
Pre-merge author checklist
Docs and MetaMask
Extension Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
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.
PathTrie
withinsertToTrie
,deleteFromTrie
,matchedPathPrefix
, and helpers for efficient path checks.PhishingDetector
to block byblocklistPaths
and exposeblockingPath(url)
.PhishingController
:whitelistPaths
state and path-based bypass logic.matchedPathPrefix
to allow whitelisted paths.getPathnameFromUrl
.getHostnameAndPathComponents
andgetPathnameFromUrl
.applyDiffs
to handleblocklistPaths
with trie ops and deep copy (deepCopyPathTrie
).'/v2/diffsSince'
.whitelistPaths
; default state includes empty trie; update removal keys and metrics allowlist.blocklistPaths
support.blocklistPaths
in list state.PathTrie_*
globals.@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