T08 · Insecure Dependencies
Warning
- Location
- requirements.txt:1
- Finding
- Unbounded and Unverified Third-Party Python Dependencies## Vulnerability Details **File Location**: `requirements.txt`, lines 1–2 **Vulnerability Type**: Dependency versions are not locked and package integrity is not verified **Risk Level**: Medium ### Vulnerable Code ```text arxiv>=2.0.0 pymongo>=4.0.0 ``` The same open-ended constraints are also represented in `package.json`, where `arxiv` and `pymongo` use minimum-version constraints rather than exact versions. ### Technical Analysis Both dependencies permit installation of any current or future release at or above the specified version. No lock file or cryptographic hashes are supplied to establish which exact artifacts were reviewed and approved. Consequently, two installations of the same Skill version can resolve to materially different dependency code. If an upstream package, maintainer account, release pipeline, or configured package index is compromised, a malicious future release can be selected automatically without any modification to this repository. Python packages can execute code during source builds or installation, and their imported modules execute top-level code in the Skill process. This is particularly relevant here because `arxiv` is imported unconditionally and `pymongo` is imported whenever installed. Although MongoDB support is documented as optional, `requirements.txt` installs `pymongo` as a normal dependency, unnecessarily increasing the default dependency and attack surface. This finding does not establish that the currently available `arxiv` or `pymongo` releases are malicious. It identifies a confirmed lack of dependency reproducibility and integrity controls. ### Attack Path 1. An attacker compromises an upstream dependency publisher, release process, or package index used by the installer. 2. The attacker publishes a malicious version satisfying `arxiv>=2.0.0` or `pymongo>=4.0.0`. 3. A user installs or updates the Skill without a pre-existing lock or constrained environment. ...[truncated 903 chars]
- Remediation
- ## Remediation Suggestions 1. Pin reviewed dependency versions exactly, for example through a generated lock or constraints file. 2. Use `pip-compile --generate-hashes` or an equivalent reproducible dependency workflow, and install with `pip --require-hashes`. 3. Lock transitive dependencies as well as direct dependencies. 4. Move `pymongo` out of the default requirements and into a clearly documented optional extra so users who only search or download papers do not install it. 5. Configure installation to use trusted HTTPS indexes explicitly and prohibit unreviewed alternate or extra package indexes. 6. Add automated dependency vulnerability and provenance checks, such as `pip-audit`, release review, and lock-file update approval. 7. Run installation and execution as an unprivileged account in an isolated virtual environment or container. 8. Keep `package.json`, `requirements.txt`, and documentation consistent about which dependencies are mandatory and which are optional.
