T08 · Insecure Dependencies
Error
- Location
- SKILL.md:18
- Finding
- Unpinned Global Installation of a Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md`, lines 5 and 18 **Vulnerability Type**: Unpinned third-party dependency with installation-time code execution **Risk Level**: High **Vulnerable Code Snippets**: ```yaml metadata: {"clawdbot":{"emoji":"🏛️","requires":{"bins":["clawdbot"]},"credentials":["LLM_API_KEY","DISCORD_BOT_TOKEN"],"configs":["~/.clawdbot/clawdbot.json"],"install":[{"id":"node","kind":"node","package":"clawdbot","bins":["clawdbot"],"label":"Install Clawdbot"}]}} ``` ```markdown 1. Install Clawdbot: `npm install -g clawdbot` ``` ### Technical Analysis The Skill directs users to install the mutable latest release of the third-party `clawdbot` package globally without an exact version or integrity verification. npm installations may execute package-controlled lifecycle scripts, including `preinstall`, `install`, and `postinstall`. Because neither the metadata installation declaration nor the Quick Start command pins a reviewed release, the effective code installed can change after this Skill has been audited. A compromised maintainer account, malicious package release, registry compromise, or unexpected upstream change could therefore introduce arbitrary code into the installation process. Global installation increases exposure because the package is placed in the user's global npm environment and its executable becomes available through the user's command search path. ### Attack Path 1. An attacker compromises the upstream npm package, its publisher account, or the package's release process. 2. The attacker publishes a modified version containing a malicious lifecycle script or executable. 3. A user follows the documented command `npm install -g clawdbot`, which resolves the latest available release. 4. npm downloads the attacker-controlled release and may execute its lifecycle scripts during installation. 5. The payload runs with the privileges of the user performing the installation. 6 ...[truncated 820 chars]
- Remediation
- ## Remediation Suggestions - Pin `clawdbot` to a specific, reviewed version in both the metadata and installation instructions, such as `clawdbot@X.Y.Z`. - Record and verify the expected package integrity hash or use a lockfile-backed installation workflow. - Document the trusted npm registry and reject unexpected registry overrides. - Review the selected package version and its transitive dependencies before publication. - Prefer a project-local installation over a global installation where feasible. - Run installation in a restricted environment without production credentials. - Consider disabling lifecycle scripts during dependency acquisition with `--ignore-scripts`, followed by an explicit review of any required setup steps. - Establish an update process that requires review and integrity verification before changing the pinned version.
