T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:20
- Finding
- Unverified model retrieval through a third-party mirror## Vulnerability Details **File Location**: `SKILL.md`, line 20 **Vulnerability Type**: Supply-chain exposure through an unverified external model source **Risk Level**: Medium ### Vulnerable Documentation Snippet The following is an English translation of the complete relevant instruction, preserving all technical identifiers: ```text The semantic steps initially download Xenova/bge-small-zh-v1.5 and require access to https://hf-mirror.com. The standard huggingface.co endpoint is unavailable in this environment. scripts/cluster-99-run-pipeline.mjs automatically injects HF_ENDPOINT when it is not already set. ``` ### Technical Analysis The Skill directs the pipeline to retrieve the `Xenova/bge-small-zh-v1.5` model through `https://hf-mirror.com`, a mirror rather than the standard upstream service. It also states that `scripts/cluster-99-run-pipeline.mjs` automatically injects the `HF_ENDPOINT` configuration. No requirement is specified to pin an immutable model revision or verify the downloaded files using cryptographic hashes or signatures. Consequently, the effective model artifacts and associated metadata can change after the Skill has been reviewed. Trust is placed in the current content delivered by the mirror and the integrity of the network retrieval process. This is a supply-chain risk rather than proof that the current mirror content is malicious. Exploitation requires compromise of the mirror, its distribution infrastructure, or the artifact publication process. Depending on the model loader and artifact format, substituted content could manipulate clustering results or attempt to exploit a vulnerability in the component parsing the downloaded files. ### Attack Path 1. An attacker compromises the mirror, its artifact storage, or the publication path for `Xenova/bge-small-zh-v1.5`. 2. The attacker replaces a model or associated file while retaining identifiers expected by the pipeline. 3. A user invokes `pn ...[truncated 1081 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `Xenova/bge-small-zh-v1.5` to an immutable, reviewed revision rather than relying only on a mutable model name. 2. Record cryptographic hashes for every required model artifact and verify them before loading. 3. Prefer an organization-approved registry or an internally controlled artifact repository. 4. Do not silently inject an alternate model endpoint. Require explicit configuration or clearly display the selected source before downloading. 5. Cache verified artifacts in a read-only location and prevent automatic replacement without review. 6. Run model retrieval and parsing with restricted filesystem and network permissions. 7. Maintain an inventory of downloaded model files, versions, hashes, and provenance so changes can be audited.
