Skip to content

chore: update knip to latest version - #9304

Merged
Gudahtt merged 2 commits into
mainfrom
update-knip
Jun 29, 2026
Merged

Gudahtt merged 2 commits into
mainfrom
update-knip

Conversation

@Gudahtt

@Gudahtt Gudahtt commented Jun 29, 2026 •

Copy link
Copy Markdown
Member

Explanation

The minimum age gate has been overridden because there was a bug fixed this past weekend that resolves an issue with another PR of mine (#9395).

This is an in-range update, no "breaking" changes. Though some changes were required because knip@6.17.0 fixed a mistake where undeclared sibling workspace dependencies were missed. Any missing dependencies from core itself have been ignored in the config file for now.

References

Includes a bug fix for a bug encountered in #9395

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Low Risk
Tooling-only dependency bump and knip config allowlists; no production controller logic changes.

Overview
Bumps root knip from ^6.15.0 to ^6.23.0 (lockfile pulls newer oxc-parser / oxc-resolver and related native bindings used by knip).

Extends knip.config.ts so yarn lint:dependencies still passes after knip 6.17+ starts reporting sibling workspace packages that are imported (often type-only) but not declared in each package’s package.json. New or expanded ignoreDependencies snapshots cover perps-controller, account-tree-controller, bridge-status-controller, eip-5792-middleware, a new keyring-controller entry, profile-sync-controller, and transaction-controller.

These ignores are documented as temporary until teams add direct deps or confirm false positives—no runtime package code changes in this PR.

Reviewed by Cursor Bugbot for commit f00c15e. Bugbot is set up for automated code reviews on this repo. Configure here.

@socket-security

socket-security Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedknip@​6.16.0 ⏵ 6.23.099 +110095 +196100

View full report

@socket-security

socket-security Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

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 @oxc-parser/binding-wasm32-wasi is 75.0% likely to have a medium risk anomaly

Notes: The loader code itself is not directly exfiltrating data or implementing explicit malware, but it grants extensive host privileges (full environment and filesystem root mapping) to the instantiated WebAssembly/N-API module and to worker threads. The main supply-chain risk is the .wasm/napi artifact or worker script being compromised. Recommended mitigations: validate integrity/signatures of the .wasm artifact, avoid passing entire process.env to WASI/workers (pass minimal needed env), narrow WASI preopens to specific directories rather than filesystem root, avoid manipulating internal Worker symbols, and run untrusted wasm in more constrained sandboxing if possible.

Confidence: 0.75

Severity: 0.60

From: ? → npm/knip@6.23.0 → npm/@oxc-parser/binding-wasm32-wasi@0.137.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/@oxc-parser/binding-wasm32-wasi@0.137.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.

Warn Low
Potential code anomaly (AI signal): npm @oxc-parser/binding-wasm32-wasi is 90.0% likely to have a medium risk anomaly

Notes: This loader establishes a Node.js WASI/worker environment that: 1) passes the entire host process.env into the WASI instance (exposing all environment variables, including secrets, to loaded modules); 2) preopens the filesystem root (granting broad file read/write access under the host’s root directory); and 3) implements importScripts via synchronous fs.readFileSync + eval (allowing any local JS file to be executed in the loader context). If an untrusted or compromised WASM module or script is provided, it can read sensitive environment variables, access or modify arbitrary files, and execute arbitrary JavaScript—posing a moderate security risk. Recommended mitigations: restrict WASI preopens to a minimal directory, limit or sanitize environment variables passed into WASI, and replace or sandbox the eval-based importScripts mechanism.

Confidence: 0.90

Severity: 0.60

From: ? → npm/knip@6.23.0 → npm/@oxc-parser/binding-wasm32-wasi@0.137.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/@oxc-parser/binding-wasm32-wasi@0.137.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.

Warn Low
Potential code anomaly (AI signal): npm oxc-parser is 80.0% likely to have a medium risk anomaly

Notes: The module installs a binding package at runtime via pnpm into a predictable location and requires it during module load, performing network installation without integrity checks. This creates a supply-chain and remote-code-execution risk if an attacker can tamper with the registry, the package, or the installation path. Mitigations include removing runtime installs from require-time, preinstalling bindings during CI/install, validating integrity, and avoiding writable temporary directories or ensuring atomic installations.

Confidence: 0.80

Severity: 0.70

From: ? → npm/knip@6.23.0 → npm/oxc-parser@0.137.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/oxc-parser@0.137.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.

Warn Low
Potential code anomaly (AI signal): npm oxc-resolver is 90.0% likely to have a medium risk anomaly

Notes: This module implements a runtime fallback that installs a platform-specific binding into /tmp using pnpm and then requires it. The code itself contains no direct data-exfiltration, reverse-shell, or obvious malicious payloads. However, it performs an inherently risky operation: running the system package manager to fetch and install code at runtime without integrity verification and then executing that code. In contexts like an editor extension (OpenVSX), this increases supply-chain risk (a malicious or compromised binding package or tampered registry response could run arbitrary code). Recommendation: prefer shipping preinstalled bindings, use verified integrity checks (checksums or signatures), avoid spawning package managers at runtime in untrusted environments, and restrict filesystem writes to safer locations.

Confidence: 0.90

Severity: 0.60

From: ? → npm/knip@6.23.0 → npm/oxc-resolver@11.21.3

ℹ 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/oxc-resolver@11.21.3. 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.

Ignoring alerts on:

  • @emnapi/core@1.11.1
  • @emnapi/core@1.11.0
  • @emnapi/runtime@1.11.1
  • @oxc-resolver/binding-wasm32-wasi@11.21.3

View full report

@Gudahtt

Gudahtt commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@SocketSecurity ignore npm/@emnapi/runtime@1.11.1

The "obfuscated code" being highlighted here was a minified bundle, which isn't being used/imported in this case. The dashboard is highlighting use of eval, which is definitely questionable. But when I looked into it, it was just being used to get a reference to global this.

@Gudahtt

Gudahtt commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@SocketSecurity ignore npm/@emnapi/core@1.11.0

The alert warns that this could be used for arbitrary code execution, but it appears that that's the entire purpose of this library

@Gudahtt

Gudahtt commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@SocketSecurity ignore npm/@oxc-resolver/binding-wasm32-wasi@11.21.3

Sadly I don't have time right now to audit the WASM bundle, as this AI signal alert suggests.

Gudahtt added 2 commits June 29, 2026 16:05
The minimum age gate has been overridden because there was a bug fixed
this past weekend that resolves an issue with another PR of mine
(#9395).

This is an in-range update, no breaking changes.
These were missed by knip until v6.17.0
@Gudahtt
Gudahtt marked this pull request as ready for review June 29, 2026 18:35
@Gudahtt
Gudahtt temporarily deployed to default-branch June 29, 2026 18:35 — with GitHub Actions Inactive
@Gudahtt

Gudahtt commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

@SocketSecurity ignore npm/@emnapi/core@1.11.1

Same deal as with v1.11.0. It's unfortunate that the oxc packages reference two different pinned version of this.

@Gudahtt
Gudahtt enabled auto-merge June 29, 2026 18:39
@Gudahtt
Gudahtt added this pull request to the merge queue Jun 29, 2026
Merged via the queue into main with commit b4debb9 Jun 29, 2026
404 checks passed
@Gudahtt
Gudahtt deleted the update-knip branch June 29, 2026 18:41

This branch was previously deployed

1 inactive deployment
default-branch — f00c15ed Deployed Jun 29, 2026 by Gudahtt via Determine whether this PR is a release PR #1662
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants