T08 · Insecure Dependencies
Warning
- Location
- requirements.txt:1
- Finding
- Unpinned and Unverified Runtime Dependencies## Vulnerability Details **File Location**: `requirements.txt`, lines 1–2 **Vulnerability Type**: Unpinned dependencies without integrity verification **Risk Level**: Medium ```text python-kraken-sdk>=1.2.0 python-dotenv>=1.0.0 ``` ### Technical Analysis Both runtime dependencies use open-ended minimum-version constraints. Consequently, future installations may resolve to package versions that were not reviewed as part of this audit. The requirements file also provides no cryptographic hashes to verify package integrity. This is security-sensitive because `python-kraken-sdk` is initialized with Kraken API credentials and can access private financial account information. If a permitted future release or its transitive dependency is compromised, malicious code could execute during package installation or module import. The finding represents supply-chain exposure; the audit found no evidence that the currently named packages are malicious. ### Attack Path 1. An attacker compromises a future release of one of the permitted packages or a transitive dependency. 2. The malicious release remains compatible with the unrestricted `>=` constraint. 3. A user installs or updates the project dependencies from `requirements.txt`. 4. The package installer resolves and installs the compromised release because no exact version or integrity hash is enforced. 5. Malicious code executes during installation or when the project imports the dependency. 6. The code can access the process environment and the Kraken credentials supplied to the SDK, as well as account data available under those credentials. ### Impact Assessment Successful exploitation would run dependency code with the privileges of the user installing or executing the project. It could expose `KRAKEN_API_KEY`, `KRAKEN_API_SECRET`, and financial account information; manipulate displayed portfolio data; or perform any Kraken API operation allowed by the configured key permissions. Local files and other resource ...[truncated 234 chars]
- Remediation
- ## Remediation Suggestions 1. Replace minimum-version ranges with exact, reviewed versions using `==`. 2. Generate a reproducible lockfile containing cryptographic hashes, for example with `pip-compile --generate-hashes`. 3. Enforce hash verification during deployment with `pip install --require-hashes`. 4. Pin and review transitive dependencies, not only the two direct dependencies. 5. Install packages only from an explicitly configured, trusted package index. 6. Add automated dependency vulnerability and provenance scanning to CI. 7. Regularly update dependencies through a controlled review process rather than accepting arbitrary future releases. 8. Configure the Kraken API key with only the minimum read permissions required by the Skill and disable trading or withdrawal permissions.
