feat: extend address scan result - #9921
Open
imblue-dabadee wants to merge 3 commits into
Open
Conversation
imblue-dabadee
marked this pull request as ready for review
August 25, 2026 11:34
imblue-dabadee
enabled auto-merge
August 25, 2026 11:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Expose
address_alert_response_flagged_byfrom the Security Alerts address-scan API through@metamask/phishing-controller.The controller previously retained only
result_typeandlabel, which would drop the new vendor-attribution data from the Security Alerts API before it reached consumers. This change adds the field to the public scan result and address-scan cache, preserving vendor arrays from the API.The field is always exposed as a
string[]. Controller error paths, legacy API responses, and pre-existing cached entries default it to[], keeping the result shape consistent while preserving existing scan behavior.References
Checklist
Note
Low Risk
Additive extension to address-scan results with empty-array defaults; scan decision logic is unchanged, though TypeScript consumers must accept the new required field on
AddressScanResult.Overview
Adds
address_alert_response_flagged_by(string[]) to publicAddressScanResultandAddressScanCacheData, soscanAddressno longer drops Security Alerts vendor attribution before returning or caching results.PhishingController.scanAddressnow forwards vendor arrays from the API, stores them in the address-scan cache, and always includes the field on every path (success, cache hit, and errors). Legacy API payloads and older cached entries without the property default to[], keeping the result shape stable.Tests and the package changelog cover happy path, legacy API/cache behavior, and error responses.
Reviewed by Cursor Bugbot for commit 2f2dcfc. Bugbot is set up for automated code reviews on this repo. Configure here.