T08 · Insecure Dependencies
- Location
SKILL.md:35- Finding
Unpinned Third-Party Runtime Tool Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:35
Vulnerability Type: Unpinned npm dependency and mutable supply-chain resolution
Risk Level: Mediumbash npm i -D tsxTechnical Analysis
The installation instructions retrieve
tsxwithout specifying an exact version. The project also contains no lockfile, andpackage.jsondoes not declare a reviewed version oftsx. The installed package and its transitive dependencies are therefore resolved from the configured npm registry at installation time and can differ from the components available when the Skill was audited.npm installation may execute package lifecycle scripts. If the resolved
tsxpackage, one of its transitive dependencies, the package maintainer account, or the configured registry is compromised, attacker-controlled code could run during installation or whentsxis subsequently used to execute the TypeScript scripts.This finding concerns the dependency installation process. No malicious execution, network access, persistence mechanism, or credential access was identified in the checked-in project scripts.
Attack Path
- An attacker compromises the selected npm package release, a transitive dependency, a maintainer account, or the npm registry configured on the target system.
- A user follows the documented compatibility instructions and runs
npm i -D tsx. - npm resolves and downloads the currently available package graph because neither an exact dependency version nor a lockfile constrains resolution.
- Malicious lifecycle code may execute during installation, or malicious package code may execute when the user invokes the installed
tsxruntime. - The payload runs under the account and environment used for installation or script execution.
Impact Assessment
Successful exploitation could provide arbitrary code execution with the privileges of the user running npm or
tsx. The potential scope includes files ...[truncated 279 chars]- Remediation
View remediation
Remediation Suggestions
- Declare
tsxinpackage.jsonusing a reviewed exact version rather than installing the latest available release. - Generate and commit a lockfile that records the complete dependency graph and integrity hashes.
- Replace the unconstrained installation instruction with
npm ci, which installs the dependency versions recorded in the lockfile. - Regularly review and update dependencies through a controlled process that includes vulnerability scanning and integrity verification.
- Prefer direct execution with the supported Node.js runtime when available, avoiding the optional third-party runtime entirely.
- If package lifecycle scripts are not required, consider installing with
npm ci --ignore-scriptsafter verifying that this does not break legitimate functionality. - Advise users not to run dependency installation with administrator or root privileges.
- Declare
