T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:25
- Finding
- Unpinned Global npm Package Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 25-26 **Vulnerability Type**: Unpinned third-party dependencies installed globally **Risk Level**: Medium **Vulnerable Code**: ```bash npm install -g @openai/codex npm install -g @anthropic-ai/claude-code ``` ### Technical Analysis The installation instructions use npm package names without exact version constraints, lockfile enforcement, or integrity verification. Consequently, npm resolves whichever package versions are current when a user runs these commands. The packages are also installed globally, increasing their reach beyond the project directory. npm installation can invoke package lifecycle behavior with the permissions of the user running npm. If a package publication account, registry, release pipeline, or transitive dependency is compromised, a malicious release could execute code during installation. No evidence indicates that the named packages are currently malicious or typo-squatted; the risk arises from mutable, unverified dependency resolution and global installation. ### Attack Path 1. An attacker compromises a package publication account, its release pipeline, the configured npm registry, or a dependency included in a newly published release. 2. The attacker publishes a malicious version under a package name referenced by the documented commands. 3. A user follows the installation instructions without specifying a reviewed version. 4. npm resolves and downloads the malicious release. 5. Malicious package lifecycle code executes with the invoking user's permissions, or the installed command later executes attacker-controlled logic. 6. Because installation is global, the compromised executable can remain available through the user's command search path and affect activity outside this project. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the user running npm. This may permit access ...[truncated 483 chars]
- Remediation
- ## Remediation Suggestions - Pin each dependency to an exact, reviewed version rather than resolving the latest release. - Prefer project-local installations recorded in a lockfile over global installations. - Use reproducible installation mechanisms that enforce lockfile contents and package integrity metadata. - Verify package provenance, publisher identity, signatures or attestations, and registry configuration before installation. - Review transitive dependencies and use automated dependency vulnerability monitoring. - Where compatible, disable npm lifecycle scripts during installation and explicitly run only reviewed setup steps. - Run installation under an unprivileged account and avoid `sudo` or administrative shells. - Document trusted registry requirements and periodically review pinned versions before upgrading.
