T08 · Insecure Dependencies
- Location
SKILL.md:26- Finding
Unpinned Python Dependencies and Mutable Model Artifacts
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:26,SKILL.md:46,SKILL.md:102,SKILL.md:343-346,README.md:20-26,USAGE.md:20, andUSAGE.md:234
Vulnerability Type: Supply-chain exposure through unpinned dependencies and model revisions
Risk Level: MediumVulnerable Code
SKILL.md:26andSKILL.md:343:bash pip install sentence-transformers faiss-cpu click flaskREADME.md:20:bash pip install sentence-transformers faiss-cpu click flaskSKILL.md:46,README.md:26, andUSAGE.md:20:bash python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='sentence-transformers/all-MiniLM-L6-v2', local_dir='./models/all-MiniLM-L6-v2')"SKILL.md:102:python self.model = SentenceTransformer(self.model_name)USAGE.md:234:bash python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='sentence-transformers/all-mpnet-base-v2', local_dir='./models/all-mpnet-base-v2')"Technical Analysis
The installation commands do not pin exact package versions or verify package hashes. Consequently, running the same documented command at different times can install different dependency versions. The model download commands similarly reference mutable Hugging Face repositories without specifying immutable commit revisions or expected artifact checksums.
The
SentenceTransformer(self.model_name)fallback can also retrieve model artifacts implicitly when the expected local model is unavailable. This weakens the documented offline trust boundary and makes runtime behavior depend on externally supplied content.This finding does not establish that the named packages or models are malicious. The vulnerability is the absence of controls that ensure users receive the same reviewed artifacts.
Attack Path
- An attacker compromises an upstream package release, model repository, maintainer acco ...[truncated 1169 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every Python dependency to an explicitly reviewed version in a lock file.
- Generate and enforce cryptographic hashes, such as through
pip install --require-hashes -r requirements.txt. - Use a trusted package index explicitly and apply dependency vulnerability scanning in CI.
- Pin each Hugging Face download to an immutable commit using the
revisionparameter. - Record and verify checksums for all downloaded model files before loading them.
- Configure runtime loading for local-only operation after verification, for example by using supported
local_files_onlycontrols. - Fail closed when the verified local model is missing instead of silently downloading a replacement.
- Document the initial network-dependent setup separately from offline runtime behavior.
