T08 · Insecure Dependencies
Warning
- Location
- README.md:30
- Finding
- Unpinned Packages and Mutable Remote Sources Executed Through npx<![CDATA[ ## Vulnerability Details **File Locations**: - `README.md:30` - `README.md:36` - `SKILL.md:21` - `SKILL.md:74` **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: Medium ### Vulnerable Code ```bash # README.md:30 npx add https://github.com/wpank/ai/tree/main/skills/frontend/expo-native-ui # README.md:36 and SKILL.md:21 npx clawhub@latest install expo-native-ui # SKILL.md:74 npx expo start # Scan QR with Expo Go ``` ### Technical Analysis The documented commands use `npx` to retrieve and execute npm packages without pinning them to reviewed, immutable versions. In particular: - `clawhub@latest` explicitly selects whichever release currently owns the `latest` distribution tag. - `npx expo start` may download and execute the current matching package when Expo is not already installed locally. - `npx add` invokes an implicitly versioned package named `add`. - The GitHub installation source refers to a mutable repository branch path rather than an immutable commit. Packages executed through `npx` can run package code and lifecycle behavior with the permissions of the invoking user. Consequently, the effective executable content can change after the Skill has been reviewed. This is a supply-chain weakness rather than evidence that the currently referenced packages are malicious. ### Attack Path 1. An attacker compromises the npm account, package publication pipeline, distribution tag, or mutable GitHub repository referenced by the documentation. 2. The attacker publishes malicious package code or replaces repository content while retaining the expected package name or URL. 3. A user or AI agent follows the Skill's installation or startup instructions. 4. `npx` resolves and downloads the current remote content. 5. The downloaded package executes under the user's account. 6. The payload can access files, environment variables, network resources, and processes available to that user. ### Impact Assessment Successful expl ...[truncated 654 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace `@latest` and implicit package versions with exact, reviewed versions. 2. Reference GitHub content by an immutable commit hash rather than a mutable branch. 3. Document package provenance and expected integrity hashes. 4. Install dependencies into the project under a committed lockfile before invoking them. 5. Prefer deterministic installation commands such as `npm ci`. 6. Configure CI to verify lockfile integrity and reject unexpected dependency changes. 7. Review package lifecycle scripts before installation and use `--ignore-scripts` where lifecycle execution is unnecessary. 8. Replace the ambiguous `npx add` command with an explicitly identified, pinned, and verified installer. ]]>
