-
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
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, +8 -0)
📜 @MetaMask/policy-reviewers (4 files, +8 -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, +8 -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)
|
…ask/metamask-extension into cherry-pick-13-4-3-8bdd1e1
…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 [5b54350]
UI Startup Metrics (1239 ± 72 ms)
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [cc97556]
UI Startup Metrics (1253 ± 86 ms)
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [d5da20f]
UI Startup Metrics (1215 ± 69 ms)
|
📊 Page Load Benchmark ResultsCurrent Commit: 📄 Localhost MetaMask Test DappSamples: 100 Summary
📈 Detailed Results
Results generated automatically by MetaMask CI |
Builds ready [5b70d32]
UI Startup Metrics (1235 ± 75 ms)
|
}, | ||
"@metamask/base-controller": { | ||
"globals": { | ||
"console.error": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to facilitate future stable-sync PR creation: All lavamoat file updates come from the upgrade of "@metamask/base-controller" from v8.3.0 to v8.4.0 in this PR, which is included in release 13.5.0.
); | ||
assert.equal( | ||
METAMASK_HOTLIST_DIFF_URL, | ||
'https://phishing-detection.api.cx.metamask.io/v1/diffsSince', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to facilitate future stable-sync PR creation: Some changes in this e2e test file have been omitted here on purpose (while there were on the original PR) because important refactoring has taken place in e2e test files on main
which makes it too difficult to import the changes here.
Instead, we'll rely on manual testing for the phishing detection e2e test cases on this release branch.
Then we'll need to ensure that these changes don't get merged back to main
.
No release label on PR. Adding release label release-13.4.3 on PR, as PR was cherry-picked in branch 13.4.3. |
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
Introduce trie-based path matching for phishing detection, add path whitelisting, migrate hotlist diffs to v2, and update tests/mocks and dependencies.
PathTrie
(insert/delete/match, list->trie, deep copy) used to matchhostname+path
.PhishingController
): newstate.whitelistPaths
;test
/bypass
honor path matches; parse stalelistblocklistPaths
viaconvertListToTrie
; hotlist diffs endpoint tov2
.PhishingDetector
): checkblocklistPaths
withmatchedPathPrefix
; exposeblockingPath(url)
.getHostnameAndPathComponents
/getPathnameFromUrl
;applyDiffs
supportsblocklistPaths
with trie ops; minor config cleanup.diffsSince v2
; metrics masks includewhitelistPaths
.whitelistPaths
from UI state and snapshots.@metamask/phishing-controller
(adds new dist files); bump@metamask/phishing-warning
; lockfile/attributions updates; LavaMoat policies allowconsole.error
for base-controller.Written by Cursor Bugbot for commit 5b70d32. This will update automatically on new commits. Configure here.
Co-authored-by: augmentedmode [email protected] 8bdd1e1