T08 · Insecure Dependencies
- Location
- README.md:13
- Finding
- Mutable third-party package executed through npx @latest<![CDATA[ ## Vulnerability Details **File Location**: `README.md:13`, `README.md:19-24`, and `README.md:31-36` **Vulnerability Type**: Supply-chain risk caused by unpinned package execution **Risk Level**: Medium The documented authentication and publishing workflows execute the mutable `latest` release of the third-party `clawhub` package: ```bash npx clawhub@latest auth login --token "clh_..." --no-browser --registry "https://www.clawhub.ai/" ``` ```bash npx clawhub@latest publish ./clawhub-organizer \ --slug popup-organizer \ --name "PopUp Organizer" \ --version 1.0.0 \ --changelog "Initial release: vendor search, event management, inquiries, invoices, saved vendors, profile" \ --tags "events,vendors,food-trucks,marketplace,booking,invoicing,organizer" ``` ```bash npx clawhub@latest publish ./clawhub-organizer \ --slug popup-organizer \ --name "PopUp Organizer" \ --version 1.1.0 \ --changelog "Description of changes" \ --tags "events,vendors,food-trucks,marketplace,booking,invoicing,organizer" ``` ### Technical Analysis The `@latest` version specifier is mutable and does not identify a specific reviewed package release. When these commands are run, `npx` may download and execute whichever package version the registry currently designates as the latest release. Consequently, the code executed by the documented workflow can change after this skill has been reviewed. If the package publisher account, package distribution process, or registry is compromised—or if a future release contains a malicious or unexpectedly unsafe lifecycle/runtime behavior—the downloaded package could execute attacker-controlled JavaScript under the invoking user's account. No malicious dependency is present in the audited project itself; this finding concerns the unsafe dependency-execution procedure documented in `README.md`. ### Attack Path 1. An attacker compromises the `clawhub` package publisher, its release pipeline, or the package source served by t ...[truncated 1068 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace `clawhub@latest` with an exact, reviewed version, for example: ```bash npx --yes clawhub@1.0.0 auth login ... ``` The actual version should be selected only after review rather than copied from this illustrative example. 2. Record and review upgrades explicitly instead of allowing the `latest` tag to change executable behavior automatically. 3. Where supported, install dependencies through a lockfile-backed workflow and enforce package integrity hashes. 4. Verify package provenance, publisher identity, signatures, and registry configuration before execution. 5. Run publishing tools in a minimally privileged, isolated environment with access only to the files and credentials required for publication. 6. Configure CI systems to use a pinned tool version and narrowly scoped, short-lived publication credentials. ]]>
