T08 · Insecure Dependencies
Warning
- Location
- Skill.md:17
- Finding
- Unpinned Global Installation of a Third-Party Package<![CDATA[ ## Vulnerability Details **File Location**: `Skill.md`, line 17 **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g @prismer/sdk ``` ### Technical Analysis The Skill instructs the user or Agent to install the latest available version of `@prismer/sdk` globally. No exact version, package integrity hash, provenance verification, or trusted-release validation is specified. Because npm resolves the package version at installation time, the code that executes can differ from the version originally reviewed. A compromised maintainer account, malicious package release, or registry compromise could cause arbitrary package code or npm lifecycle scripts to run during installation. The global installation scope also exceeds the minimum scope needed for a single Skill invocation. It makes the package available throughout the user environment and may modify globally managed npm directories or executable paths. The reviewed project does not contain the package source, so the external dependency's implementation could not be audited as part of this assessment. ### Attack Path 1. An attacker compromises the npm package, a maintainer account, or the relevant package publication process. 2. The attacker publishes a malicious version of `@prismer/sdk`. 3. A user or Agent follows the Skill instructions and runs `npm install -g @prismer/sdk`. 4. npm resolves and installs the malicious version because no reviewed version is pinned. 5. Malicious installation scripts or package code execute with the privileges of the user running npm. 6. The installed global command remains available for later use and can access data available to that user. ### Impact Assessment Successful exploitation could allow arbitrary code execution under the installing user's account. Depending on that account's privileges and environment, an attacker could access user files, environment variables, API cr ...[truncated 393 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an exact version that has been reviewed: ```bash npm install --global @prismer/sdk@X.Y.Z ``` 2. Publish the expected package version, integrity hash, repository, and npm provenance information. 3. Verify the resolved package and integrity metadata before installation. 4. Prefer a project-local installation over a global installation: ```bash npm install --save-exact @prismer/sdk@X.Y.Z ``` 5. Run the dependency with the minimum required operating-system permissions and never install it as root unless strictly necessary. 6. Disable npm lifecycle scripts when they are not required and compatible with the package: ```bash npm install --ignore-scripts --save-exact @prismer/sdk@X.Y.Z ``` 7. Establish a dependency update process that reviews and tests each new version before changing the pinned release. ]]>
