T08 · Insecure Dependencies
- Location
SKILL.md:5- Finding
Unpinned npm Dependency Allows Supply-Chain Code Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:5
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumVulnerable Code Snippet:
yaml metadata: {"openclaw":{"emoji":"📝","requires":{"bins":["node"]},"install":[{"id":"npm","kind":"npm","packages":["tesseract.js"],"label":"Install tesseract.js"}]}}Related dependency configuration in
package.json:13-15:json "dependencies": { "tesseract.js": "^7.0.0" },The current lockfile records an installation script in
package-lock.json:68-81:json "node_modules/tesseract.js": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/tesseract.js/-/tesseract.js-7.0.0.tgz", "integrity": "sha512-exPBkd+z+wM1BuMkx/Bjv43OeLBxhL5kKWsz/9JY+DXcXdiBjiAch0V49QR3oAJqCaL5qURE0vx9Eo+G5YE7mA==", "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { "bmp-js": "^0.1.0", "idb-keyval": "^6.2.0", "is-url": "^1.2.4", "node-fetch": "^2.6.9", "opencollective-postinstall": "^2.0.3", "regenerator-runtime": "^0.13.3", "tesseract.js-core": "^7.0.0", "wasm-feature-detect": "^1.8.0", "zlibjs": "^0.3.1" } },Technical Analysis
The Skill installation metadata requests
tesseract.jswithout an exact version or integrity constraint. A Skill manager processing this metadata may resolve the latest package release rather than the version reviewed in this repository. Separately, the caret range inpackage.jsonpermits compatible future releases.npm packages can execute lifecycle scripts during installation. The reviewed lockfile explicitly marks the currently resolved
tesseract.jspackage as having an installation script. Therefore, if a future permitted release or its transitive dependency is compromised, installation can execute attacker-controlled code under the identity of the user or Agent installing the Skill.The rep ...[truncated 1620 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin the Skill metadata dependency to the exact reviewed release:
yaml metadata: {"openclaw":{"emoji":"📝","requires":{"bins":["node"]},"install":[{"id":"npm","kind":"npm","packages":["tesseract.js@7.0.0"],"label":"Install tesseract.js"}]}} -
Replace the caret range in
package.jsonwith an exact version:json "dependencies": { "tesseract.js": "7.0.0" } -
Require deterministic installation through
npm ciand the committedpackage-lock.json, ensuring that package versions and integrity hashes are enforced. -
Review lifecycle scripts before dependency updates. Where operationally compatible, install with lifecycle scripts disabled and explicitly perform only the required trusted setup.
-
Use automated dependency monitoring and require security review for lockfile changes, newly introduced transitive dependencies, and packages that execute installation scripts.
-
Perform dependency installation in a sandbox with minimal filesystem access, no unnecessary credentials, and no elevated operating-system privileges.
-
