T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:13
- Finding
- Unpinned Package Execution Through npx<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:13` **Vulnerability Type**: Supply-chain risk from an unpinned executable dependency **Risk Level**: Medium ### Vulnerable Code ```yaml install: "npx clawhub install howtousehumans/foraging-wild-edibles" ``` ### Technical Analysis The installation command invokes `clawhub` through `npx` without specifying an exact package version, integrity hash, lockfile, or trusted artifact digest. Depending on the local npm configuration and cache state, `npx` can download and execute the package version currently published in the configured registry. This creates a mutable execution boundary: the code executed during installation can differ from the code that existed when this Skill was reviewed. Registry-account compromise, malicious package replacement, dependency confusion caused by an untrusted registry, or a compromised transitive dependency could therefore introduce arbitrary executable behavior. The repository itself does not contain evidence that the referenced package is malicious. The finding concerns the unsafe, unpinned execution mechanism. ### Attack Path 1. An attacker compromises the package, its publisher account, a transitive dependency, or the registry used by the victim. 2. The attacker publishes a malicious version that is selected by the unversioned `npx clawhub` invocation. 3. A user follows the installation instruction in `SKILL.md`. 4. `npx` retrieves or resolves the attacker-controlled package version. 5. The package, its entry point, or an installation lifecycle script executes with the privileges of the user performing the installation. ### Impact Assessment Successful exploitation could execute arbitrary commands under the installing user's account. The resulting scope could include: - Reading or modifying files accessible to that user. - Accessing environment variables and locally stored developer credentials. - Modifying project files or user-level configuration. - Maki ...[truncated 357 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions - Pin `clawhub` to an exact, reviewed version rather than allowing mutable version resolution. - Use a lockfile and verify the package's registry integrity metadata. - Prefer a locally installed, reviewed dependency invoked through a package script instead of downloading an executable at invocation time. - Configure npm to use an explicitly trusted registry. - Disable package lifecycle scripts during installation where compatible with the tool. - Publish and verify a cryptographic checksum or signed provenance statement for the expected package artifact. - Re-audit the pinned package and its dependency tree whenever the pinned version changes. ]]>
