T08 · Insecure Dependencies
- Location
SKILL.md:17- Finding
Unpinned Third-Party Package Installation and Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 17
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumComplete Code Snippet:
markdown - **Installable**: `npx playwright install --with-deps` (end-to-end testing), `npm i -D web-vitals` (performance monitoring)Technical Analysis
The skill recommends invoking
npx playwrightand installingweb-vitalswithout specifying reviewed package versions or requiring lockfile and integrity verification.When the requested package is not already available locally,
npxmay retrieve and execute the package CLI from the configured npm registry. Thenpm i -D web-vitalscommand likewise resolves a registry version dynamically and modifies the target project's dependency manifest and installation tree. Package installation can execute package lifecycle scripts with the permissions of the invoking user.The
--with-depsoption additionally installs browser-related system dependencies where supported. This broadens the operation beyond the target project's dependency directory and may invoke an operating-system package manager with elevated privileges.Related illustrative commands occur in
references/examples.mdat lines 824-843 and 882-884, reinforcing the same unpinned installation pattern.Attack Path
- An agent follows the optional environment setup instructions.
- The agent runs
npx playwright install --with-depsornpm i -D web-vitals. - npm resolves an unpinned package version through the configured package registry.
- If the resolved package, registry account, dependency chain, or registry configuration has been compromised, attacker-controlled package code or lifecycle scripts execute during installation.
- The payload obtains the permissions of the user running npm. If system dependencies are installed with elevated permissions, the affected scope may extend beyond the project directory.
...[truncated 691 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every recommended package to a reviewed exact version, for example by installing an explicitly approved Playwright and
web-vitalsrelease. - Commit a trusted lockfile and use
npm cifor reproducible dependency installation. - Avoid implicit package downloads through
npx; install the pinned package first and invoke its local binary withnpx --no-installor the package manager's equivalent. - Verify package provenance and integrity before approval, including the publisher, registry source, dependency tree, and lockfile integrity hashes.
- Disable or restrict lifecycle scripts where they are unnecessary, such as with
npm ci --ignore-scripts, after confirming that required package functionality does not depend on them. - Separate
playwright installfromplaywright install --with-deps. Clearly disclose that the latter may modify system packages and require explicit user approval. - Perform installation in an isolated, least-privileged environment such as a disposable container or dedicated CI worker.
- Update the related commands in
references/examples.mdto follow the same pinned and reproducible installation process.
- Pin every recommended package to a reviewed exact version, for example by installing an explicitly approved Playwright and
