T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:12
- Finding
- Unpinned Claude Code npm Dependency## Vulnerability Details **File Location**: `SKILL.md`, line 12 **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium **Complete Code Snippet**: ```yaml metadata: {"clawdbot":{"emoji":"🤖","requires":{"bins":["claude","jq"]},"install":[{"id":"claude","kind":"npm","package":"@anthropic-ai/claude-code","bins":["claude"],"label":"Install Claude Code (npm)"},{"id":"jq","kind":"brew","formula":"jq","bins":["jq"],"label":"Install jq (brew)"}]}} ``` ### Technical Analysis The installation metadata references `@anthropic-ai/claude-code` without an exact version or integrity hash. Consequently, installation may resolve whichever package release the registry serves at that time rather than the release reviewed with this Skill. Although the package name uses Anthropic's expected npm scope and no malicious package behavior is demonstrated in the audited files, the absence of version and integrity pinning creates supply-chain exposure. A compromised publisher account, registry response, or future malicious release could cause unreviewed executable code to be installed. ### Attack Path 1. An attacker compromises the npm package publisher, package distribution process, or registry delivery path. 2. The attacker publishes or serves an altered release under `@anthropic-ai/claude-code`. 3. A user installs the dependency through this Skill's unpinned installation declaration. 4. The installer resolves the attacker-controlled release because no exact version or integrity value is required. 5. Malicious code executes during package installation or when `scripts/invoke-claude.sh` invokes the `claude` binary. 6. The payload operates with the privileges of the host user and may inherit the environment and Claude Code permissions available to that user. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of the account installing or invoking Claude Code. ...[truncated 375 chars]
- Remediation
- ## Remediation Suggestions - Pin `@anthropic-ai/claude-code` to a reviewed exact version rather than allowing mutable version resolution. - Record and verify the package integrity hash through an npm lockfile or equivalent verified installation mechanism. - Avoid version ranges and automatic installation of the latest release. - Validate package provenance and signatures where supported. - Review release artifacts and dependency changes before updating the pinned version. - Perform installation with the minimum required operating-system privileges and isolate package lifecycle scripts where feasible. - Document a controlled update process that includes vulnerability scanning and functional review before changing the pin.
