T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:81
- Finding
- Unpinned Package Execution Through npx## Vulnerability Details **File Location**: `SKILL.md`, lines 81-84 **Vulnerability Type**: Supply-chain risk from an unpinned executable dependency **Risk Level**: Medium **Vulnerable Code Snippet**: ```markdown ## Installation ```bash npx clawhub@latest install binance-event-contract-risk-manager --dir /workspace/skills ``` ``` ### Technical Analysis The installation procedure directs users to execute the mutable `latest` release of the `clawhub` package through `npx`. The command does not pin an exact reviewed version, verify an integrity hash, use a lockfile, or require inspection of the downloaded package before execution. Because `npx` can retrieve and execute package code, the effective code executed by this command may change after this Skill has been audited. Compromise of the package publisher, registry account, release pipeline, or a future release could consequently introduce arbitrary code into the installation process. ### Attack Path 1. An attacker compromises the package publisher, registry account, release pipeline, or mutable `latest` release. 2. The attacker publishes a malicious package version or modifies package lifecycle behavior. 3. A user follows the documented installation command. 4. `npx` retrieves the attacker-controlled release and executes its package entry point or lifecycle scripts. 5. The malicious package performs actions with the permissions of the invoking user and may modify the specified `/workspace/skills` directory or other user-accessible resources. ### Impact Assessment Successful exploitation could permit arbitrary code execution with the privileges of the user running the installation command. The accessible scope may include modification of installed skills, theft or alteration of user-readable files and environment variables, network access, and execution of additional processes. No privileged execution such as `sudo` is specified, so privilege escalation beyond the inv ...[truncated 53 chars]
- Remediation
- ## Remediation Suggestions - Replace `@latest` with an exact, reviewed package version. - Verify the package using a registry integrity digest or an independently published checksum. - Document the expected registry and package publisher to reduce registry substitution risk. - Review the package contents and lifecycle scripts before execution. - Disable lifecycle scripts during installation where compatible with the package. - Use a lockfile or equivalent immutable dependency manifest. - Perform installation in a restricted environment with minimal filesystem, credential, and network access. - Establish a controlled upgrade process in which each new version is reviewed before the pinned version is changed.
