T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:29
- Finding
- Unpinned Third-Party Dependencies Create a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:29` and `references/workflow-details.md:86` **Vulnerability Type**: Unpinned and hash-unverified dependency installation **Risk Level**: Medium ### Vulnerable Code From `SKILL.md:29`: ```bash pip install requests ddgs langextract ``` From `references/workflow-details.md:86`: ```bash pip install ddgs ``` ### Technical Analysis The documented installation commands retrieve the latest versions of the named packages and their transitive dependencies. The project provides no version constraints, lock file, package hashes, or trusted-index restrictions. Consequently, the dependency graph installed by users can change after this Skill has been reviewed. If a package publisher account, release process, package repository, or transitive dependency is compromised, an attacker could distribute code that executes during package installation or when the package is imported. The affected dependencies are subsequently imported and used by the Skill, including `requests`, `ddgs`, and `langextract`. This makes dependency integrity part of the Skill's effective security boundary. ### Attack Path 1. An attacker compromises a named package, a transitive dependency, or its package-publishing account. 2. The attacker publishes a malicious release with a version newer than the previously legitimate release. 3. A user follows the documented unpinned `pip install` command. 4. The package resolver selects and downloads the malicious release. 5. Malicious code executes during installation or when the Skill imports the affected package. 6. The malicious dependency operates with the privileges of the user running the installation or Skill. ### Impact Assessment Successful exploitation could permit arbitrary Python code execution with the installing or invoking user's privileges. Depending on that user's environment, the malicious dependency could: - Read local files accessible to the user. - Access environment var ...[truncated 476 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Create a reviewed dependency file containing exact versions, for example: ```text requests==REVIEWED_VERSION ddgs==REVIEWED_VERSION langextract==REVIEWED_VERSION ``` 2. Generate and retain cryptographic hashes for every direct and transitive dependency. 3. Require hash verification during installation: ```bash python -m pip install --require-hashes -r requirements.txt ``` 4. Use a lock-generation tool such as `pip-tools`, Poetry, or an equivalent reproducible dependency manager. 5. Configure an approved package index and disable unintended extra indexes where practical. 6. Run dependency vulnerability and provenance checks in CI. 7. Review and update locked dependencies through a controlled process rather than resolving unrestricted latest versions during installation. 8. Update both installation references so users are directed to the locked dependency file. ]]>
