T08 · Insecure Dependencies
Warning
- Location
- references/tooling.md:37
- Finding
- Unpinned npm Packages Are Installed or Executed Without Integrity Verification## Vulnerability Details **File Location**: `references/tooling.md:37-38` and `references/tooling.md:51` **Vulnerability Type**: Unpinned third-party dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash npm i -g @tanstack/cli npx @tanstack/cli create ``` ```bash npx @tanstack/intent doctor ``` ### Technical Analysis These instructions resolve package versions dynamically from the configured npm registry. The `npx` commands may download and immediately execute package code, while the global installation makes the resolved CLI persist in the user's environment. No version constraint, lockfile, package integrity value, or provenance-verification step is provided. The package names are consistent with the Skill's declared TanStack documentation purpose, and the audit found no evidence that these packages are currently malicious or that the names are typosquatted. Nevertheless, executing an unpinned package creates a supply-chain trust boundary: the code ultimately run may differ from the code reviewed when the Skill was published. ### Attack Path 1. An attacker compromises the relevant npm publisher account, package release process, registry response, or a future package version. 2. The attacker publishes a malicious version under the package name referenced by the Skill. 3. A user follows the unpinned `npm` or `npx` instruction. 4. npm resolves the attacker-controlled version and may execute installation lifecycle scripts or the requested CLI entry point. 5. The malicious code operates with the permissions and environment available to the invoking user. ### Impact Assessment A compromised package could execute arbitrary code with the invoking user's privileges. Depending on that user's environment, this could expose project files, source code, accessible credentials, environment variables, package-manager tokens, and network resources. It could also modify files or install additional user-leve ...[truncated 300 chars]
- Remediation
- ## Remediation Suggestions - Pin every executable package to a reviewed exact version, for example `npx @tanstack/cli@<reviewed-version> create`. - Prefer project-local development dependencies over global installation. - Commit and enforce a lockfile so package versions and transitive dependencies remain reproducible. - Invoke locally installed binaries through package scripts or `npm exec --offline` after an audited installation. - Verify package provenance, publisher identity, release signatures or attestations, and registry integrity metadata before execution. - Disable installation lifecycle scripts where they are unnecessary, such as with `npm install --ignore-scripts`, after confirming that the package functions correctly under that restriction. - Run scaffolding and diagnostic tools in a minimally privileged environment without sensitive credentials. - Document that users should review generated files and package changes before executing or committing them.
