T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned Third-Party Dependency Creates a Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1; related installation instructions atSKILL.md:54andSKILL.md:78
Vulnerability Type: Unpinned and unhashed third-party dependency
Risk Level: MediumVulnerable Code
requirements.txt:1:text gql[websockets]>=3.4.0Related installation command in
SKILL.md:78:bash pip install 'gql[websockets]'Technical Analysis
The project permits any future version of
gqlat or above version 3.4.0 and does not constrain or verify its transitive WebSocket dependencies. No lock file or cryptographic package hashes are provided. The documented direct installation command is even less restrictive because it installs the latest version selected by the package index.Consequently, the code reviewed during this audit may not be the dependency code installed later. A compromised upstream release, dependency-confusion condition, or malicious transitive dependency could introduce attacker-controlled code. Such code could run during package installation where supported or when the dependency is imported by
scripts/stream_stablecoin_payments.py.Attack Path
- An attacker compromises a future release of
gqlor one of its transitive dependencies, or otherwise influences dependency resolution. - A user follows the documented installation command or installs from
requirements.txt. pipresolves and downloads the attacker-controlled package because no exact version or hash validation prevents it.- Malicious code executes during installation or when the streaming script imports the affected package.
- The code runs with the privileges of the user executing
pipor the streaming script and can access data available to that process, includingBITQUERY_API_KEY.
Impact Assessment
Exploitation could result in arbitrary code execution under the installing or runtime user's account. The accessible scope may include e ...[truncated 336 chars]
- An attacker compromises a future release of
- Remediation
View remediation
Remediation Suggestions
- Pin
gqland all transitive dependencies to versions that have been reviewed and tested. - Generate a reproducible lock file with a tool such as
pip-compile. - Record SHA-256 hashes for every permitted distribution and install with:
bash pip install --require-hashes -r requirements.txt - Replace the unconstrained command in
SKILL.mdwith installation from the locked, hash-verified requirements file. - Use only trusted package indexes and explicitly configure the expected index URL in controlled environments.
- Run dependency vulnerability and provenance checks in CI, and review dependency updates before regenerating the lock file.
- Install and run the skill in an isolated virtual environment or container with only the minimum required environment variables and filesystem permissions.
- Pin
