T08 · Insecure Dependencies
- Location
SKILL.md:16- Finding
Unpinned Playwright Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 16
Vulnerability Type: Unpinned third-party package retrieval and execution
Risk Level: MediumVulnerable Code
markdown - On a fresh machine, or under an isolated `HOME`, install Playwright browsers first with `npx playwright install`.Technical Analysis
The documented command invokes Playwright through
npxwithout declaring a version, lockfile, integrity hash, trusted registry configuration, or requirement to use an already-installed local package.If Playwright is not available in the local dependency tree,
npxcan resolve and download a package from the configured npm registry before executing its command. Consequently, the code executed by users may differ from the version reviewed when this skill was audited. Package resolution may also be influenced by registry configuration and the user's execution environment.This creates a supply-chain trust boundary outside the reviewed project. Exploitation would require compromise or manipulation of the relevant package distribution path, such as a compromised upstream release, registry account, registry mirror, or package-resolution environment.
Attack Path
- A user follows the prerequisite in
SKILL.mdon a fresh or isolated machine where Playwright is not locally installed. - The user runs
npx playwright install. npxresolves the unpinnedplaywrightpackage through the configured npm registry or mirror.- A compromised or maliciously substituted package version is downloaded.
- Package lifecycle behavior or the invoked package command executes attacker-controlled code with the privileges of the user running the command.
- That code can access resources available to the user, potentially including project files, environment variables, network credentials, and browser-related data permitted by the host environment.
Impact Assessment
Successful exploitation would provide code execution under the ...[truncated 654 chars]
- A user follows the prerequisite in
- Remediation
View remediation
Remediation Suggestions
-
Add Playwright as an explicitly versioned project dependency and commit the corresponding package lockfile.
-
Install dependencies with a lockfile-enforcing command such as:
bash npm ci -
Invoke only the audited local dependency and prevent
npxfrom downloading a missing package:bash npx --no-install playwright install -
Alternatively, invoke the locked local executable directly:
bash ./node_modules/.bin/playwright install -
Pin the expected Node.js and Playwright versions in project documentation and continuous-integration checks.
-
Configure an approved npm registry and use lockfile integrity metadata. In higher-assurance environments, verify package provenance or signatures and mirror approved artifacts internally.
-
Update the prerequisite so it fails safely when the pinned local package is absent rather than retrieving and executing an arbitrary current registry version.
-
