T08 · Insecure Dependencies
Error
- Location
- SKILL.md:1
- Finding
- Unpinned Global Installation of an Unaudited npm Executable<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 1–7 **Vulnerability Type**: Supply-chain risk through an unpinned third-party dependency **Risk Level**: High ### Vulnerable Code ```yaml --- name: pubmed2blog description: Transform PubMed papers into SEO-optimized healthcare blog articles bins: - pubmed2blog install: npm install -g pubmed2blog requires: [] --- ``` The installation instruction also appears in `SKILL.md`, lines 66–73: ```markdown ## Setup ```bash npm install -g pubmed2blog pubmed2blog init ``` Supports Anthropic, OpenAI, and Z.AI providers. ``` ### Technical Analysis The skill instructs users or agents to install the latest available version of `pubmed2blog` globally from the npm registry. It does not specify an exact version, package integrity hash, lockfile, verified publisher, or trusted source repository. As a result, the code executed by this skill can change without any corresponding modification to the audited `SKILL.md`. npm installation may also execute package lifecycle scripts, such as `preinstall`, `install`, or `postinstall`, with the privileges of the user running npm. Global installation expands the package's reach by placing its executable in a shared command path. The project contains no source code for the dependency, so the behavior of the installed CLI and its installation scripts could not be independently audited. This does not establish that the current package is malicious, but it creates an unsafe dependency and supply-chain boundary. ### Attack Path 1. An attacker compromises the npm package, its publisher account, or a future package release. 2. The attacker publishes a modified version containing malicious lifecycle or runtime code. 3. An agent or user follows the skill instruction and executes `npm install -g pubmed2blog`. 4. npm retrieves the current mutable release rather than a previously audited exact version. 5. Malicious lifecycle code can execute during installation, or mali ...[truncated 969 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a reviewed exact version, for example: ```bash npm install --global pubmed2blog@X.Y.Z ``` 2. Document the expected npm registry, package publisher, and canonical source repository. 3. Verify package provenance and integrity before installation, using registry provenance data and a known cryptographic integrity value where available. 4. Prefer a project-local dependency over global installation: ```bash npm install --save-exact pubmed2blog@X.Y.Z ``` Invoke it through a verified local path or `npm exec` with controls that prevent retrieval of an unexpected version. 5. Commit an appropriate lockfile when using a local dependency. 6. Audit the package source and all transitive dependencies for the pinned release. 7. Review lifecycle scripts before installation. Disable scripts with `--ignore-scripts` if the package does not require them. 8. Run the CLI under a dedicated least-privilege account or isolated environment with access only to required files. 9. Store AI-provider credentials in a restricted secret store and provide only the specific credentials required for each invocation. 10. Establish an explicit update process in which new dependency versions are reviewed and tested before changing the pin. ]]>
