-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Append phishfort blocklist #715
Conversation
Merge existing fork code
Submitted w/ explanation to @sethkfman via email. |
I have updated the PR with the following:
The only thing discussed above but not yet catered for is tying back a specific blocklist entry to a list. The Detector from eth-phishing-detect would likely also need to change to do this, or alternatively the architecture of the PhishingController would need a revamp to allow for multiple PhishingDetector instances. I would like to get this merged for the sake of getting users protected sooner rather than later, while we work out list separation separately, preferably in its own PR. |
Good point that the detector would require an update to distinguish which list the block came from. Still, I think that is important enough to block this. |
@Gudahtt Noted. My understanding is that you intend to make the required changes to
|
I have a PR up now that implements support for multiple configurations on the phishing detector: MetaMask/eth-phishing-detect#7079 Thanks for the suggested configuration @moosthuizen42 . I mostly used that, except I omitted |
Thanks @Gudahtt. I'll keep an eye on #7079. Once merged, I intend to update the version of eth-phishing-detect used in our fork, and then integrate both configurations. |
v1.2.0 of |
That would be ideal, yeah. We do want to have all properties tested. Though it seems there aren't any fuzzylist tests right now, so those would need to be added. We could use tests for the multi-config setup as well. |
Not sure how much of the test improvements to ask you to complete here. I try to ensure that all new changes are fully tested but not to require adding tests that were already missing in the first place, as a general rule. So if you wanted to add fuzzylist tests, that would be great, but I would accept this with just additional assertions for the |
Done. A sequence of fuzzylist tests added as well. @Gudahtt, once you have taken a look, please confirm that everything you expect to see is there. Other minor changes:
|
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.
Sorry I'm only just now realizing that the legacy config remains in use until the first update. Could you update the constructor to use the new format as well, passing in the config as an array? I think this would be simpler if we moved directly to the new format, so we wouldn't have to anticipate the two different return types.
Co-authored-by: Mark Stacey <[email protected]>
Done. Testing references to legacy config have been replaced with default config. |
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.
LGTM, great work! The tests look fantastic except that the fuzzylist tests don't check the match
property on the result. But that's fine, I can add that later.
Looks like I don't have permission to make commits on this branch. I can merge this after my suggestion is addressed or merged, and the lint errors are fixed. |
Co-authored-by: Mark Stacey <[email protected]>
Co-authored-by: Mark Stacey <[email protected]>
More lint errors. Please run |
Noted, haven't gotten around to linting yet. Will notify once done. |
@Gudahtt Linting done, build and test complete successfully. Please note that I am only running the |
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.
LGTM! Holding off a bit on merging this, as I'm going to talk this over with the product teams first and see what it would take to get this change included.
@Gudahtt Any update on this? |
Hey @moosthuizen42 , sorry for the delay! Got side-tracked for a few of weeks, was about to come back to this. I have talked to both product teams and we're all on board with including this in the next release, so this can be merged now once it's brought up to date. Can you update the branch? |
* Append PhishFort blacklist, whitelist to detection * Typo fix * Removed unnecessary list * Swapped out blacklist with lighter "hotlist" * collapse sequential queries * Updated queryConfig, graceful failure of one list. * Updated eth-phishing-detect to v1.2 * Add config interface, shaping of configs. * Updated tests for multiple configs * Return EthPhishingDetectResult from check(...) * Tests: 'type' & 'name' checks, fuzzy & legacy cnf. * Update src/third-party/PhishingController.ts Co-authored-by: Mark Stacey <[email protected]> * Updated default config & related tests * Update src/third-party/PhishingController.ts Co-authored-by: Mark Stacey <[email protected]> * Update src/third-party/PhishingController.ts Co-authored-by: Mark Stacey <[email protected]> * Linting Co-authored-by: korn101 <[email protected]> Co-authored-by: Mark Stacey <[email protected]>
* Append PhishFort blacklist, whitelist to detection * Typo fix * Removed unnecessary list * Swapped out blacklist with lighter "hotlist" * collapse sequential queries * Updated queryConfig, graceful failure of one list. * Updated eth-phishing-detect to v1.2 * Add config interface, shaping of configs. * Updated tests for multiple configs * Return EthPhishingDetectResult from check(...) * Tests: 'type' & 'name' checks, fuzzy & legacy cnf. * Update src/third-party/PhishingController.ts Co-authored-by: Mark Stacey <[email protected]> * Updated default config & related tests * Update src/third-party/PhishingController.ts Co-authored-by: Mark Stacey <[email protected]> * Update src/third-party/PhishingController.ts Co-authored-by: Mark Stacey <[email protected]> * Linting Co-authored-by: korn101 <[email protected]> Co-authored-by: Mark Stacey <[email protected]>
PhishFort phishing blacklist
Included PhishFort blacklist in the default blacklist used to perform phishing detection.
Description
ADDED:
Checklist