T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:5
- Finding
- Unpinned Global npm Dependency Creates Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md:5` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium **Complete Code Snippet**: ```yaml metadata: { "openclaw": { "always": false, "primaryEnv": "MINARA_API_KEY", "requires": { "bins": ["minara"], "config": ["skills.entries.minara.enabled"] }, "emoji": "👩", "homepage": "https://minara.ai", "install": [{ "id": "node", "kind": "node", "package": "minara@latest", "global": true, "bins": ["minara"], "label": "Install Minara CLI (npm)" }] } } ``` ### Technical Analysis The Skill installs `minara@latest` globally. The mutable `latest` tag does not identify an immutable, previously audited package version. Consequently, the code installed in the future may differ from the code that was present when this Skill was reviewed. npm packages can execute lifecycle scripts during installation and arbitrary code when invoked. Global installation also makes the resulting executable broadly available in the user's environment. This is particularly sensitive because the CLI handles wallet operations, authenticates through `MINARA_API_KEY` or `~/.minara/credentials.json`, and can initiate fund-moving transactions. The audit did not establish that the current `minara` package is malicious. The vulnerability is the unsafe dependency policy and the resulting exposure to a future compromised, hijacked, or defective release. ### Attack Path 1. An attacker compromises the npm publisher account, package release process, or another component of the package's distribution chain. 2. The attacker publishes a malicious version under the `minara` package and assigns it to the `latest` tag. 3. A user installs or reinstalls the Skill dependency. 4. The installer resolves `minara@latest` to the attacker-controlled release and installs it globally. 5. Malicious lifecycle or runtime code executes with the installing user's privileges. 6. The compromised CLI ...[truncated 1004 chars]
- Remediation
- ## Remediation Suggestions 1. Replace `minara@latest` with an exact, reviewed version, such as `minara@2.4.12` where that version has been independently verified. 2. Enforce package integrity using a lockfile, verified registry integrity metadata, or a pinned artifact digest. 3. Establish a controlled update process that reviews source changes and package lifecycle scripts before changing the pinned version. 4. Avoid global installation where practical. Install the CLI in a dedicated, least-privileged environment with constrained filesystem and environment-variable access. 5. Disable npm lifecycle scripts during installation unless they are documented, audited, and required. 6. Verify package provenance and publisher identity through trusted registry provenance or signed releases. 7. Ensure transaction confirmation presents authoritative transaction details through a trusted channel independent of mutable CLI output. 8. Restrict credential-file permissions and expose `MINARA_API_KEY` only to the specific process that requires it.
