T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:27
- Finding
- Unpinned Third-Party Dependencies Permit Supply-Chain Code Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 27-33 **Vulnerability Type**: Unpinned package installation and execution **Risk Level**: Medium **Relevant code snippet**: ```yaml "command": "npx -y @larksuite/openclaw-lark-tools install", "label": "Install official Lark/Feishu plugin", ``` ```yaml "command": "pip3 install requests feedparser", "label": "Install Python dependencies (requests + feedparser)", ``` ### Technical Analysis The installation commands do not pin exact package versions or verify package integrity. The `npx -y` command automatically downloads and executes the package version selected by the registry at installation time. The pip command similarly resolves mutable package releases without a lock file or cryptographic hashes. Consequently, the code executed during installation can differ from the code that was reviewed. A compromised package publisher, registry account, transitive dependency, or newly published malicious release could introduce arbitrary installation-time code. This exceeds the trust assumptions appropriate for a reviewed Skill because its effective executable dependency set remains mutable. ### Attack Path 1. An attacker compromises the package publisher, a transitive dependency, or the relevant registry account. 2. The attacker publishes a malicious release under one of the referenced package names or dependencies. 3. A user installs the Skill dependencies using the documented commands. 4. The package manager resolves the attacker-controlled release because no exact version or integrity constraint is specified. 5. Malicious package installation or lifecycle code executes with the privileges of the user running the command. 6. If the installation is combined with the separately documented privilege-escalation advice, the malicious code may execute with administrative privileges. ### Impact Assessment Under ordinary installation, malicious dependency cod ...[truncated 510 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every direct dependency to an exact, reviewed version. 2. Commit lock files that include transitive dependency versions. 3. Use integrity verification, such as npm lock-file integrity metadata and pip hash checking with `--require-hashes`. 4. Install Python dependencies from a reviewed requirements file, for example: ```text requests==<reviewed-version> --hash=sha256:<reviewed-hash> feedparser==<reviewed-version> --hash=sha256:<reviewed-hash> ``` 5. Replace the mutable `npx -y` invocation with installation of a pinned and reviewed plugin version. 6. Use trusted registries and consider disabling unnecessary package lifecycle scripts. 7. Perform installation inside an isolated, non-administrative environment. 8. Regularly scan and review both direct and transitive dependencies before updating pins.
