T08 · Insecure Dependencies
Warning
- Location
- references/installation.md:9
- Finding
- Mutable npm Package Version Is Downloaded and Executed During Installation## Vulnerability Details **File Location**: `references/installation.md`, lines 9–14; mirrored in `references/installation.zh-CN.md`, lines 9–13 **Vulnerability Type**: Unsafe execution of an unpinned third-party package **Risk Level**: Medium **Vulnerable Code:** ```markdown Use npm's `latest` release only after the npm channel is marked available in the [stable manifest](https://downloads.onimi.ai/skills/manifest.json). Node.js 20 or later is required. ```sh npx --registry=https://registry.npmjs.org onimi-pages-creator@latest install --agent codex ``` ``` ### Technical Analysis The installation command instructs users to download and execute the mutable npm `latest` release through `npx`. Although the documentation requires the npm channel to be marked available in a stable manifest, the command does not pin the package to the exact version identified by that manifest or independently verify package integrity or provenance. As a result, the code reviewed in this repository is not necessarily the code executed by this command. The effective installer can change whenever the npm `latest` tag is updated. A compromise of the npm publisher account, package, release process, or mutable distribution tag could therefore substitute attacker-controlled installer code. ### Attack Path 1. An attacker compromises the npm package publisher account, publication pipeline, or another mechanism capable of changing the package associated with `onimi-pages-creator@latest`. 2. The attacker publishes a malicious release and assigns it to the `latest` tag. 3. The stable manifest may continue to indicate that npm is an available channel because the installation command does not bind execution to the manifest's exact version or archive digest. 4. A user follows the documented command. 5. `npx` downloads and executes the malicious package before the user can inspect its installer behavior. 6. The malicious installer operates with the per ...[truncated 723 chars]
- Remediation
- ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed package version, such as `onimi-pages-creator@0.1.0`. 2. Ensure the exact npm version is obtained from the authenticated stable manifest rather than relying only on a channel-availability flag. 3. Publish and verify an integrity value for the npm package or tarball before execution. Where supported, require npm provenance attestations and validate the expected publisher and source repository. 4. Prefer the documented immutable archive workflow, which verifies both byte length and SHA-256, when equivalent integrity verification cannot be applied to `npx`. 5. Update both English and Chinese installation guides simultaneously so neither continues to recommend mutable package execution. 6. Consider separating package download from execution, allowing users or automation to validate the resolved version and integrity before invoking the installer.
