T08 · Insecure Dependencies
- Location
SKILL.md:27- Finding
Unpinned Third-Party Dependencies Permit Supply-Chain Code Execution
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 27-33
Vulnerability Type: Unpinned package installation and execution
Risk Level: MediumRelevant 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 -ycommand 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
- An attacker compromises the package publisher, a transitive dependency, or the relevant registry account.
- The attacker publishes a malicious release under one of the referenced package names or dependencies.
- A user installs the Skill dependencies using the documented commands.
- The package manager resolves the attacker-controlled release because no exact version or integrity constraint is specified.
- Malicious package installation or lifecycle code executes with the privileges of the user running the command.
- 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
View remediation
Remediation Suggestions
- Pin every direct dependency to an exact, reviewed version.
- Commit lock files that include transitive dependency versions.
- Use integrity verification, such as npm lock-file integrity metadata and pip hash checking with
--require-hashes. - 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> - Replace the mutable
npx -yinvocation with installation of a pinned and reviewed plugin version. - Use trusted registries and consider disabling unnecessary package lifecycle scripts.
- Perform installation inside an isolated, non-administrative environment.
- Regularly scan and review both direct and transitive dependencies before updating pins.
