T08 · Insecure Dependencies
- Location
SKILL.md:266- Finding
Unpinned Third-Party Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:266
Vulnerability Type:T08: Insecure Dependencies
Risk Level: Mediumbash npx lhci autorunTechnical Analysis
The skill recommends executing
lhcidirectly throughnpxwithout specifying a reviewed version, requiring a lockfile, or restricting execution to an already installed local package. If the package is unavailable locally,npxmay retrieve and execute it from the configured package registry.Because the package name and version are not securely pinned, the effective executable can change after the skill has been reviewed. The short package name may also resolve to an unintended package rather than the expected Lighthouse CI tooling. This creates exposure to package compromise, package-name confusion, registry compromise, and unexpected upstream changes.
Attack Path
- A user or CI agent follows the instruction in
SKILL.md. - The environment does not contain a trusted local executable matching
lhci. npxresolves the unpinned package through the configured package registry.- An attacker-controlled, compromised, or unintended package is downloaded.
- Package lifecycle logic or the package CLI executes with the privileges of the user or CI runner.
- The malicious code can access resources available to that process, including the source tree, environment variables, build artifacts, and CI credentials.
Impact Assessment
Successful exploitation permits arbitrary code execution with the invoking user's or CI runner's privileges. The accessible scope may include project files, repository credentials, package-registry tokens, deployment credentials, environment secrets, and build outputs. In a privileged CI environment, this could lead to source-code modification, secret theft, poisoned artifacts, or compromise of downstream deployment processes.
- A user or CI agent follows the instruction in
- Remediation
View remediation
Remediation Suggestions
- Verify the intended Lighthouse CI package and use its official, fully qualified package name.
- Add a reviewed, exact version as a development dependency and commit the generated lockfile.
- Run only the locally installed and lockfile-verified executable, for example with
npx --no-install, rather than allowing on-demand registry retrieval. - Configure CI to use lockfile-enforcing installation commands such as
npm ci. - Disable or strictly control dependency lifecycle scripts where operationally feasible.
- Apply dependency integrity verification, automated vulnerability scanning, and controlled registry policies.
- Apply the same pinning and local-only execution requirements to the
npx bundlesizeguidance near line 263 if it is used as an executable command.
