Skip to content

2.5.1#1725

Open
drqsatoshi wants to merge 14 commits intoMetaMask:masterfrom
drqsatoshi:master
Open

2.5.1#1725
drqsatoshi wants to merge 14 commits intoMetaMask:masterfrom
drqsatoshi:master

Conversation

@drqsatoshi
Copy link

@drqsatoshi drqsatoshi commented Feb 15, 2026

Note

Medium Risk
Adds a new CLI that can write/delete local metadata and icon files and introduces a large new package-lock.json; changes are mostly tooling/docs but could impact contributor workflows and release packaging if misused or misconfigured.

Overview
Introduces a new cli-update-asset.js tool to update, verify, and list CAIP-19 assets by reading/writing metadata/<chain>/<asset>.json and managing icon files (including downloading/copying and removing old icons when the format changes), with validation against permitted-fields.json and optional EVM checksum checking.

Wires the CLI into npm scripts (asset:*, test:cli), expands the test suite with test/cli-update-asset.js, bumps package version to 2.5.1, and adds a package-lock.json. Documentation is updated to reflect the CAIP-19 metadata/icon directory layout and to add AI assistant guidance (CLAUDE.md, .github/copilot-instructions.md), plus a CODEOWNERS update.

Written by Cursor Bugbot for commit cb3eb8f. This will update automatically on new commits. Configure here.

@drqsatoshi drqsatoshi marked this pull request as ready for review February 15, 2026 12:17
@drqsatoshi drqsatoshi requested review from a team and MRabenda as code owners February 15, 2026 12:17
@socket-security
Copy link

socket-security bot commented Feb 15, 2026

Warning

MetaMask internal reviewing guidelines:

  • Do not ignore-all
  • Each alert has instructions on how to review if you don't know what it means. If lost, ask your Security Liaison or the supply-chain group
  • Copy-paste ignore lines for specific packages or a group of one kind with a note on what research you did to deem it safe.
    @SocketSecurity ignore npm/PACKAGE@VERSION
Action Severity Alert  (click "▶" to expand/collapse)
Warn Low
Potential code anomaly (AI signal): npm get-intrinsic is 100.0% likely to have a medium risk anomaly

Notes: The GetIntrinsic module is a conventional intrinsic resolver designed for sandboxed JavaScript environments. It includes careful validation, alias handling, and selective dynamic evaluation for specific intrinsics. While there is a real potential risk from Function-based evaluation if exposed to untrusted input, in this isolated code path there is no evidence of data leakage, backdoors, or external communications. The component is acceptable with proper sandbox boundaries; the most important mitigations are ensuring inputs are trusted and that dynamic evaluation cannot be triggered by untrusted sources.

Confidence: 1.00

Severity: 0.60

From: package-lock.jsonnpm/ethereumjs-util@5.2.1npm/tape@4.17.0npm/get-intrinsic@1.3.0

ℹ Read more on: This package | This alert | What is an AI-detected potential code anomaly?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: An AI system found a low-risk anomaly in this package. It may still be fine to use, but you should check that it is safe before proceeding.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/get-intrinsic@1.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

// Download or copy
if (opts.logo.startsWith("http://") || opts.logo.startsWith("https://")) {
console.log(`Downloading icon from: ${opts.logo}`);
await downloadFile(opts.logo, iconAbsPath);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Old icon deleted before download confirmed, causing data loss

Medium Severity

When the icon format changes, commandUpdate deletes the old icon via fs.unlinkSync at line 246 before the replacement download at line 257 completes. If the HTTP download fails (network error, timeout, non-200 status), the old icon is already gone, the new icon doesn't exist or is partial, and the metadata file still references the old (now-deleted) path. The asset is left in a broken state with no icon file. The deletion needs to happen after the new icon is confirmed on disk.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants