T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:21
- Finding
- Unpinned Global Installation of an Unreviewed Third-Party Package<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:21-23`; `README.md:15-17` **Vulnerability Type**: Unpinned third-party executable and supply-chain exposure **Risk Level**: Medium ### Vulnerable Code `SKILL.md:21-23`: ```bash npm install -g ocft ``` `README.md:15-17`: ```bash npm install -g ocft ``` ### Technical Analysis The project directs users to install the latest available version of the external `ocft` npm package globally. The command does not pin an exact version or enforce a reviewed integrity value. Consequently, the code installed when the command is run can differ from the code that existed when this skill was audited. The audited project contains only documentation and registry metadata. It does not include the npm package's source code, a dependency manifest, a lockfile, or integrity hashes. The behavior of the installed executable and any npm lifecycle scripts therefore cannot be verified from this artifact. Global npm installation increases the affected scope because the package executable becomes available across the user's environment. Package lifecycle scripts can also execute during installation with the privileges of the user running npm. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or a future package release. 2. The attacker publishes a modified `ocft` version containing a malicious lifecycle script or executable. 3. A user follows the documented `npm install -g ocft` instruction. 4. npm retrieves the current mutable package release rather than a previously reviewed version. 5. Malicious lifecycle code may execute during installation, or malicious behavior may execute when the user invokes `ocft`. 6. The payload operates with the privileges of the user who performed the installation. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the installing user's account. Depending on that account's access, the package could read or modify ...[truncated 284 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin the package to an exact, reviewed version, such as `ocft@1.0.0`, rather than installing the latest release. - Publish and verify package integrity hashes or signed provenance before installation. - Include the reviewed implementation, dependency manifest, and lockfile in the auditable project. - Prefer a project-local installation over a global installation to reduce system-wide exposure. - Run installation in a sandbox or constrained environment with minimal filesystem and credential access. - Disable npm lifecycle scripts with `--ignore-scripts` when they are not strictly required. - Establish an update-review process before changing the pinned package version. ]]>
