T08 · Insecure Dependencies
- Location
SKILL.md:27- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:27
Vulnerability Type: Unpinned dependency installation from a mutable package index
Risk Level: MediumVulnerable Code Snippet:
bash # Install dependencies pip install pyright # Python type checkingTechnical Analysis
The setup documentation instructs users to install
pyrightwithout specifying an audited version, verifying cryptographic hashes, using a lockfile, or constraining the package index. Consequently, the package and its transitive dependency set may change between installations.This does not establish that the current
pyrightpackage is malicious. However, it creates a supply-chain exposure: if the configured package index, a future package release, or a transitive dependency is compromised, following the documented installation command could introduce attacker-controlled code. Python packages may execute code during installation or later when imported or invoked.The risk is amplified when users run the command globally or from a privileged shell. The implementation currently does not invoke
pyright, making the documented dependency installation unnecessary for the reviewed functionality.Attack Path
- An attacker compromises a future dependency release, a transitive dependency, or the package source selected by the user's pip configuration.
- A user follows the setup instructions and runs
pip install pyright. - Pip resolves the unconstrained current package and dependency versions from the configured index.
- The compromised artifact is installed and may execute attacker-controlled installation or runtime behavior with the privileges of the user running pip.
- The attacker can affect files, credentials, and processes accessible to that account and can persist within the affected Python environment.
Impact Assessment
Successful exploitation could execute arbitrary code with the privileges of the accoun ...[truncated 440 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the
pyrightinstallation requirement unless the Skill actually implements and invokes pyright-based analysis. - If the dependency is required, pin it to a reviewed exact version, for example:
bash python3 -m pip install --require-hashes -r requirements.txt - Maintain a lockfile or requirements file containing exact versions and cryptographic hashes for all direct and transitive dependencies.
- Install dependencies in a dedicated virtual environment rather than globally:
bash python3 -m venv .venv .venv/bin/python -m pip install --require-hashes -r requirements.txt - Document the expected package index and prevent unintended index substitution or dependency confusion where operationally appropriate.
- Periodically review pinned versions and hashes, and update them through a controlled dependency-review process.
- Advise users not to perform package installation with administrator or root privileges.
- Remove the
