- Location
- SKILL.md:9
- Finding
- Auto-Downloaded npm CLI Executes Unreviewed Third-Party Code During Sensitive Operations## Vulnerability Details
**File Location**: `SKILL.md:9`
**Vulnerability Type**: Supply-chain exposure through automatic retrieval and execution of an unreviewed npm package
**Risk Level**: Medium
### Vulnerable Code
```markdown
A comprehensive set of 7 AI agent skills for the [Leapcat](https://leapcat.ai) platform. All commands use `npx leapcat@0.1.1` — no global install needed, just Node.js 18+.
```
Representative sensitive invocation from `leapcat-trading/SKILL.md:20-34`:
```bash
npx leapcat@0.1.1 trading place-order \
--symbol <symbol> \
--exchange <exchange> \
--side <BUY|SELL> \
--order-type <LIMIT|MARKET> \
--quantity <qty> \
[--price <price>] \
[--source <source>] \
[--stock-name <name>] \
[--idempotency-key <key>] \
--json
```
Representative sensitive invocation from `leapcat-wallet/SKILL.md:55-65`:
```bash
npx leapcat@0.1.1 wallet withdraw --amount <amount> --address <address> --json
```
The same execution pattern occurs throughout:
- `SKILL.md:39-40,46-47,53-55,63`
- `leapcat-auth/SKILL.md:13,23,34,49,57,65,73,81,89,97,105`
- `leapcat-ipo/SKILL.md:13-14,25,33,44,56,68,79,87`
- `leapcat-kyc/SKILL.md:13-14,24,40,48,56,64,77,85,93,101,110-111`
- `leapcat-market/SKILL.md:13,23,35,48,61,73,81,89,101,109,117`
- `leapcat-portfolio/SKILL.md:13-14,23,31`
- `leapcat-trading/SKILL.md:13-14,25-34,54,66,77,85`
- `leapcat-wallet/SKILL.md:13-15,25,33,41,49,60,72,80,88,96,107,114`
### Technical Analysis
The project consists only of Skill documentation and does not include the implementation of the `leapcat` CLI. Every documented operation delegates execution to `npx leapcat@0.1.1`. When the package is not already available locally, `npx` can retrieve it from the configured npm registry and execute its package code.
Pinning version `0.1.1` reduces uncontrolled version drift, but it does not establish the integrity or trustworthiness of that package version. The reviewed artifact contains no lockfile, expected package-tarball integrity h
...[truncated 2697 chars]
- Remediation
- ## Remediation Suggestions
1. **Vendor and audit the implementation**
- Include the exact CLI source used by the Skill in the reviewed repository.
- Build the executable from reviewed source rather than downloading executable code during each operation.
2. **Verify package integrity**
- Publish and enforce the expected SHA-512 integrity value for the exact npm tarball.
- Use a lockfile or controlled installation process that rejects artifacts whose integrity does not match.
- Do not rely on a version number alone as an integrity control.
3. **Establish build provenance**
- Sign release artifacts.
- Publish verifiable provenance linking version `0.1.1` to a specific source commit and reproducible build.
- Verify signatures and provenance before installation or execution.
4. **Avoid on-demand installation for sensitive commands**
- Install the verified artifact in a separate administrative step.
- Make financial commands use only that preverified local executable.
- Disable lifecycle scripts where they are unnecessary.
5. **Restrict runtime privileges**
- Run the CLI in a sandbox with access only to explicitly selected KYC files.
- Restrict filesystem access to the minimum required configuration directory.
- Restrict outbound network access to documented Leapcat API and upload endpoints.
- Do not run the package with elevated operating-system privileges.
6. **Protect authentication material**
- Replace plaintext token-file storage with operating-system-backed credential storage where possible.
- Enforce owner-only permissions on any fallback token file.
- Support rapid token revocation and session review.
- Avoid exposing OTP codes, trade passwords, or tokens in command histories, logs, or JSON output.
7. **Add transaction confirmation controls**
- Immediately before execution, require explicit user approval showing the final symbol, exchange, side, order type, quantity, price, estimated value, and fee
...[truncated 287 chars]