T08 · Insecure Dependencies
- Location
SKILL.md:64- Finding
Unpinned Third-Party Code and Model Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:64-84; additional occurrences inreferences/api-reference.md:462andscripts/quickstart.py:106
Vulnerability Type: Supply-chain exposure through mutable third-party repositories and unverified dependency manifests
Risk Level: HighVulnerable Code
bash git clone https://gitee.com/HuiMengAI/hui-memory.git cd hui-memory pip install -r requirements.txt pip install -r requirements-embedding.txtbash git clone https://gitcode.com/hf_mirrors/BAAI/bge-base-zh-v1.5.git models/bge-base-zh-v1.5 # Alternative model sources documented by the Skill: # git clone https://gitcode.com/hf_mirrors/BAAI/bge-small-zh-v1.5.git models/bge-small-zh-v1.5 # git clone https://gitcode.com/hf_mirrors/BAAI/bge-m3.git models/bge-m3Technical Analysis
The installation procedure clones the mutable default branch of an external source repository and subsequently installs its dependency manifests. No audited commit hash, immutable release reference, dependency lockfile, package hash, artifact checksum, or cryptographic signature is required.
The referenced
requirements.txtandrequirements-embedding.txtfiles are not included in the audited Skill package. Consequently, the packages and build behavior that users are instructed to install could not be reviewed. Python package installation may execute build backends, setup hooks, or native compilation steps under the privileges of the user runningpip.The embedding models are also downloaded from a third-party mirror without integrity verification. Depending on the model-loading framework and artifact format, tampered model repositories can cause model poisoning and may create code-execution risk if unsafe serialized objects or repository-provided custom code are loaded.
Attack Path
- An attacker compromises the upstream source repository, model mirror, maintainer account, or dependency resolutio ...[truncated 1297 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the HuiMemory source to an audited full commit hash rather than cloning the mutable default branch.
- Publish and use a dependency lockfile containing exact package versions and cryptographic hashes.
- Install dependencies with hash verification, such as
pip install --require-hashes. - Prefer official package and model distribution channels over unauthenticated third-party mirrors.
- Publish SHA-256 checksums or signed manifests for every downloaded model artifact and verify them before loading.
- Disable remote custom model code unless it has been separately reviewed and pinned.
- Load only model formats designed to avoid arbitrary object deserialization, such as verified
safetensorsartifacts where supported. - Perform installation in an isolated, non-privileged virtual environment or container without access to production secrets.
- Add automated dependency scanning, software-bill-of-materials generation, and periodic review of the pinned commit and transitive dependencies.
