T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:15
- Finding
- Unpinned Globally Installed npm Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 15–21 and 32–35 **Vulnerability Type**: Unpinned third-party package installed globally **Risk Level**: Medium ### Vulnerable Code ```yaml install: - id: qmap-cli kind: npm label: Install qmap CLI package: "@alphify/qmap-client" bins: - qmap ``` ```bash npm i -g @alphify/qmap-client ``` ### Technical Analysis The Skill installs `@alphify/qmap-client` without specifying an exact version or integrity digest. Consequently, the package content installed by users can change after this Skill has been reviewed. The repository contains only `SKILL.md`; it does not include the npm package implementation needed to verify its installation scripts, runtime behavior, identity handling, or task-execution safeguards. The `-g` option installs the package globally for the current npm environment. npm packages may run lifecycle scripts during installation, and the resulting `qmap` executable runs with the invoking user's privileges. If the package publisher account, npm distribution channel, or a future package release is compromised, attacker-controlled code could execute during installation or when users invoke the CLI. The Skill subsequently directs users to initialize an identity, connect to an external distributed-computing network, and execute claimed tasks. This increases the potential exposure of local identity material and user-accessible resources if the dependency becomes malicious. ### Attack Path 1. An attacker compromises the npm publisher account, package distribution process, or a later release of `@alphify/qmap-client`. 2. The attacker publishes a malicious package version containing a harmful lifecycle script or modified `qmap` executable. 3. A user follows the Skill's unversioned `npm i -g @alphify/qmap-client` instruction. 4. npm resolves the mutable package reference to the attacker-controlled release. 5. Malicious ...[truncated 1310 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to a reviewed exact version, for example: ```bash npm install --global @alphify/qmap-client@0.1.2 ``` The selected version must be independently reviewed rather than inferred solely from the version displayed in the documentation. 2. Publish and verify the expected npm package integrity digest. Where practical, use a lockfile or another reproducible installation mechanism that validates package integrity. 3. Avoid global installation. Prefer a project-local, isolated installation or a locked execution environment with minimal filesystem and credential access. 4. Review and include the executable implementation in the audit scope. In particular, inspect npm lifecycle scripts, external network communication, identity storage, signature handling, and worker task execution. 5. Disable npm lifecycle scripts during installation when they are not required: ```bash npm install --global --ignore-scripts @alphify/qmap-client@0.1.2 ``` This should only be adopted after confirming that the package operates correctly without installation scripts. 6. Execute network-supplied tasks inside a restricted sandbox or container with no sensitive host mounts, minimal network access, resource limits, and an unprivileged user. 7. Document the authoritative package publisher, source repository, expected version, and cryptographic checksum so users can detect unexpected package changes.
