T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:351
- Finding
- Unpinned Third-Party Package Execution via npx## Vulnerability Details **File Location**: `SKILL.md:351` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ```bash # Lighthouse CLI npx lighthouse https://example.com --output html --output-path report.html ``` ### Technical Analysis The documented command invokes `lighthouse` through `npx` without specifying an exact package version. If the package is not already available locally, `npx` may resolve, download, and execute the version currently served by the configured package registry. The project provides no lockfile, integrity verification, trusted-registry requirement, or reviewed installation step to constrain that resolution. This creates a supply-chain trust boundary in which the code executed by the command can change after the Skill has been reviewed. A compromised package release, registry account, registry mirror, or package-resolution configuration could therefore cause arbitrary package lifecycle or CLI code to run. The behavior is not required at this privilege level to provide performance-audit guidance. The documentation could instead reference a reviewed, exactly pinned dependency and require explicit installation before execution. ### Attack Path 1. An attacker compromises the upstream package publication process, a configured registry or mirror, or another relevant dependency in the resolved package tree. 2. A malicious or compromised package version becomes the version selected by the unpinned `npx lighthouse` command. 3. A user follows the command in `SKILL.md`. 4. `npx` downloads and executes the selected package in the user's environment. 5. Malicious package code runs with the permissions of the invoking user and can access resources available to that account. ### Impact Assessment Successful exploitation can execute arbitrary code with the invoking user's privileges. Depending on the execution environment, this may permit access to user-readable files ...[truncated 500 chars]
- Remediation
- ## Remediation Suggestions - Pin Lighthouse to an exact, reviewed version, for example: ```bash npx --yes lighthouse@X.Y.Z https://example.com --output html --output-path report.html ``` - Prefer declaring the exact package version in a project manifest and committing the corresponding lockfile. - Install dependencies with a lockfile-enforcing command such as `npm ci`, then invoke the reviewed local binary. - Configure an approved package registry and validate lockfile integrity metadata. - Use automated dependency scanning and controlled update review before changing the pinned version. - Run performance-audit tooling in an isolated, least-privileged environment without unnecessary credentials or access to sensitive files. - Avoid presenting commands that implicitly download and execute the latest package version.
