T08 · Insecure Dependencies
Warning
- Location
- INSTALLATION.md:151
- Finding
- Unpinned Global npm Package Installation Creates Supply-Chain Risk## Vulnerability Details **File Location**: `INSTALLATION.md:151-152` **Vulnerability Type**: Unpinned, globally installed third-party development dependency **Risk Level**: Medium **Complete Code Snippet**: ```bash # Install skills-ref (if not already installed) npm install -g @agentskills/skills-ref ``` ### Technical Analysis The optional validation instructions install `@agentskills/skills-ref` globally without pinning an exact reviewed version or verifying package integrity. Consequently, the command resolves to whichever release is current in the configured npm registry at installation time. npm packages can contain lifecycle scripts that execute during installation. A mutable, globally installed dependency therefore introduces a supply-chain execution path that is not represented by the audited project contents. Global installation also exposes the resulting executable across the user's environment rather than limiting it to an isolated project context. This package is only used for optional Skill-structure validation and is not necessary for the declared flight-price comparison functionality. The installation therefore exceeds the minimum dependency footprint required to operate the Skill. ### Attack Path 1. An attacker compromises the upstream npm package, a maintainer account, or the package publication process. 2. The attacker publishes a malicious release under the legitimate package name. 3. A user follows `INSTALLATION.md` and runs the unversioned global installation command. 4. npm resolves and downloads the malicious current release. 5. Malicious lifecycle scripts may execute during installation, or attacker-controlled code may execute when the user subsequently invokes `skills-ref`. 6. The payload runs with the privileges of the account executing npm and may modify files accessible to that account. ### Impact Assessment Successful exploitation could execute arbitrary code with the installing user ...[truncated 522 chars]
- Remediation
- ## Remediation Suggestions 1. Remove the installation step if manual validation is sufficient. 2. If the validator is retained, pin a specifically reviewed version rather than resolving the latest release: ```bash npm install --save-dev --ignore-scripts @agentskills/skills-ref@<reviewed-exact-version> ``` 3. Prefer a project-local development dependency over a global installation. 4. Commit and verify an npm lockfile containing integrity hashes. 5. Run validation in an isolated container or restricted CI environment with no production credentials. 6. Disable lifecycle scripts where compatible and separately review any required scripts before permitting them. 7. Document the package source, reviewed version, expected checksum, and update-review process.
