T08 · Insecure Dependencies
- Location
SKILL.md:182- Finding
Unpinned npm Dependencies and Implicit Package Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:182,SKILL.md:262-263
Vulnerability Type: Unpinned third-party package installation and execution
Risk Level: LowVulnerable Code
At
SKILL.md:182:bash npx tsc --noEmitAt
SKILL.md:262-263:markdown | TypeScript | npm package | Recommended | `npm i -D typescript` | | ESLint + @typescript-eslint | npm package | Optional | `npm i -D eslint @typescript-eslint/eslint-plugin` |Technical Analysis
The documented npm installation commands do not pin reviewed package versions or require installation from a lockfile. They therefore resolve package versions from the registry at execution time. The effective dependency content can change after this skill has been reviewed.
The
npx tsc --noEmitinstruction can also download and execute a package when a suitable local executable is unavailable. This creates an implicit remote dependency resolution and code-execution boundary that is not clearly disclosed or restricted. npm package installation may execute package lifecycle scripts under the invoking user's account.No evidence indicates that the named packages are malicious. The issue is the unsafe, mutable dependency-resolution process rather than a confirmed malicious package.
Attack Path
- A user follows the skill's setup instructions without an existing reviewed lockfile.
- npm resolves the latest package versions permitted by the registry and local configuration.
- Alternatively, the user runs
npx tsc --noEmitwithout a localtscexecutable, causingnpxto retrieve a package. - If a resolved package, transitive dependency, registry endpoint, or user npm configuration has been compromised, attacker-controlled package installation or lifecycle code executes.
- The malicious code runs with the permissions of the user who invoked npm or
npx.
Impact Assessment
Successful exploitation could provide cod ...[truncated 511 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin reviewed dependency versions instead of resolving mutable latest releases:
bash npm install --save-dev --save-exact typescript@5.9.2 npm install --save-dev --save-exact eslint@9.35.0 @typescript-eslint/eslint-plugin@8.42.0Replace the example versions with versions that have been reviewed and approved.
-
Commit
package-lock.jsonand use deterministic installation in automation:bash npm ci --ignore-scriptsIf lifecycle scripts are required, review them before allowing installation without
--ignore-scripts. -
Prevent
npxfrom downloading missing packages implicitly:bash npx --no-install tsc --noEmitAlternatively, invoke the reviewed project-local binary directly:
bash ./node_modules/.bin/tsc --noEmit -
Document that users should verify the registry source, lockfile integrity, package provenance, and dependency audit results before installation.
-
Run dependency tooling in a least-privileged development environment without production credentials or unrelated secrets.
-
