T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:27
- Finding
- Unpinned Third-Party Dependencies Create a Supply-Chain Risk<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 25–28 and 64–67 **Vulnerability Type**: Unpinned dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash pip install dingtalk-stream requests ``` The same unpinned installation command is also presented by the generated program: ```python except ImportError: print("Please install first: pip install dingtalk-stream") sys.exit(1) ``` ### Technical Analysis The Skill directs users to install `dingtalk-stream` and `requests` without specifying reviewed versions, cryptographic hashes, a lock file, or a trusted package index. Consequently, the code installed by this command may change after the Skill has been reviewed. This is not direct evidence that either named package is malicious. The vulnerability is the absence of dependency integrity controls. If a package release, maintainer account, dependency, or configured package index is compromised, following the documented installation process could execute attacker-controlled package installation or runtime code. These dependencies operate in a process that receives DingTalk messages and has access to `APP_KEY`, `APP_SECRET`, `OPENCLAW_TOKEN`, and `WEBHOOK_URL`. A compromised dependency would therefore execute within a sensitive trust boundary. ### Attack Path 1. An attacker compromises a dependency release, transitive dependency, maintainer account, or Python package index used by the operator. 2. The operator follows the Skill and runs `pip install dingtalk-stream requests`. 3. Because no version or hash is enforced, `pip` retrieves the currently resolved package artifacts. 4. Malicious installation or runtime code executes with the privileges of the user running the bot. 5. The malicious component reads application credentials, tokens, webhook information, or conversation content and misuses or exfiltrates them. ### Impact Assessment Successful exploitation would provide code execution with the operating-s ...[truncated 437 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin every direct dependency to an explicitly reviewed version. - Generate and distribute a dependency lock file that includes transitive dependencies. - Require package hashes, such as by using `pip install --require-hashes -r requirements.txt`. - Install only from an explicitly configured and trusted package index. - Perform dependency vulnerability and provenance checks before publishing updates. - Run the bot in a dedicated virtual environment and under a minimally privileged operating-system account. - Regularly review and deliberately update pinned versions instead of resolving arbitrary current releases at installation time. Example hardened requirements: ```text dingtalk-stream==<reviewed-version> --hash=sha256:<verified-hash> requests==<reviewed-version> --hash=sha256:<verified-hash> ``` ]]>
