T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:4
- Finding
- Unpinned Third-Party npm Package Installed Globally<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 4 and 12–15 **Vulnerability Type**: Unpinned, globally installed third-party dependency **Risk Level**: Medium ### Vulnerable Code ```yaml metadata: {"openclaw":{"emoji":"🔴","homepage":"https://reddgrow.ai","requires":{"bins":["reddgrow"],"env":["REDDGROW_API_KEY"]},"install":[{"id":"npm","kind":"node","package":"@reddgrow/cli","bins":["reddgrow"],"label":"Install via npm"}],"primaryEnv":"REDDGROW_API_KEY"}} ``` ```bash # Install npm install -g @reddgrow/cli ``` ### Technical Analysis The Skill instructs users to install and execute the external `@reddgrow/cli` npm package globally without pinning an exact version or integrity hash. The implementation of that package is not included in the audited project, so its installation scripts, runtime behavior, credential handling, and network operations cannot be verified from the available source. An npm package can execute lifecycle scripts during installation. Because the installation is global, such scripts and the installed CLI execute with the privileges of the user performing the installation. Omitting an exact version also means the effective code can change independently of this reviewed Skill whenever a new package version is published. This creates a supply-chain exposure: compromise of the package, its maintainer account, its publishing credentials, or a future release could introduce arbitrary code without requiring a modification to `SKILL.md`. ### Attack Path 1. An attacker compromises the `@reddgrow/cli` package, a maintainer account, or the package publishing process. 2. The attacker publishes a modified release containing a malicious npm lifecycle script or malicious CLI runtime code. 3. A user follows the documented command `npm install -g @reddgrow/cli`. 4. npm resolves the current package release because no exact version or integrity constraint is specified. 5. The malicious code executes during installation or when th ...[truncated 1014 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin `@reddgrow/cli` to an exact, security-reviewed version rather than resolving the latest release: ```bash npm install --global @reddgrow/cli@0.1.6 ``` 2. Use a lockfile or another reproducible dependency mechanism with registry integrity hashes. Verify the package tarball checksum before installation where supported. 3. Prefer a project-local installation over a global installation: ```bash npm install --save-exact @reddgrow/cli@0.1.6 ``` Invoke the binary through a controlled local path instead of relying on a mutable global executable. 4. Review the package source, transitive dependencies, npm lifecycle scripts, network destinations, and API-key storage behavior before approving it for agent use. 5. Disable lifecycle scripts during installation when the package does not require them: ```bash npm install --save-exact --ignore-scripts @reddgrow/cli@0.1.6 ``` 6. Run the CLI under a dedicated, least-privileged account or sandbox with access limited to the required API key and network endpoint. 7. Restrict `REDDGROW_API_URL` to an approved HTTPS endpoint through policy rather than allowing untrusted workflows to redirect credential-bearing requests. 8. Monitor the dependency for ownership changes, unexpected releases, compromised transitive dependencies, and security advisories before updating the pinned version. ]]>
