T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:37
- Finding
- Unpinned npm dependencies are installed directly into the OpenClaw installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:37-46`; repeated in `references/troubleshooting.md:6-10` and `references/troubleshooting.md:19-26` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```bash ### 3. Install dependencies # Step 1: install main package in openclaw root cd /usr/local/lib/node_modules/openclaw npm install @lancedb/lancedb # Step 2: install platform-specific native binding in plugin dir cd /usr/local/lib/node_modules/openclaw/extensions/memory-lancedb npm install @lancedb/lancedb-darwin-arm64 # Apple Silicon (arm64) # npm install @lancedb/lancedb-darwin-x64 # Intel Mac # npm install @lancedb/lancedb-linux-x64-gnu # Linux x64 ``` The troubleshooting guide repeats the unpinned installation: ```bash cd /usr/local/lib/node_modules/openclaw npm install @lancedb/lancedb ``` ```bash cd /usr/local/lib/node_modules/openclaw/extensions/memory-lancedb npm install @lancedb/lancedb-darwin-arm64 python3 ~/.openclaw/workspace/skills/memory-lancedb-setup/references/patch_native.py openclaw gateway restart ``` ### Technical Analysis The installation commands do not specify reviewed package versions or integrity hashes. Consequently, npm resolves the packages to whatever versions are current at execution time. The commands also install them directly into a global OpenClaw application tree and an active extension directory. npm packages can contain lifecycle scripts that execute during installation. If the package, a transitive dependency, or the relevant registry account is compromised, installation can execute attacker-controlled code with the permissions of the user running npm. Even without malicious activity, an unexpected release may introduce incompatible or vulnerable behavior into OpenClaw. The use of official-looking package names reduces dependency-confusion risk but does not protect against registry-account compromise, malicious updates, or unreviewed transitive depen ...[truncated 1133 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct package to an exact reviewed version, for example: ```bash npm install --save-exact @lancedb/lancedb@<reviewed-version> npm install --save-exact @lancedb/lancedb-darwin-arm64@<reviewed-version> ``` 2. Commit and enforce a lockfile so that transitive dependency versions and integrity values remain reproducible. 3. Prefer `npm ci` against a reviewed lockfile rather than resolving current versions with `npm install`. 4. Review package provenance, publisher history, release signatures, and dependency changes before updating. 5. Disable lifecycle scripts with `--ignore-scripts` when the packages can function without them. If scripts are required, review them before installation. 6. Run installation with the least-privileged account capable of maintaining OpenClaw; do not use administrative elevation unless strictly necessary. 7. Document a tested compatibility matrix of OpenClaw, LanceDB, and architecture-specific binding versions. 8. Apply the same version pins to every command repeated in `references/troubleshooting.md`. ]]>
