T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:47
- Finding
- Unpinned Third-Party Dependency Installation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:47` **Vulnerability Type**: Software supply-chain risk from an unpinned dependency **Risk Level**: Medium ### Vulnerable Code ```bash cd skills/aipm-news-digest && python3 -m venv venv && ./venv/bin/pip install feedparser googletrans==4.0.0-rc1 ``` ### Technical Analysis The documented installation command installs `feedparser` without an exact version constraint or package integrity hash. Consequently, the resolved package can change between installations without any corresponding change to the reviewed Skill. Although `googletrans` is version-pinned, it is pinned to a release-candidate version and neither dependency is verified using cryptographic hashes. Python package installation and subsequent imports may execute package-controlled code. A compromised package release, package-index account, dependency, or configured package repository could therefore introduce code that was not included in this audit. No evidence was found that either named package is currently malicious. The vulnerability is the mutable and unverifiable dependency installation process. ### Attack Path 1. An attacker compromises the package publisher, package-index account, upstream dependency, or package source used by `pip`. 2. The attacker publishes a malicious version that satisfies the unconstrained `feedparser` requirement, or replaces another dependency artifact available through the installation source. 3. A user follows the Setup command in `SKILL.md`. 4. `pip` downloads and installs the attacker-controlled artifact without validating it against an audit-approved hash. 5. Malicious package code runs during installation or when the application imports and invokes the dependency. ### Impact Assessment Malicious dependency code would execute with the privileges of the user running `pip` or the news-fetching script. Within those privileges, it could read or modify user-accessible files, access environment vari ...[truncated 326 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every direct and transitive dependency to an exact, reviewed version. 2. Generate and commit a lock file containing cryptographic hashes for all artifacts. 3. Install with hash verification, such as `pip install --require-hashes -r requirements.txt`. 4. Replace the release-candidate translation package with a maintained stable dependency where feasible. 5. Configure `pip` to use only an approved package index over TLS. 6. Add automated dependency vulnerability and provenance scanning to the release process. 7. Re-review and regenerate the lock file whenever a dependency is upgraded. 8. Run the application in a minimally privileged virtual environment or container without unnecessary access to credentials or sensitive files. ]]>
