T08 · Insecure Dependencies
Warning
- Location
- README.md:16
- Finding
- Unpinned Third-Party Python Dependencies## Vulnerability Details **File Location**: `README.md:16` **Vulnerability Type**: Supply-chain exposure through unpinned dependencies **Risk Level**: Medium **Vulnerable code snippet**: ```bash # Install dependencies pip install web3 eth-account ``` The same unsafe installation command is also documented in `SKILL.md:180`: ```bash pip install web3 eth-account ``` ### Technical Analysis The installation instructions retrieve `web3`, `eth-account`, and their transitive dependencies without exact version constraints, package hashes, or a reviewed lockfile. Consequently, the installed code can change between installations even when the audited project itself remains unchanged. Python package installation may execute package build hooks, and installed dependencies execute in the same process as `scripts/reputation.py`. This is security-sensitive because the application imports these packages and later reads `ERC8004_MNEMONIC` or `ERC8004_PRIVATE_KEY` when signing write transactions. A compromised direct or transitive dependency could therefore run with the invoking user's privileges and access secrets available to the process. This finding does not establish that the currently published dependencies are malicious. It identifies the mutable and insufficiently verified dependency acquisition process as the vulnerability. ### Attack Path 1. An attacker compromises a direct dependency, one of its transitive dependencies, a future package release, or the package-index delivery path. 2. The attacker publishes malicious package code or installation hooks under a version satisfying the unconstrained installation command. 3. A user follows the documented `pip install web3 eth-account` instruction. 4. `pip` resolves and installs the attacker-controlled version without validating it against project-supplied hashes. 5. Malicious code executes during installation or when `scripts/reputation.py` imports the affected package. ...[truncated 984 chars]
- Remediation
- ## Remediation Suggestions 1. Create a dependency lock or requirements file containing reviewed, exact versions for all direct and transitive dependencies. 2. Generate and record cryptographic hashes for every distribution, then install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.txt ``` 3. Replace the documentation command with installation from the reviewed requirements or lockfile rather than resolving package versions dynamically. 4. Use an isolated virtual environment and explicitly warn users not to install the dependencies with administrator privileges: ```bash python -m venv .venv . .venv/bin/activate python -m pip install --require-hashes -r requirements.txt ``` 5. Add automated dependency vulnerability and integrity scanning to CI, and review lockfile changes before merging updates. 6. Prefer trusted package-index configuration and prohibit unreviewed additional indexes to reduce dependency-confusion risk. 7. Update both `README.md:16` and `SKILL.md:180` so all documented installation paths use the same verified dependency set.
