T08 · Insecure Dependencies
- Location
SKILL.md:31- Finding
Unpinned External Dependency Resolution and Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 31-34
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code:
bash cd metamask-agent-skill npm install npx playwright install chromiumTechnical Analysis
The setup instructions invoke
npm installandnpx playwrightwithout specifying an exact Playwright version, integrity information, or a verified lockfile. The audited artifact contains onlySKILL.md; it does not include the referencedpackage.jsonor package lockfile.When a suitable local Playwright executable is unavailable,
npxmay resolve and download a package from the configured npm registry before executing its command-line entry point. This makes the executed code dependent on mutable external package resolution and the user's npm configuration. The artifact therefore does not provide enough information to reproduce or audit the code that these instructions may execute.This finding establishes an unsafe dependency-resolution pattern, but the reviewed file contains no evidence that the legitimate Playwright package itself is malicious.
Attack Path
- A user follows the documented installation procedure.
npm installornpxresolves packages using the user's configured npm registry and current dependency metadata.- An attacker compromises the resolved package, registry account, registry mirror, DNS/network path, or dependency configuration.
- The attacker-controlled package is downloaded during installation or
npxresolution. - Package lifecycle scripts or the resolved command-line entry point execute with the privileges of the user running the setup commands.
- The malicious code can access resources available to that user, including files, environment variables, browser data, and wallet-related files.
Impact Assessment
Successful exploitation could provide arbitrary code execution under the ins ...[truncated 579 chars]
- Remediation
View remediation
Remediation Suggestions
- Include a reviewed
package.jsonand lockfile in the distributed project. - Pin Playwright and every other direct dependency to an exact version rather than a floating range.
- Replace general installation instructions with
npm ci, which enforces dependency versions from the lockfile. - Invoke the locally installed binary, such as
npm exec --offline playwright -- install chromium, and configure npm to reject an unexpected network fallback. - Use the official npm registry or a controlled internal registry and enforce registry configuration in deployment documentation.
- Validate lockfile integrity and review package provenance, signatures, maintainers, lifecycle scripts, and transitive dependency changes before upgrades.
- Verify the integrity and provenance of downloaded Playwright browser artifacts.
- Run installation and wallet automation in a dedicated, unprivileged operating-system account or isolated container with minimal filesystem and credential access.
- Add automated dependency scanning and lockfile-diff review to the release process.
- Include a reviewed
