T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:61
- Finding
- Unpinned Third-Party Dependencies Create a Supply-Chain Risk## Vulnerability Details **File Location**: `SKILL.md`, line 61 **Vulnerability Type**: Unpinned executable dependencies **Risk Level**: Medium ### Vulnerable Code ```bash pip install numerapi lightgbm pandas numpy cloudpickle scikit-learn ``` ### Technical Analysis The installation command retrieves six packages without specifying reviewed versions, cryptographic hashes, or a lockfile. Consequently, the exact code installed can change between executions without any modification to the audited Skill. Python source distributions can execute package-controlled build logic during installation. Malicious code in a wheel or source distribution can also execute when the installed package is subsequently imported by the documented workflow. A compromised upstream release, maliciously replaced distribution, or other package-index supply-chain incident could therefore introduce code not present during this audit. The packages are installed inside a virtual environment, but a Python virtual environment is not a security sandbox. Package-controlled code still runs with the operating-system permissions of the invoking user. ### Attack Path 1. An attacker compromises an upstream package release or its package-publishing account. 2. The attacker publishes a malicious version under one of the dependency names used by the Skill. 3. A user follows the documented unpinned `pip install` command. 4. `pip` resolves the compromised version because no known-safe version or hash is required. 5. Malicious code executes during package building, installation, or a later package import. 6. The code accesses files and environment variables available to the user, potentially including Numerai credentials. ### Impact Assessment Successful exploitation provides arbitrary code execution with the privileges of the user running the installation or subsequent Python workflow. The affected scope can include: - `NUMERAI_PUBLIC_ID` and `NUMERAI_SEC ...[truncated 487 chars]
- Remediation
- ## Remediation Suggestions 1. Replace the inline installation command with a reviewed requirements or lock file containing exact versions. 2. Record cryptographic hashes for every accepted distribution, including transitive dependencies. 3. Install with hash enforcement, for example: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Generate the lock file from a trusted environment and review dependency changes before updating it. 5. Prefer binary wheels from the official package index and reject unexpected source builds where practical. 6. Run installation and model processing in an isolated, non-privileged environment without unnecessary credentials. 7. Keep Numerai credentials out of the environment during dependency installation.
