T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned and Unverified Third-Party Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1-2; installation instructions also appear inSKILL.md:50andREADME.md:20
Vulnerability Type: Supply-chain exposure through mutable dependency resolution
Risk Level: MediumVulnerable Code
text xtquant>=1.0.0 pandas>=1.5.0The installation instructions resolve packages directly without version or integrity verification:
bash pip install xtquantTechnical Analysis
Both dependencies use open-ended minimum-version constraints. The project does not provide a lockfile, cryptographic hashes, an approved package index, or a documented package verification procedure. Consequently, separate installations can resolve to different package versions, including future versions that have not been reviewed with this Skill.
Python packages may execute code during installation and whenever imported. This is particularly sensitive for
xtquant, because the packaged demo and documented trading programs import it in an environment that may have access to a locally authenticated miniQMT brokerage terminal. This finding does not establish that the current packages are malicious; it identifies the absence of controls preventing a compromised or unexpectedly changed release from entering the environment.Attack Path
- An attacker compromises an allowed future release of a declared dependency or its package-distribution account.
- A user follows the documented installation command or installs from
requirements.txt. - Because only a minimum version is specified, the package manager selects the latest compatible release.
- Attacker-controlled code executes during package installation or import.
- The code operates with the privileges of the Python process and may interact with resources available to that process, including files, network connections, and an accessible brokerage service.
Impact Assessment
Successful ...[truncated 415 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace minimum-version constraints with exact versions that have been reviewed and tested.
- Generate a hash-locked dependency file and require hash verification during installation, for example through
pip-compile --generate-hashesandpip install --require-hashes. - Document the approved package registry and use an explicitly configured trusted index.
- Install dependencies in an isolated virtual environment under a non-privileged account.
- Review dependency release notes and package artifacts before updating pinned versions.
- Add automated dependency scanning and provenance verification to the release process.
- Avoid running package installation or trading programs with administrator privileges.
