T08 · Insecure Dependencies
Warning
- Location
- README.md:31
- Finding
- Unpinned Third-Party Package Execution Through npx## Vulnerability Details **File Location**: `README.md`, line 31 **Vulnerability Type**: Unpinned executable dependency **Risk Level**: Medium **Vulnerable code:** ```bash npx @skill-hub/cli install critical-writing --agent claude ``` ### Technical Analysis The documented installation command invokes `@skill-hub/cli` through `npx` without specifying an exact package version or verifying package integrity. When a user runs this command, npm resolves the package version from the configured registry at execution time and may download and execute a release that did not exist when this project was audited. This creates a supply-chain trust boundary outside the reviewed repository. If the package publisher account, package distribution process, or configured npm registry is compromised, an attacker could publish or substitute a malicious package version. The malicious package could execute through npm lifecycle scripts or the CLI entry point under the privileges of the user running the command. The command appears only in installation documentation and is not automatically executed by the Skill. Exploitation therefore requires a user or automated installation process to follow the documented command. ### Attack Path 1. An attacker compromises the `@skill-hub/cli` publishing account, its build pipeline, or a package registry used by the victim. 2. The attacker publishes or serves a malicious version under the expected package name. 3. A user follows the installation instructions and executes: ```bash npx @skill-hub/cli install critical-writing --agent claude ``` 4. `npx` resolves and downloads the attacker-controlled release because no exact version or integrity value is specified. 5. npm lifecycle code or the malicious CLI entry point executes with the invoking user's permissions. 6. The payload can access or modify resources available to that user, including project files, user configuration, environment vari ...[truncated 881 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the CLI to a reviewed, immutable version: ```bash npx --yes @skill-hub/cli@X.Y.Z install critical-writing --agent claude ``` 2. Verify the selected release before documenting it: - Review the published package contents. - Confirm the package publisher and registry source. - Validate npm provenance or release signatures where available. - Record and verify the package archive integrity hash. 3. Use a trusted, explicitly configured registry and avoid registry settings that permit dependency substitution. 4. Prefer a reproducible installation process backed by a lockfile and integrity metadata when the CLI is used in CI or automated environments. 5. Advise users not to run installation commands as root or an administrator. Use a restricted account with access limited to the intended Skill installation directory. 6. Consider providing a reviewed local installation method as the recommended option, while clearly identifying `npx` installation as execution of third-party code.
