T08 · Insecure Dependencies
- Location
SKILL.md:25- Finding
Unpinned npm packages are downloaded and executed during setup
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Dex CRM assistant, but its setup and authentication instructions grant broad local integration and persistent bearer-token access that users should review before installing.
Install only if you are comfortable giving Dex and configured AI clients access to CRM data, connected email metadata, and calendar operations. Prefer MCP browser OAuth or a single explicitly selected client, avoid unattended all-client setup, pin or review npm package versions where possible, and treat the local Dex token files as sensitive secrets that may need rotation or cleanup.
SKILL.md:25Unpinned npm packages are downloaded and executed during setup
SKILL.md:46MCP setup modifies every detected AI client instead of the selected client
SKILL.md:82Bearer credential is duplicated across two plaintext files and shared configuration handling is underspecified
The skill contains detailed instructions to read and write bearer credentials in ~/.clihub/credentials.json, including the token schema and storage path. In an agent context, any workflow that handles raw long-lived tokens creates a real secret-exposure risk through tool logs, chat transcripts, local file access, or unintended reuse by other processes.
**Where credentials actually live:**
- `@getdex/cli` reads `~/.clihub/credentials.json` (`auth_type: bearer_token`, `token: dex_…`).
- Some docs and older agents only write `~/.dex/api-key`. That file is **not** what the CLI sends on MCP calls.
- After device-code or API-key setup, write **both** files, or the next `dex …` call will 401.
This section instructs writing the API key to both ~/.dex/api-key and ~/.clihub/credentials.json. Duplicating a long-lived credential across multiple files increases the attack surface and persistence of compromise if the endpoint, tool logs, or another local process can access those paths.
1. User generates a key at [Dex Settings > Integrations](https://getdex.com/appv3/settings/api) (requires Professional plan)
2. Ask the user to save it in their own terminal, or write both files below from a local script that never prints the value
3. Destinations: `~/.dex/api-key` (chmod 600) **and** `~/.clihub/credentials.json` (chmod 600)
**Option 2 — Device Code Flow (works on remote/headless machines):**
The embedded JSON schema explicitly shows where the bearer token is stored and how it is represented, making it straightforward for an agent or local process to persist and potentially leak a reusable authentication secret. In a CRM skill with access to contacts, notes, emails, and calendars, compromise of that token could expose sensitive relationship and communication data.
- `~/.dex/api-key` — raw `dex_…` bytes, mode `600`, no trailing commentary
- `~/.clihub/credentials.json` — mode `600`, this schema (CLI source of truth):
```json
{
Even though this section warns about not exposing the /device/token response, it still directs the workflow around a successful token exchange and local credential persistence. The context makes clear the author is trying to reduce leakage, but the skill still enables secret handling in an execution surface that may not adequately isolate logs or transcripts.
If the execution surface cannot keep the successful `/device/token` response out of chat or tool logs, stop and ask the user to finish in their own terminal.
5. Verify with `dex dex-list-tags` (or another read). If that 401s, `~/.clihub/credentials.json` was not updated.
There is no `dex auth login` subcommand in current `@getdex/cli` (1.0.x) even if some READMEs mention it. Use this HTTP device flow.
Referenced artifact was not completely inspected
See **[CLI Command Reference](references/cli-commands.md)** for the full mapping table of all 53 tools to CLI commands.
Referenced artifact was not completely inspected
See **[CLI Command Reference](references/cli-commands.md)** for the full mapping table of all 53 tools to CLI commands.
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
This duplicate finding refers to the same persistence behavior: storing API keys in durable files for future CLI use. While operationally convenient, it creates recoverable session state that can be harvested later by other tools, malware, or an over-privileged agent session.
**Where credentials actually live:**
- `@getdex/cli` reads `~/.clihub/credentials.json` (`auth_type: bearer_token`, `token: dex_…`).
- Some docs and older agents only write `~/.dex/api-key`. That file is **not** what the CLI sends on MCP calls.
- After device-code or API-key setup, write **both** files, or the next `dex …` call will 401.
**Cloudflare:** every request to `mcp.getdex.com` must send `User-Agent: dex-cli`. Bare `curl` with no UA returns Cloudflare **1010** (`browser_signature_banned`). That is not an expired code and not a Dex 401.
This duplicate finding refers to the same persistence behavior: storing API keys in durable files for future CLI use. While operationally convenient, it creates recoverable session state that can be harvested later by other tools, malware, or an over-privileged agent session.
**Where credentials actually live:**
- `@getdex/cli` reads `~/.clihub/credentials.json` (`auth_type: bearer_token`, `token: dex_...`).
- Some docs and older agents only write `~/.dex/api-key`. That file is **not** what the CLI sends on MCP calls.
- After device-code or API-key setup, write **both** files, or the next `dex ...` call will 401.
**Cloudflare:** every request to `mcp.getdex.com` must send `User-Agent: dex-cli`. Bare `curl` with no UA returns Cloudflare **1010** (`browser_signature_banned`). That is not an expired code and not a Dex 401.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
**Cloudflare:** every request to `mcp.getdex.com` must send `User-Agent: dex-cli`. Bare `curl` with no UA returns Cloudflare **1010** (`browser_signature_banned`). That is not an expired code and not a Dex 401.
Never ask the user to paste an API key into chat. Do not print, log, commit, or include it in tool arguments that will be shown back to the user. `dex auth --token <key>` puts the secret on the process argv — do not run that from an agent.
**Option 1 — API Key:**
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
1. User generates a key at [Dex Settings > Integrations](https://getdex.com/appv3/settings/api) (requires Professional plan)
2. Ask the user to save it in their own terminal, or write both files below from a local script that never prints the value
3. Destinations: `~/.dex/api-key` (chmod 600) **and** `~/.clihub/credentials.json` (chmod 600)
**Option 2 — Device Code Flow (works on remote/headless machines):**
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
Request a device code:
curl -s -X POST https://mcp.getdex.com/device/code \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "User-Agent: dex-cli"
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
## Command Mapping
| MCP Tool | CLI Command |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex_search_contacts` | `dex dex-search-contacts --query "..."` |
| `dex_list_contacts` | `dex dex-list-contacts --limit 100` |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
## Command Mapping
| MCP Tool | CLI Command |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex_search_contacts` | `dex dex-search-contacts --query "..."` |
| `dex_list_contacts` | `dex dex-list-contacts --limit 100` |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
## Command Mapping
| MCP Tool | CLI Command |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex_search_contacts` | `dex dex-search-contacts --query "..."` |
| `dex_list_contacts` | `dex dex-list-contacts --limit 100` |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| MCP Tool | CLI Command |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex_search_contacts` | `dex dex-search-contacts --query "..."` |
| `dex_list_contacts` | `dex dex-list-contacts --limit 100` |
| `dex_get_contact` | `dex dex-get-contact --id "..."` |
| `dex_create_contact` | `dex dex-create-contact --first-name "..." --last-name "..."` |
| `dex_update_contact` | `dex dex-update-contact --id "..." --company "..."` |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| MCP Tool | CLI Command |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex_search_contacts` | `dex dex-search-contacts --query "..."` |
| `dex_list_contacts` | `dex dex-list-contacts --limit 100` |
| `dex_get_contact` | `dex dex-get-contact --id "..."` |
| `dex_create_contact` | `dex dex-create-contact --first-name "..." --last-name "..."` |
| `dex_update_contact` | `dex dex-update-contact --id "..." --company "..."` |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| MCP Tool | CLI Command |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex_search_contacts` | `dex dex-search-contacts --query "..."` |
| `dex_list_contacts` | `dex dex-list-contacts --limit 100` |
| `dex_get_contact` | `dex dex-get-contact --id "..."` |
| `dex_create_contact` | `dex dex-create-contact --first-name "..." --last-name "..."` |
| `dex_update_contact` | `dex dex-update-contact --id "..." --company "..."` |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| MCP Tool | CLI Command |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex_search_contacts` | `dex dex-search-contacts --query "..."` |
| `dex_list_contacts` | `dex dex-list-contacts --limit 100` |
| `dex_get_contact` | `dex dex-get-contact --id "..."` |
| `dex_create_contact` | `dex dex-create-contact --first-name "..." --last-name "..."` |
| `dex_update_contact` | `dex dex-update-contact --id "..." --company "..."` |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex_search_contacts` | `dex dex-search-contacts --query "..."` |
| `dex_list_contacts` | `dex dex-list-contacts --limit 100` |
| `dex_get_contact` | `dex dex-get-contact --id "..."` |
| `dex_create_contact` | `dex dex-create-contact --first-name "..." --last-name "..."` |
| `dex_update_contact` | `dex dex-update-contact --id "..." --company "..."` |
| `dex_complete_keep_in_touch` | `dex dex-complete-keep-in-touch --contact-id "..."` |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex_search_contacts` | `dex dex-search-contacts --query "..."` |
| `dex_list_contacts` | `dex dex-list-contacts --limit 100` |
| `dex_get_contact` | `dex dex-get-contact --id "..."` |
| `dex_create_contact` | `dex dex-create-contact --first-name "..." --last-name "..."` |
| `dex_update_contact` | `dex dex-update-contact --id "..." --company "..."` |
| `dex_complete_keep_in_touch` | `dex dex-complete-keep-in-touch --contact-id "..."` |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| `dex_filter_contacts` | `dex dex-filter-contacts --company "..." --tags "Investor"` |
| `dex_add_related_contacts` | `dex dex-add-related-contacts --contact-id "..." --contact-ids "c1,c2"` |
| `dex_remove_related_contacts` | `dex dex-remove-related-contacts --contact-id "..." --contact-ids "c1"` |
| `dex_list_tags` | `dex dex-list-tags` |
| `dex_get_tag` | `dex dex-get-tag --tag-id "..."` |
| `dex_create_tag` | `dex dex-create-tag --name "..."` |
| `dex_update_tag` | `dex dex-update-tag --tag-id "..." --name "..."` |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| `dex_remove_related_contacts` | `dex dex-remove-related-contacts --contact-id "..." --contact-ids "c1"` |
| `dex_list_tags` | `dex dex-list-tags` |
| `dex_get_tag` | `dex dex-get-tag --tag-id "..."` |
| `dex_create_tag` | `dex dex-create-tag --name "..."` |
| `dex_update_tag` | `dex dex-update-tag --tag-id "..." --name "..."` |
| `dex_delete_tag` | `dex dex-delete-tag --tag-id "..."` |
| `dex_add_tags_to_contacts` | `dex dex-add-tags-to-contacts --tag-ids "id1,id2" --contact-ids "c1,c2"` |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| `dex_remove_related_contacts` | `dex dex-remove-related-contacts --contact-id "..." --contact-ids "c1"` |
| `dex_list_tags` | `dex dex-list-tags` |
| `dex_get_tag` | `dex dex-get-tag --tag-id "..."` |
| `dex_create_tag` | `dex dex-create-tag --name "..."` |
| `dex_update_tag` | `dex dex-update-tag --tag-id "..." --name "..."` |
| `dex_delete_tag` | `dex dex-delete-tag --tag-id "..."` |
| `dex_add_tags_to_contacts` | `dex dex-add-tags-to-contacts --tag-ids "id1,id2" --contact-ids "c1,c2"` |
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.
| `dex_delete_tag` | `dex dex-delete-tag --tag-id "..."` |
| `dex_add_tags_to_contacts` | `dex dex-add-tags-to-contacts --tag-ids "id1,id2" --contact-ids "c1,c2"` |
| `dex_remove_tags_from_contacts` | `dex dex-remove-tags-from-contacts --tag-ids "id1" --contact-ids "c1"` |
| `dex_list_groups` | `dex dex-list-groups` |
| `dex_get_group` | `dex dex-get-group --group-id "..."` |
| `dex_create_group` | `dex dex-create-group --name "..." --emoji "🚀"` |
| `dex_update_group` | `dex dex-update-group --group-id "..." --name "..."` |