T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:91
- Finding
- Unpinned Third-Party CLI Installation with Credential Access## Vulnerability Details **File Location**: `SKILL.md`, lines 91–94 **Vulnerability Type**: Unpinned and insufficiently verified third-party dependency **Risk Level**: Medium ### Vulnerable Code Snippet ```markdown - x-cli (optional, preferred for agent use): - Install: `uv tool install x-cli` (or from source) - Configure credentials in `~/.config/x-cli/.env` (supports shared setup with x-mcp) - If present, `lastxdays_ingest.js` uses it before raw API/archive for X search ``` ### Technical Analysis The Skill recommends installing `x-cli` without specifying an audited version, package index, source repository, integrity hash, or signature. The alternative instruction to install it “from source” likewise does not identify a trusted repository or commit. This is particularly sensitive because the installed CLI is subsequently configured with credentials stored in `~/.config/x-cli/.env` and is preferred over the raw API and local archive methods. A substituted, typosquatted, or compromised package could execute with the Agent's user-level privileges and attempt to read those credentials or other files accessible to the same account. The audit did not establish that the referenced package is malicious. The vulnerability is the absence of dependency pinning and provenance controls around a credential-bearing third-party component. ### Attack Path 1. A user or Agent follows the documented `uv tool install x-cli` instruction. 2. Package resolution selects a malicious, compromised, or otherwise unexpected release because no version, trusted source, hash, or signature is specified. 3. The package executes during installation or when the Skill invokes `x-cli`. 4. The process runs with the Agent's user-level permissions. 5. It accesses `~/.config/x-cli/.env`, inherited environment variables, or other user-readable data. 6. It may misuse X credentials, make unauthorized requests, or transmit accessible information over the network. This path depends on comp ...[truncated 772 chars]
- Remediation
- ## Remediation Suggestions 1. Pin `x-cli` to a reviewed, known-good version rather than installing the latest available release. 2. Specify the official package registry or source repository explicitly. 3. For source installations, pin an audited commit and verify a cryptographic hash or signed release. 4. Document the expected publisher, package identifier, and integrity verification procedure. 5. Do not automatically prefer an installed executable solely because it is present; verify its resolved path, ownership, version, and provenance first. 6. Run the CLI in a restricted environment with access only to the credentials and files required for the requested X search. 7. Use a dedicated, minimally scoped X credential instead of credentials shared with unrelated tools. 8. Restrict permissions on `~/.config/x-cli/.env` and avoid exposing unrelated environment variables to the child process. 9. Prefer direct, documented API integration where dependency provenance and outbound endpoints can be controlled and audited. 10. Add the referenced ingestion scripts to the reviewed artifact so their credential handling, endpoint validation, output redaction, and subprocess execution can be independently audited.
