T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:174
- Finding
- Unpinned Third-Party Migration Tools Enable Supply-Chain Code Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 174–197 **Vulnerability Type**: Unpinned third-party executable dependencies **Risk Level**: Medium ### Vulnerable Code ```bash echo " - npx @codemod/cli --transform react/19/migration" echo " - npx react-codemod rename-unsafe-lifecycles" echo " - npx react-codemod update-react-imports" ``` ```bash echo " - npx ts-migrate setup ." echo " - npx @codemod/cli --transform js-to-ts" ``` ```bash echo " - npx @vue/compat" echo " - gogocode-cli -s ./src -t vue2-to-vue3 -o ./src" ``` ### Technical Analysis The skill recommends executing third-party migration utilities without pinning reviewed versions or requiring lockfile and integrity verification. In particular, `npx` can download and execute the current package-registry release, including package CLI and lifecycle code, when the package is not already installed locally. The effective code therefore may differ from the code that existed when this skill was reviewed. A compromised maintainer account, malicious package release, dependency compromise, or unexpected upstream change could cause arbitrary code to execute under the invoking user's account. The listed commands are emitted as recommendations rather than executed automatically by this skill, which reduces the immediacy of exploitation. Exploitation nevertheless becomes possible when a user or automation agent follows the generated recommendation. ### Attack Path 1. A user requests codemod recommendations for a supported migration. 2. The skill emits one of the unpinned `npx` or `gogocode-cli` commands. 3. The user or an automation agent executes the recommended command. 4. The package manager resolves mutable third-party registry content without enforcing a reviewed version and integrity baseline. 5. A compromised or malicious package, version, or transitive dependency executes with the user's local privileges. 6. The executed code can access and alter files and credentials availabl ...[truncated 752 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every recommended package to a specifically reviewed version, for example `package@x.y.z`. 2. Add approved tools to project development dependencies and commit the package-manager lockfile. 3. Invoke only locked, locally installed binaries; where appropriate, use `npx --no-install` to prevent implicit downloads. 4. Use a trusted registry and enforce package integrity, provenance, and signature checks where supported. 5. Review each tool and its transitive dependency graph before approval. 6. Run codemods in an isolated environment with minimal filesystem permissions, no unnecessary credentials, and restricted network access. 7. Require explicit user confirmation before downloading or executing any third-party migration tool. 8. Create a clean version-control checkpoint before execution and review all resulting changes before commit.
