T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:92
- Finding
- Unpinned Third-Party Package Installation## Vulnerability Details **File Location**: `SKILL.md`, line 92 **Vulnerability Type**: Unpinned and unverified third-party dependency installation **Risk Level**: Medium **Complete Code Snippet**: ```bash ls /dev/spidev* pip3 install spidev ``` ### Technical Analysis The skill instructs users to install `spidev` through pip without specifying a reviewed version, validating package hashes, using a lockfile, or identifying a trusted package index. Consequently, the installed artifact is determined by the package index and resolver state at execution time rather than by the audited project. This creates a supply-chain risk: a compromised package release, compromised package-index account, malicious dependency, or attacker-controlled pip index configuration could cause different and potentially malicious code to be installed. Python packages can execute package-defined build or installation logic during installation, and imported package code executes when the user subsequently runs the SPI example. ### Attack Path 1. An attacker compromises the relevant package release or a dependency, or influences the victim's pip index configuration. 2. A user follows the skill's SPI setup instructions and runs `pip3 install spidev`. 3. Pip retrieves the mutable, unverified package or dependency from the configured index. 4. Malicious code executes during package build or installation, or later when `spidev` is imported. 5. The payload operates with the privileges of the user who invoked pip or the subsequent Python process. ### Impact Assessment Successful exploitation could provide arbitrary code execution with the invoking user's privileges. The accessible scope may include that user's files, environment variables, credentials available to the process, network access, and hardware devices permitted to the account. If the command is independently run from an elevated environment, the impact would increase accordingly; however, th ...[truncated 69 chars]
- Remediation
- ## Remediation Suggestions - Pin `spidev` to a reviewed, exact version rather than allowing pip to select the latest available release. - Store dependency versions in a lockfile or requirements file with cryptographic hashes and install them using `pip install --require-hashes -r requirements.txt`. - Explicitly document and enforce a trusted package index instead of relying on mutable user or system pip configuration. - Prefer a vendor-maintained, cryptographically verified operating-system package when one is available for the RDK X5 platform. - Install the dependency in an isolated virtual environment with minimal privileges. - Review the pinned package artifact and its transitive dependencies before updating versions.
