T08 · Insecure Dependencies
- Location
scripts/script.sh:290- Finding
Unpinned npm Package Execution Through npx
- Content
View full analysis
Vulnerability Details
File Location:
scripts/script.sh:290
Vulnerability Type: Unpinned third-party dependency execution
Risk Level: MediumVulnerable Code
bash npx license-checker --summary # npm dependency licensesTechnical Analysis
The generated cheat sheet recommends executing
license-checkerthroughnpxwithout specifying a reviewed package version or verifying package integrity. When the package is unavailable locally,npxmay retrieve it from the configured npm registry and execute its current published version.Because the resolved package content can change independently of the audited Skill, this command creates a supply-chain trust boundary. A compromised package release, registry account, registry configuration, or dependency could cause arbitrary package code or lifecycle behavior to run under the invoking user's account.
The command is printed as documentation rather than executed automatically by the Skill. Exploitation therefore requires a user or Agent to follow and run the recommendation.
Attack Path
- A user or Agent invokes the Skill's
cheatsheetcommand. - The Skill displays
npx license-checker --summaryas a recommended license-scanning command. - The user or Agent runs the displayed command in a project directory.
- If a trusted local copy is not available,
npxresolves and downloads an unpinned package from the configured npm registry. - A compromised or malicious package version executes with the current user's privileges.
- The package can access files and environment data available to that user and can modify the project or other user-writable resources.
Impact Assessment
Successful exploitation permits code execution with the privileges of the user running
npx. The accessible scope may include the current project, user-owned files, environment variables inherited by the process, developer configuration, and credentials ...[truncated 160 chars]- A user or Agent invokes the Skill's
- Remediation
View remediation
Remediation Suggestions
-
Pin the package to a specifically reviewed version, for example:
bash npx --yes license-checker@REVIEWED_VERSION --summary -
Prefer installing the dependency through a project manifest and lockfile, then executing the lockfile-resolved local binary.
-
Verify the package name, publisher, provenance, and integrity before recommending a version.
-
Use npm integrity and provenance controls where available, and update the pinned version only after review.
-
Explicitly warn users that
npxmay download and execute third-party code with their current account privileges. -
Recommend running scanning tools in a restricted environment without sensitive environment variables or unnecessary filesystem access.
-
