T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:4
- Finding
- Unpinned Third-Party npm Package Installed Globally## Vulnerability Details **File Location**: `SKILL.md`, lines 4-15 **Vulnerability Type**: Unpinned third-party dependency installed with global scope **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"clawdbot":{"requires":{"bins":["gotrain"]},"install":[{"id":"node","kind":"node","package":"gotrain","bins":["gotrain"],"label":"Install gotrain (npm)"}]}} ``` ```markdown ## Installation ```bash npm install -g gotrain ``` ``` ### Technical Analysis The skill declares and recommends installation of the third-party `gotrain` npm package without an exact version or integrity constraint. Consequently, npm resolves whichever package release is current at installation time rather than a release whose contents were reviewed with this skill. npm installation may execute package lifecycle scripts. The global installation flag (`-g`) also places package files and executables in globally configured npm locations. The document provides neither package integrity verification nor evidence that the npm artifact corresponds to the linked source repository. This creates a supply-chain trust boundary outside the audited project. No evidence in the reviewed file establishes that the current package is malicious. The risk arises because a future compromised, replaced, or unexpectedly modified release could be installed and executed without changes to this skill. ### Attack Path 1. An attacker compromises the `gotrain` npm publishing account, package, or an upstream component included in a later release. 2. The attacker publishes a malicious release under the same mutable package name. 3. A user or agent follows the skill metadata or documented command and runs `npm install -g gotrain`. 4. npm resolves the attacker-controlled release because no exact version or integrity value is specified. 5. Malicious lifecycle scripts may execute during installation, or attacker-controlled code may run when the globally installed ...[truncated 754 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to a reviewed exact version instead of resolving the latest release, for example `gotrain@X.Y.Z`. 2. Use a lockfile and verified registry integrity metadata in a reproducible installation workflow. 3. Verify npm package provenance, maintainer identity, signatures or attestations, and correspondence between the published artifact and the referenced source repository. 4. Prefer a project-local installation over `npm install -g` to reduce system-wide effects and constrain executable resolution. 5. Review package lifecycle scripts and install with lifecycle scripts disabled where compatible, such as by using `--ignore-scripts`. 6. Continuously monitor the pinned dependency and its transitive dependencies for compromise and known vulnerabilities; update only after review. 7. Perform installation and execution under a non-privileged account in a sandbox or similarly restricted environment.
