T08 · Insecure Dependencies
- Location
requirements.txt:4- Finding
Unpinned Dependencies and Mutable Remote Model Artifact
- Content
View full analysis
=0.5.0 sentence-transformers>=2.2.2 pyyaml>=6.0.1 rich>=13.7.0 psutil>=5.9.8 pysqlite3-binary>=0.5.2 openai>=1.0.0 ``` From `pyproject.toml:3-5` and `pyproject.toml:37-52`: ```toml requires = ["setuptools>=61.0", "wheel"] build-backend = "setuptools.build_meta" dependencies = [ "chromadb>=0.4.0", "sentence-transformers>=2.2.0", "pyyaml>=6.0.1", "rich>=13.7.0", "psutil>=5.9.0", ] [project.optional-dependencies] dev = [ "ruff>=0.1.0", "pytest>=7.0.0", ] sqlite-compat = [ "pysqlite3-binary>=0.5.0; python_version < '3.12'" ] ``` From `scripts/embedder.py:31-34`: ```python from sentence_transformers import SentenceTransformer self._model = SentenceTransformer(self.model_name) self._dimension = self._model.get_sentence_embedding_dimension() ``` The configured model name is the mutable repository identifier `BAAI/bge-small-zh-v1.5`, rather than an immutable revision or locally verified artifact. ### Technical Analysis All third-party packages are constrained only by minimum versions. Consequently, an installation may select any later release accepted by the dependency resolver. There is no lockfile, exact version pinning, package hash verification, or recorded transitive dependency set. The embedding implementation also passes a model repository identifier directly to `SentenceTransformer`. If the model is not already cached, the library may retrieve model files from an external model registry. No immutable model revision or expected artifact checksum is supplied. These practices weaken build reproducibility and create a supply-chain trust boundary outside the ...[truncated 1933 chars]- Remediation
View remediation
