T08 · Insecure Dependencies
- Location
SKILL.md:64- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 64–67
Vulnerability Type: Unpinned dependency installation
Risk Level: MediumVulnerable Code Snippet:
markdown ### 1) Install Dependency ```bash pip install requeststext ### Technical Analysis The installation instructions retrieve `requests` without specifying an exact version, a lock file, or cryptographic hashes. Consequently, the package version and its transitive dependency graph are mutable and determined by the package index configured on the user's system at installation time. This creates a software supply-chain risk. A compromised package index, malicious internal mirror, dependency-confusion condition, or compromised future release could cause attacker-controlled code to be installed. Python packages can execute code during installation in applicable build workflows and when imported during normal Skill execution. ### Attack Path 1. An attacker compromises or controls a package source accessible through the user's pip configuration, or compromises a package release in the unresolved dependency chain. 2. The user follows the documented command `pip install requests`. 3. Pip resolves and installs the mutable package version and dependencies without verifying an approved lock file or integrity hashes. 4. Attacker-controlled code executes during a package build or installation, or when `requests` is imported by `scripts/skill_router.py`. 5. The malicious code operates with the privileges of the user or service account running the installation or Skill. ### Impact Assessment Successful exploitation could permit arbitrary code execution under the privileges of the user or service account running pip or the Skill. Depending on those privileges and the execution environment, an attacker could access application data and environment variables such as `API_KEY`, alter local files, make unauthorized network requests, or compromise o ...[truncated 271 chars]- Remediation
View remediation
Remediation Suggestions
- Replace the unconstrained installation command with a reviewed, exactly pinned dependency set.
- Maintain direct and transitive dependencies in a lock file.
- Record and enforce cryptographic hashes with a command such as:
bash pip install --require-hashes -r requirements.txt - Generate the requirements file from a trusted environment and review dependency changes before updating it.
- Configure pip to use the official Python Package Index or an authenticated, trusted internal mirror.
- Install dependencies in an isolated virtual environment or container using a non-privileged account.
- Add automated dependency vulnerability and provenance checks to the release process.
