T08 · Insecure Dependencies
- Location
scripts/publish.sh:104- Finding
Unpinned ClawHub CLI Allows Unreviewed Dependency Execution
- Content
View full analysis
/dev/null; then echo "ERROR: Not logged in to ClawHub. Run: npx clawhub login" exit 1 fi npx clawhub publish "$FOLDER" \ --version "$VERSION" \ --slug "$SLUG" \ --tags "$TAGS" ``` The same unpinned invocation pattern is recommended throughout `SKILL.md`, including lines 13, 31, 69, 80, 85, 103, and 104. ### Technical Analysis The script invokes `npx clawhub` without an exact package version, lockfile, integrity hash, or verification of the executable being run. Depending on the npm environment and package-resolution behavior, `npx` may execute a project-local binary or download a package version that has not been reviewed with this skill. This creates a supply-chain trust boundary at runtime: the code ultimately executed is not fully represented by the audited project. If the resolved npm package, one of its transitive dependencies, or a locally resolved executable is compromised, arbitrary code can run under the publishing user's account. ### Attack Path 1. An attacker compromises a future version or transitive dependency of the npm package resolved as `clawhub`, or places a malicious locally resolvable package in the execution environment. 2. A user runs `scripts/publish.sh` in an environment where the malicious version is selected. 3. The script executes `npx clawhub whoami` and later `npx clawhub publish` without validating the selected package version or integrity. 4. Malicious installation or runtime code executes with the user's operating-system privileges. 5. That code can access files and environment variables available to the user and may misuse authenticated GitHub, npm, or ClawHub credentials available in the environment. ### Impact Assessment Successful exploitation provides arbitrary code ex ...[truncated 440 chars]- Remediation
View remediation
