T08 · Insecure Dependencies
- Location
package-lock.json:88- Finding
Mutable Dependency Installation Executes Lifecycle Code from a Third-Party Registry
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:5,package.json:20-22,package-lock.json:16-17,package-lock.json:88-91,PUBLISH.md:27-30
Vulnerability Type: Supply-chain exposure through unpinned dependencies, a non-official package registry, and install-time script execution
Risk Level: MediumVulnerable Code Snippets
SKILL.md:5:yaml metadata: {"openclaw":{"emoji":"📝","requires":{"bins":["node"]},"install":[{"id":"npm","kind":"npm","packages":["tesseract.js"],"label":"Install tesseract.js"}]}}The installer metadata requests
tesseract.jswithout specifying an exact version.package.json:20-22:json "dependencies": { "tesseract.js": "^5.1.1" },package-lock.json:16-17:json "resolved": "https://registry.npmmirror.com/bmp-js/-/bmp-js-0.1.0.tgz", "integrity": "sha512-vHdS19CnY3hwiNdkaqk93DvjVLfbEcI8mys4UjuWrlX1haDmroo8o4xCzh4wD6DGV6HxRCyauwhHRqMTfERtjw==",package-lock.json:88-91:json "node_modules/tesseract.js": { "version": "5.1.1", "resolved": "https://registry.npmmirror.com/tesseract.js/-/tesseract.js-5.1.1.tgz", "integrity": "sha512-lzVl/Ar3P3zhpUT31NjqeCo1f+D5+YfpZ5J62eo2S14QNVOmHBTtbchHm/YAbOOOzCegFnKf4B3Qih9LuldcYQ==", "hasInstallScript": true,Technical Analysis
The Skill has three interacting supply-chain weaknesses:
SKILL.mdinstallstesseract.jswithout a version constraint.package.jsonuses the mutable range^5.1.1, allowing later compatible releases to be selected.- The supplied lockfile resolves packages through
registry.npmmirror.com, a third-party registry mirror, and records thattesseract.jshas an installation lifecycle script.
Publication guidance also recommends removing the lockfile so users receive newer versions. Removing the lockfile eliminates deterministic transitive dependency resolution and causes package contents to depend on registry state at install ...[truncated 2348 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin
tesseract.jsto an exact reviewed version in bothSKILL.mdandpackage.json; do not use an unversioned install request or a caret range. - Retain
package-lock.jsonin published artifacts and usenpm ciso installation fails rather than silently changing the dependency graph. - Regenerate the lockfile using the official npm registry,
https://registry.npmjs.org, after reviewing the selected package versions. - Verify package provenance, integrity hashes, maintainers, lifecycle scripts, and transitive dependencies before release.
- Do not recommend lockfile removal in publication documentation. Document deterministic installation as a security requirement.
- Keep dependency versions consistent across
SKILL.md,package.json, the lockfile, and publication documentation. - Where operationally feasible, install with lifecycle scripts disabled using
npm ci --ignore-scripts. If Tesseract.js requires an installation script, review that exact script and explicitly permit only the required installation behavior. - Run dependency installation in a restricted environment with minimal filesystem permissions, no unnecessary secrets, and limited outbound network access.
- Add automated dependency scanning and lockfile validation to the release process.
- Pin
