Skip to content
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

feat: enable security alerts api #28040

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open

feat: enable security alerts api #28040

wants to merge 7 commits into from

Conversation

vinistevam
Copy link
Contributor

@vinistevam vinistevam commented Oct 23, 2024

Description

This PR aims to enable the Security Alerts API. The environment variable SECURITY_ALERTS_API_ENABLED will be maintained and removed in a separate PR in a future release.
There is a fallback mechanism that uses the local PPOM to validate the request in the case of an issue with the API. This safeguard is designed to prevent any disruption or impact on the user experience.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2516

Manual testing steps

  • Go to test dapp and trigger one of the malicious signatures
  • To verify in Chrome go to dev tools > network. Search for security-alerts and find the call to the API service.

Screenshots/Recordings

test-security-alerts-api.webm

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.

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.

@github-actions github-actions bot added the team-confirmations Push issues to confirmations team label Oct 23, 2024
@vinistevam vinistevam marked this pull request as ready for review October 23, 2024 13:04
@vinistevam vinistevam requested review from a team as code owners October 23, 2024 13:04
matthewwalsh0
matthewwalsh0 previously approved these changes Oct 23, 2024
jpuri
jpuri previously approved these changes Oct 23, 2024
@sleepytanya
Copy link
Contributor

PPOM on Ethereum works as expected.
BNB - Malicious Transfer (USDC) is not flagged
Avalanche - Malicious Set Approval for All and Sign Permit are not flagged
zkSync - Malicious Permit, Malicious Seaport, Sign Permit, Malicous Permit with Padded ChainID - are not flagged (some of them could be ignored as they are not supported on zkSync yet?)

Screenshot 2024-10-23 at 22 35 54 Screenshot 2024-10-23 at 22 34 24 Screenshot 2024-10-23 at 22 48 11 Screenshot 2024-10-23 at 22 48 00

@metamaskbot
Copy link
Collaborator

Builds ready [93bfff7]
Page Load Metrics (2120 ± 230 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint35731821781712342
domContentLoaded161028962076443213
load162132052120480230
domInteractive20146493316
backgroundConnect8309416431
firstReactRender483711348340
getState567222211
initialActions01000
loadScripts118621991560363174
setupStore10162403818
uiStartup181738262451617296
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 730 Bytes (0.02%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-confirmations Push issues to confirmations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants