T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:4
- Finding
- Unpinned and Unverified Third-Party Executable Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 4 and 12-17 **Vulnerability Type**: Unpinned and unverified third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"clawdbot":{"emoji":"🚆","requires":{"bins":["trein"],"env":["NS_API_KEY"]},"primaryEnv":"NS_API_KEY","install":[{"id":"npm","kind":"node","package":"trein","bins":["trein"],"label":"Install trein (npm)"},{"id":"download-mac-arm","kind":"download","url":"https://github.com/joelkuijper/trein/releases/latest/download/trein-darwin-arm64","bins":["trein"],"label":"Download (macOS Apple Silicon)","os":["darwin"]},{"id":"download-mac-x64","kind":"download","url":"https://github.com/joelkuijper/trein/releases/latest/download/trein-darwin-x64","bins":["trein"],"label":"Download (macOS Intel)","os":["darwin"]},{"id":"download-linux","kind":"download","url":"https://github.com/joelkuijper/trein/releases/latest/download/trein-linux-x64","bins":["trein"],"label":"Download (Linux x64)","os":["linux"]}]}} ``` ```markdown ## Install npm (recommended): ```bash npm i -g trein ``` Or download a standalone binary from [GitHub Releases](https://github.com/joelkuijper/trein/releases). ``` ### Technical Analysis The Skill permits installation of the `trein` executable either from npm without an explicit version or from mutable GitHub `releases/latest` URLs. No checksum, cryptographic signature, immutable release identifier, or other integrity-verification mechanism is specified. Consequently, the artifact installed during one execution may differ from the artifact that was previously reviewed. Global npm installation also executes package installation behavior under the installing user's privileges. This creates a supply-chain trust boundary in which compromise of the npm publisher account, GitHub repository, release workflow, or associated distribution infrastructure could cause attacker-controlled code to be installed and executed. ...[truncated 1880 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the npm dependency to a specific audited version rather than installing the mutable latest version: ```bash npm i -g trein@<audited-version> ``` 2. Replace every `releases/latest` URL with an immutable, versioned GitHub release URL. 3. Publish SHA-256 or stronger checksums through a separately protected channel and verify the downloaded binary before execution. 4. Prefer cryptographic release signatures or provenance attestations, and document their verification procedure. 5. Use lockfile-backed, local installation where practical instead of global installation. 6. Review npm lifecycle scripts and release-build provenance before approving each version. 7. Run the CLI with least privilege and expose only the credentials and filesystem paths required for railway queries. 8. Add an update process that requires explicit review and checksum changes whenever the pinned dependency version is upgraded.
