T08 · Insecure Dependencies
- Location
SKILL.md:21- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:21-24
Additional Locations:SKILL.md:40-42,references/apify-setup.md:3-6
Vulnerability Type: Unpinned package installation from a mutable package index
Risk Level: MediumVulnerable Code
SKILL.md:21-24:markdown ## Prerequisites Before running, verify: 1. **apify-client** is installed: `pip3 install apify-client`The same installation command appears in
references/apify-setup.md:3-6:markdown ## 1. Install the Python SDK ```bash pip3 install apify-clienttext ### Technical Analysis The documented command installs the latest version of `apify-client` and its transitive dependencies from the package index configured for `pip`. No reviewed version, lock file, trusted index URL, or package integrity hash is specified. As a result, the code installed when the skill is set up can differ from the code that was present when the skill was audited. A compromised upstream release, compromised dependency, or package shadowing through a malicious or misconfigured private package index could introduce attacker-controlled installation or runtime code. Python package installation can invoke package-controlled build backends and subsequently imports the installed package when `reddit_search.py` executes. Therefore, a supply-chain compromise could result in code execution under the account running the installation or script. ### Attack Path 1. An attacker compromises a future `apify-client` release or one of its transitive dependencies, or places a higher-priority package on an index configured by the victim. 2. A user or Agent follows the skill instructions and executes `pip3 install apify-client`. 3. `pip` resolves the mutable, unpinned package version from the configured index. 4. Attacker-controlled package or build code executes during installation or when the package is imported. 5. The malicious code operates w ...[truncated 671 chars]- Remediation
View remediation
Remediation Suggestions
- Pin
apify-clientand all transitive dependencies to reviewed versions in a lock file. - Require package hashes, for example by using a hash-locked requirements file with
pip install --require-hashes -r requirements.txt. - Explicitly use the trusted Python Package Index or an internally controlled package repository.
- Install dependencies inside a dedicated virtual environment rather than the user's global Python environment.
- Periodically review and intentionally update dependency versions after security and compatibility testing.
- Keep the pinned installation instructions consistent in
SKILL.mdandreferences/apify-setup.md.
Example hardened workflow:
bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt- Pin
