T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:30
- Finding
- Unpinned Third-Party Python Dependencies<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:30` - `SKILL.md:37-39` - `SKILL_zh.md:30` - `SKILL_zh.md:37-39` **Vulnerability Type**: Unpinned third-party dependencies and mutable supply-chain inputs **Risk Level**: Medium ### Vulnerable Code From `SKILL.md`: ```markdown pip install anychunker ``` ```markdown | Extra need | Install command | |---|---| | `AnyTextChunker.from_tokenizer("...")` — HuggingFace tokenizer for token-accurate splits | `pip install transformers` (already a hard dep, but the tokenizer model itself is downloaded on first use) | | `AnySemanticsChunker` — needs an embedding function | `pip install sentence-transformers` (or any embedding backend of your choice) | | Chinese word-count length via jieba | `pip install jieba` | ``` Equivalent unpinned installation instructions appear in `SKILL_zh.md`: ```markdown pip install anychunker ``` ```markdown | 用途 | 安装命令 | |---|---| | `AnyTextChunker.from_tokenizer("...")` —— 用 HuggingFace tokenizer 做 token 精确切分 | `pip install transformers`(已是硬依赖,但 tokenizer 模型本身首次使用时下载) | | `AnySemanticsChunker` —— 需要一个 embedding 函数 | `pip install sentence-transformers`(或任何 embedding 后端) | | 用 jieba 做中文分词长度统计 | `pip install jieba` | ``` ### Technical Analysis The Skill instructs users to install `anychunker`, `transformers`, `sentence-transformers`, and `jieba` without exact version constraints or package-integrity hashes. These commands resolve to whichever package versions and transitive dependencies are available at installation time. Consequently, the dependency set executed by a user can differ from the dependency set that was reviewed during this audit. No evidence of typosquatting, an intentionally malicious package, an unsafe package index, or active exploitation was found in the project. The risk arises from mutable supply-chain inputs: a future compromised release, compromised maintainer account, or malicious transitive dependency could introduce executable code after the Skill i ...[truncated 1809 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct dependency to a reviewed version, for example: ```bash python -m pip install "anychunker==REVIEWED_VERSION" python -m pip install "transformers==REVIEWED_VERSION" python -m pip install "sentence-transformers==REVIEWED_VERSION" python -m pip install "jieba==REVIEWED_VERSION" ``` 2. Maintain a lockfile or constraints file covering transitive dependencies. Generate it from a trusted environment and review changes before updating it. 3. Require package integrity verification with hashes where practical: ```bash python -m pip install --require-hashes -r requirements.lock ``` 4. Install dependencies in an isolated virtual environment or container rather than a shared system environment. 5. Use an explicitly configured trusted package index or an internally mirrored and approved repository. 6. Scan locked dependencies for known vulnerabilities and malicious-package indicators as part of release review. 7. Pin remotely downloaded tokenizer or embedding model revisions and verify their provenance or checksums when the relevant libraries support doing so. 8. Apply the same corrected commands to both `SKILL.md` and `SKILL_zh.md` so the security guidance remains consistent across translations. ]]>
