T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned and Ambiguous Third-Party Dependencies Enable Supply-Chain Compromise
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt, lines 1–6
Vulnerability Type: Unpinned and potentially mismatched package dependencies
Risk Level: HighVulnerable Code
text bert_score comet dataclasses numpy torch yamlTechnical Analysis
Every dependency is specified without an exact version or integrity hash. Consequently, installation resolves whatever package version is available from the configured package index at installation time. This makes builds non-reproducible and exposes users to compromised future releases, dependency takeover, and package-index substitution.
Several declarations are also ambiguous or inconsistent with the documented and imported modules:
yamlis declared, while the commonly intended distribution providing theyamlmodule isPyYAML.cometis declared, whileSKILL.mdinstructs users to installcomet-ml, andscripts/main.pyimportsdownload_modelandload_from_checkpointfromcomet. These names refer to potentially different package ecosystems and do not clearly identify the intended COMET evaluation implementation.dataclassesis unnecessary under the documented Python 3.10+ baseline because it is part of the standard library.
The application imports these dependencies at startup in
scripts/main.py, includingbert_score,comet,numpy, andtorch. Python packages may execute arbitrary code during installation and module import. Therefore, resolving an unintended or compromised distribution can lead directly to code execution under the account installing or running the skill.No evidence in the audited files establishes that a currently published dependency is malicious. The confirmed weakness is the unsafe, unpinned, and inconsistent dependency specification.
Attack Path
-
A user follows the documented installation command:
bash pip install -r requirements.txt -
The package installer resolves unpinned names from its configure ...[truncated 1045 chars]
- Remediation
View remediation
Remediation Suggestions
-
Identify and document the exact distributions that provide every imported module. Resolve the current inconsistency among
comet,comet-ml, and the COMET evaluation API before release. -
Replace ambiguous package names with the authoritative distribution names. For example, use
PyYAMLrather thanyamlif PyYAML is intended. -
Remove
dataclasseswhen Python 3.10+ is required. -
Pin all direct and transitive dependencies to reviewed versions using a lock file or generated constraints file.
-
Require cryptographic hashes during deployment, for example with a hash-locked requirements file and:
bash pip install --require-hashes -r requirements.lock -
Configure installers to use a trusted package index explicitly and disable untrusted extra indexes.
-
Scan locked dependencies for known vulnerabilities and review updates before regenerating the lock file.
-
Install dependencies in an isolated, non-privileged virtual environment or container without production secrets.
-
Add automated tests verifying that each declared distribution supplies the expected import and API, particularly
download_modelandload_from_checkpoint.
-
