T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned Third-Party Dependency and Unverified Runtime Model Retrieval
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1
Related Locations:README.md:4-8,README.md:138-144,SKILL.md:185-190,SKILL.md:388-390
Vulnerability Type: Third-party supply-chain exposure
Risk Level: MediumComplete Vulnerable Code Snippet:
text rapidocr-onnxruntime>=1.2.3The documented installation and runtime behavior is:
bash pip install rapidocr-onnxruntimetext The first run downloads a model of approximately 100 MB.Technical Analysis
The dependency specification provides only a minimum version and does not constrain installation to a specific audited release. A normal package installation can therefore resolve to any later compatible version available from the configured Python package index. The project also provides no lock file or package hashes with which to verify the resolved distribution.
In addition, project documentation states that the dependency downloads OCR model data during first use. The repository does not identify or pin the model version, source URL, or cryptographic digest. Consequently, the executable Python dependency and the model artifact used at runtime are not reproducible or independently integrity-verified by this project.
This behavior also conflicts with the declaration in
claw.jsonthat the skill performs no network access. Although no direct network client is implemented inrapidocr_minimal.py, network activity may occur transitively throughrapidocr-onnxruntime.Attack Path
- An attacker compromises an eligible future release of
rapidocr-onnxruntime, its distribution account, package-index delivery path, or the upstream model distribution channel. - A user follows the documented command or installs
requirements.txt. - Because the requirement accepts every version at or above
1.2.3, the package manager can select the compromised release without requiring a repository change.
...[truncated 1090 chars]
- An attacker compromises an eligible future release of
- Remediation
View remediation
Remediation Suggestions
- Pin
rapidocr-onnxruntimeto an exact release that has been reviewed, for example usingrapidocr-onnxruntime==<audited-version>. - Generate a reproducible lock file and require cryptographic hashes during installation, such as through a hash-locked requirements file and
pip install --require-hashes. - Record the authoritative source, exact version, and SHA-256 digest of every OCR model.
- Verify each model's digest before loading it and reject missing or mismatched artifacts.
- Where licensing and package-size constraints permit, distribute the verified model with the skill rather than downloading it at runtime.
- If runtime retrieval remains necessary, restrict downloads to an authenticated HTTPS origin, prevent redirects to untrusted hosts, use a trusted local cache, and fail closed on verification errors.
- Update
claw.jsonand the documentation so the network behavior is represented accurately. Do not claim fully offline operation until all required artifacts have already been installed and verified. - Add automated dependency and artifact provenance checks to the release process.
- Pin
