T08 · Insecure Dependencies
Warning
- Location
- README_EN.md:145
- Finding
- Unpinned npx installation executes mutable third-party supply-chain code<![CDATA[ ## Vulnerability Details **File Location**: `README_EN.md:145-160` **Additional Location**: `README.md:145-160` **Vulnerability Type**: Unpinned third-party installer execution **Risk Level**: Medium ### Vulnerable Code Snippet ```bash # Recommended npx skills add ChenChen913/healthfit # Install specifically for Claude Code npx skills add ChenChen913/healthfit -a claude-code # Global install npx skills add ChenChen913/healthfit -g ``` The accompanying documentation states: ```text Requires Node.js v18+. npx always fetches the latest version automatically. ``` ### Technical Analysis The recommended installation mechanism invokes an npm-distributed command without pinning the command package to a reviewed version or verifying its integrity. The code resolved and executed by `npx` can therefore change after this Skill has been audited. No lockfile, exact installer version, package integrity hash, signed release artifact, or reproducible verification procedure is supplied. This creates a supply-chain trust boundary in which control of the resolved npm package or its dependencies can translate into local code execution. This finding concerns the documented installation path. The audited Skill scripts themselves do not contain remote-fetch or payload-execution logic. ### Attack Path 1. An attacker compromises the npm package resolved by the `npx skills` invocation, one of its dependencies, or the relevant publishing account. 2. The attacker publishes a malicious version while retaining the expected package name. 3. A user follows the recommended command after the malicious version becomes current. 4. `npx` retrieves the mutable package from the external registry. 5. The package's CLI or lifecycle code executes under the invoking user's account. 6. The malicious package can access files and resources available to that account. ### Impact Assessment Successful exploitation can provide arbitrary code execution with the privileges of the user ru ...[truncated 489 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the installer to an exact, reviewed version rather than automatically resolving the latest release. 2. Document the exact npm package that `npx` executes, including its publisher and expected registry. 3. Publish and verify cryptographic integrity hashes or signatures for release artifacts. 4. Prefer a signed release archive or another reproducible installation procedure whose content matches the audited source. 5. Add a lockfile and dependency-review process for any installer maintained by the project. 6. Remove language encouraging automatic retrieval of the latest version. 7. Warn users that installation executes third-party code with their account privileges. 8. For higher-assurance environments, recommend downloading, inspecting, verifying, and then installing a specific tagged release. ]]>
