T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Third-Party Financial SDK Installed Without Artifact Integrity Verification
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1; installation instruction atSKILL.md:12-15
Vulnerability Type: Supply-chain integrity weakness
Risk Level: MediumVulnerable Code
requirements.txt:1:text python-kraken-sdk==3.2.7SKILL.md:12-15:bash ## Setup pip3 install -r requirements.txtTechnical Analysis
The project pins
python-kraken-sdkto a specific version, which reduces unintended version drift, but it does not pin the package artifact with a cryptographic hash. The documented installation command also does not use pip's--require-hashesoption.Consequently, installation trusts the package artifact returned by the configured Python package index. The CLI imports this dependency and passes Kraken API credentials to SDK objects in
kraken_cli.py:25-32. It also uses the SDK for sensitive account operations, including trading, staking allocation, and withdrawals.This does not establish that the pinned dependency is malicious. The weakness is the absence of artifact-level integrity verification for a dependency operating within a financially sensitive trust boundary.
Attack Path
- An attacker compromises the relevant package distribution channel, configured package index, or the artifact associated with the pinned release.
- A user follows the setup instruction in
SKILL.mdand runspip3 install -r requirements.txt. - Pip installs the substituted artifact because no expected SHA-256 hash is specified or enforced.
- Malicious package code can execute during installation or when
kraken_cli.pyimports the SDK. - At runtime, the CLI supplies
KRAKEN_API_KEYandKRAKEN_API_SECRETto SDK clients. - The malicious dependency can read process credentials, alter Kraken API operations, or perform other actions available to the local process and API key.
Impact Assessment
Successful exploitation could permit arbitrary code ...[truncated 576 chars]
- Remediation
View remediation
Remediation Suggestions
-
Generate a reviewed lock file containing SHA-256 hashes for every direct and transitive dependency.
-
Enforce hash validation during installation:
bash pip install --require-hashes -r requirements.txt -
Obtain packages only from an explicitly configured, trusted index or an internally controlled artifact repository.
-
Review and verify the selected
python-kraken-sdkrelease before approving its hashes. -
Perform dependency vulnerability and provenance checks in CI, and require review for lock-file updates.
-
Install and run the Skill in an isolated virtual environment or container under a non-privileged operating-system account.
-
Use least-privilege Kraken API keys. Keep withdrawal permission disabled unless the withdrawal feature is explicitly required, and use separate credentials for read-only and transaction-capable workflows where practical.
-
Rotate Kraken credentials immediately if dependency compromise is suspected.
-
