T08 · Insecure Dependencies
- Location
- INSTALL.md:96
- Finding
- Unpinned and Unnecessary Runtime Dependencies Increase Supply-Chain Exposure<![CDATA[ ## Vulnerability Details **File Location**: `INSTALL.md:96-104` **Vulnerability Type**: Uncontrolled third-party dependency resolution **Risk Level**: Medium ### Vulnerable Code ```markdown ## Requirements - Python 3.6+ - requests - pytz - feedparser Install dependencies: ```bash pip3 install requests pytz feedparser ``` ``` ### Technical Analysis The installation procedure retrieves packages from the Python package index without specifying reviewed versions, cryptographic hashes, or a lockfile. Consequently, the code installed on a user's system can change after the Skill has been audited. The instructions also do not require an isolated virtual environment. Depending on the user's pip configuration, packages may be installed into the user's shared Python environment or a system-wide environment. Installation with elevated privileges would cause package installation code to execute with those elevated privileges. The supplied scripts use `requests` and `pytz`, but the audit found no use of `feedparser`. Installing an unused package expands the supply-chain attack surface beyond what is necessary for the declared functionality. This finding does not establish that any currently named package is malicious. The risk arises from unrestricted future dependency resolution and unnecessary dependency installation. ### Attack Path 1. An upstream package release, maintainer account, package index, or dependency in the transitive dependency graph is compromised. 2. A user follows `INSTALL.md` and runs the unpinned `pip3 install` command. 3. pip resolves and downloads the compromised version because no approved version or hash is enforced. 4. Package build or installation logic executes with the privileges of the invoking user. 5. Malicious package code can subsequently execute whenever the Skill imports the affected dependency. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of the user runni ...[truncated 462 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove `feedparser` unless a supplied and reviewed feature actually requires it. 2. Define reviewed, exact dependency versions in a dedicated requirements file: ```text requests==<reviewed-version> pytz==<reviewed-version> ``` 3. Generate and verify cryptographic hashes for every direct and transitive dependency, then install with: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 4. Require installation in a project-specific virtual environment: ```bash python3 -m venv .venv . .venv/bin/activate python3 -m pip install --require-hashes -r requirements.txt ``` 5. Document that dependency installation must not be performed as root. 6. Add automated dependency auditing and update pinned versions only after review and testing. ]]>
