T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:131
- Finding
- Unpinned Dependency Installation Bypasses System Package Protections<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 131 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```bash pip install Pillow --break-system-packages ``` ### Technical Analysis The error-handling instructions recommend installing Pillow directly from the active Python package index without pinning a reviewed version or verifying package hashes. The `--break-system-packages` option explicitly bypasses protections intended to prevent pip from modifying a system-managed Python environment. The package selected and executed during installation therefore depends on mutable external package-index state and local pip configuration. A compromised package index, malicious mirror, dependency-confusion condition, or altered pip configuration could result in attacker-controlled package content being installed. Installation can execute package build hooks or other package-controlled code. Even when the legitimate Pillow package is retrieved, modifying a shared system environment can overwrite or conflict with operating-system-managed dependencies. ### Attack Path 1. Pillow is unavailable when the skill is invoked. 2. The agent follows the documented error-handling instruction. 3. The agent runs `pip install Pillow --break-system-packages`. 4. pip resolves the unpinned dependency through its currently configured package index or mirror. 5. A compromised source, configuration, or package release supplies attacker-controlled installation content. 6. Package installation code executes with the permissions of the agent process and modifies the shared Python environment. ### Impact Assessment Successful exploitation could execute arbitrary code with the permissions of the account running the agent. It could also read or alter files accessible to that account, compromise subsequent Python operations, or destabilize other applications that use the same system-managed environment. The instruction does ...[truncated 180 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Remove `--break-system-packages`. - Create and use a dedicated virtual environment for the skill. - Pin Pillow to an exact, reviewed version. - Require cryptographic hashes through a locked requirements file, for example with `pip install --require-hashes -r requirements.txt`. - Download packages only from an approved HTTPS package repository. - Prefer provisioning dependencies during a controlled build process rather than installing them dynamically during skill execution. - Run dependency installation and image processing under a minimally privileged service account. ]]>
