T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:193
- Finding
- Unpinned Global Dependency Installation Creates a Supply-Chain Execution Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:193-197` **Vulnerability Type**: Unpinned third-party dependencies installed globally **Risk Level**: Medium ### Vulnerable Code ```markdown ### First use (install dependencies) The skill scripts depend on a TypeScript runtime and database drivers, which must be installed globally: ```bash npm install -g tsx mysql2 pg better-sqlite3 ``` ``` ### Technical Analysis The installation command retrieves the latest available versions of four packages without a lockfile, explicit version constraints, integrity hashes, or source verification. An npm installation may execute package lifecycle scripts. Because the packages are installed globally, those scripts run with the privileges of the user invoking npm and can modify the global Node.js environment. The audit found no evidence that the currently named packages are malicious. The vulnerability is the unsafe, mutable supply-chain installation process: a compromised package release, maintainer account, transitive dependency, or registry response could introduce arbitrary code after the Skill has been reviewed. ### Attack Path 1. An attacker compromises a listed package, one of its transitive dependencies, or an associated registry publishing account. 2. The attacker publishes a malicious version containing an installation lifecycle script or malicious runtime code. 3. A user follows the Skill instructions and executes the unpinned global installation command. 4. npm retrieves the compromised version because no known-good version or integrity value is specified. 5. Malicious code executes during installation or when one of the scripts loads the affected package. ### Impact Assessment Successful exploitation can execute code with the privileges of the user running npm. Depending on those privileges, an attacker could access user files and environment variables, alter globally installed Node.js components, steal database credentials later supplied ...[truncated 129 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Define reviewed dependencies with exact versions in a local `package.json`. 2. Commit a lockfile and use a reproducible installation command such as `npm ci`. 3. Avoid global installation; execute dependencies from a project-scoped environment. 4. Review dependency provenance and lifecycle scripts before approving upgrades. 5. Use registry integrity verification and automated dependency scanning. 6. Run installation and database utilities under a dedicated, minimally privileged account. 7. Consider disabling lifecycle scripts during installation where the selected packages do not require them. ]]>
