T08 · Insecure Dependencies
- Location
package.json:11- Finding
Unpinned and Unlocked Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
package.json:11-13,SKILL.md:5,PUBLISH.md:25-29
Vulnerability Type: Unreproducible third-party dependency installation
Risk Level: MediumVulnerable Code
package.json:11-13:json "dependencies": { "tesseract.js": "^7.0.0" },SKILL.md:5:yaml metadata: {"openclaw":{"emoji":"📝","requires":{"bins":["node"]},"install":[{"id":"npm","kind":"npm","packages":["tesseract.js"],"label":"Install tesseract.js"}]}}PUBLISH.md:25-29:markdown ### 2. 清理不必要文件 已删除: - ❌ node_modules/ - 用户安装时会自动下载 - ❌ *.traineddata - Tesseract 语言数据(运行时自动下载) - ❌ package-lock.json - 让用户使用最新版本Technical Analysis
The project deliberately omits
package-lock.json, declarestesseract.jsusing the mutable semver range^7.0.0, and provides separate installation metadata that requeststesseract.jswithout a version constraint. Consequently, installations are not reproducible and may resolve dependency contents that were not present during this audit.The caret range permits future compatible releases, while the unversioned skill installation metadata may select the latest available release. Transitive dependencies may also change in the absence of a committed lockfile. Because npm packages can contain lifecycle scripts and executable JavaScript loaded at runtime, a compromised or unexpectedly changed release could execute code with the privileges of the user installing or invoking the skill.
No evidence shows that the currently declared
tesseract.jspackage is malicious. This finding concerns exposure to supply-chain compromise and unreviewed dependency changes rather than confirmed malicious dependency behavior.Attack Path
- An attacker compromises a future version of
tesseract.js, one of its transitive dependencies, or the relevant package-publishing account. - The compromised release remains compatible with
^7.0.0, or i ...[truncated 1110 chars]
- An attacker compromises a future version of
- Remediation
View remediation
Remediation Suggestions
- Pin
tesseract.jsto an exact reviewed version rather than a caret range:json "dependencies": { "tesseract.js": "7.0.0" } - Generate and commit
package-lock.jsonso direct and transitive dependencies resolve reproducibly. - Use
npm cifor installation in automated and production environments. - Change the installation metadata in
SKILL.mdto request the same exact reviewed package version, if the platform supports versioned package declarations. - Remove the publication guidance that recommends deleting the lockfile. Document that dependency updates must be reviewed and accompanied by a regenerated lockfile.
- Review dependency diffs, package provenance, lifecycle scripts, maintainers, and integrity hashes before accepting updates.
- Run dependency installation and OCR processing in a restricted environment with minimal filesystem and network permissions.
- Pin
