Back to skill

Security audit

Dex

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (3)

T08 · Insecure Dependencies

Error
Location
SKILL.md:25
Finding

Unpinned npm packages are downloaded and executed during setup

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:46
Finding

MCP setup modifies every detected AI client instead of the selected client

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:82
Finding

Bearer credential is duplicated across two plaintext files and shared configuration handling is underspecified

Content
View full analysis
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) ``` ```bash install -d -m 700 ~/.dex ~/.clihub umask 077 ``` ```markdown - `~/.dex/api-key` — raw `dex_…` bytes, mode `600`, no trailing commentary - `~/.clihub/credentials.json` — mode `600`, this schema (CLI source of truth): ```json { "version": 2, "servers": { "https://mcp.getdex.com/mcp": { "type": "bearer", "auth_type": "bearer_token", "token": "" } } } ``` ``` ```markdown For CI/automation with no human present, use the API key method with `DEX_API_KEY` environment variable **and** the credentials file above. ``` ### Technical Analysis The Skill identifies `~/.clihub/credentials.json` as the current CLI source of truth but still directs the agent to store the same reusable bearer credential in `~/.dex/api-key`. This duplicates a sensitive secret and increases the number of locations that must be protected, excluded from backups, monitored, rotated, and securely deleted. The specified `0700` directory permissions, `0600` file permissions, restrictive `umask`, and warnings against printing credentia ...[truncated 2397 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
Findings (111)

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 84)May include surrounding context.

md
**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.

Credential Access

High
Category
Privilege Escalation
Confidence
91% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 96)May include surrounding context.

md
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):**

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 139)May include surrounding context.

text

   - `~/.dex/api-key` — raw `dex_…` bytes, mode `600`, no trailing commentary
   - `~/.clihub/credentials.json` — mode `600`, this schema (CLI source of truth):

   ```json
   {

Credential Access

High
Category
Privilege Escalation
Confidence
88% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 156)May include surrounding context.

md
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.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 199)May include surrounding context.

md
See **[CLI Command Reference](references/cli-commands.md)** for the full mapping table of all 53 tools to CLI commands.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 444)May include surrounding context.

md
See **[CLI Command Reference](references/cli-commands.md)** for the full mapping table of all 53 tools to CLI commands.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 85)May include surrounding context.

md
**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.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 85)May include surrounding context.

md
**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.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

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.

Content

Scanner excerpt · SKILL.md (reported line 90)May include surrounding context.

md
**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:**

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 96)May include surrounding context.

md
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):**

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 105)May include surrounding context.

  1. Request a device code:

    bash
    curl -s -X POST https://mcp.getdex.com/device/code \
      -H "Content-Type: application/json" \
      -H "Accept: application/json" \
      -H "User-Agent: dex-cli"
    

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/cli-commands.md (reported line 16)May include surrounding context.

md
## Command Mapping

| MCP Tool                                    | CLI Command                                                                                                           |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex_search_contacts`                       | `dex dex-search-contacts --query "..."`                                                                               |
| `dex_list_contacts`                         | `dex dex-list-contacts --limit 100`                                                                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/tools-reference.md (reported line 909)May include surrounding context.

md
## Command Mapping

| MCP Tool                                    | CLI Command                                                                                                           |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex_search_contacts`                       | `dex dex-search-contacts --query "..."`                                                                               |
| `dex_list_contacts`                         | `dex dex-list-contacts --limit 100`                                                                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/tools-reference.md (reported line 1024)May include surrounding context.

md
## Command Mapping

| MCP Tool                                    | CLI Command                                                                                                           |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `dex_search_contacts`                       | `dex dex-search-contacts --query "..."`                                                                               |
| `dex_list_contacts`                         | `dex dex-list-contacts --limit 100`                                                                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/cli-commands.md (reported line 19)May include surrounding context.

md
| 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 "..."`                                                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/cli-commands.md (reported line 35)May include surrounding context.

md
| 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 "..."`                                                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/tools-reference.md (reported line 245)May include surrounding context.

md
| 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 "..."`                                                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/tools-reference.md (reported line 1025)May include surrounding context.

md
| 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 "..."`                                                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/cli-commands.md (reported line 20)May include surrounding context.

md
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `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 "..."`                                                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/cli-commands.md (reported line 32)May include surrounding context.

md
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `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 "..."`                                                                   |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/cli-commands.md (reported line 31)May include surrounding context.

md
| `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 "..."`                                                                      |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/cli-commands.md (reported line 33)May include surrounding context.

md
| `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"`                                              |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/tools-reference.md (reported line 78)May include surrounding context.

md
| `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"`                                              |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

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.

Content

Scanner excerpt · references/cli-commands.md (reported line 38)May include surrounding context.

md
| `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 "..."`                                                                  |