T08 · Insecure Dependencies
Warning
- Location
SKILL.md:30- Finding
Unpinned Third-Party Python Dependencies
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 30–33
Vulnerability Type: Uncontrolled third-party dependency resolution
Risk Level: MediumVulnerable Code:
markdown ### Prerequisites ```bash pip install pandas numpytext ### Technical Analysis The installation command specifies `pandas` and `numpy` without fixed versions or cryptographic hashes. Consequently, pip resolves whichever compatible package versions are available from its configured package index at installation time. Although both package names refer to established projects, the installation is not reproducible and does not verify that users receive dependency artifacts reviewed by the skill publisher. Risk arises if a package release or configured package index is compromised, or if dependency resolution retrieves an unexpected transitive component. A user-configured or attacker-controlled pip index could also serve substituted artifacts under these package names. The project does not provide a lock file, hash-verified requirements file, or documented trusted-index restriction to mitigate this supply-chain exposure. ### Attack Path 1. A user follows the prerequisite instructions and runs `pip install pandas numpy`. 2. pip contacts the package index configured in the user's environment and dynamically resolves package versions and transitive dependencies. 3. An attacker compromises a resolved release or controls the configured package index and supplies a malicious distribution. 4. The malicious component executes during package installation or when the installed module is imported by the documented implementation. 5. The component operates with the privileges of the user running pip or the calculator. ### Impact Assessment Successful exploitation could permit arbitrary code execution under the installing user's account. The resulting access could include reading or modifying files available to that account, accessin ...[truncated 418 chars]- Remediation
View remediation
Remediation Suggestions
- Pin all direct and transitive dependencies to reviewed versions in a lock file.
- Generate a hash-verified requirements file and require hashes during installation:
bash python3 -m pip install --require-hashes -r requirements.txt - Include SHA-256 hashes for every permitted distribution in
requirements.txt. - Document installation from an explicitly trusted package index, while avoiding embedded credentials:
bash python3 -m pip install \ --index-url https://pypi.org/simple \ --require-hashes \ -r requirements.txt - Recommend installation inside a dedicated virtual environment with no elevated privileges.
- Establish dependency review and update procedures, including vulnerability scanning and deliberate lock-file regeneration.
- Keep package installation separate from normal skill execution so dependencies are not dynamically installed whenever the skill is invoked.
