Back to skill

Security audit

ghl-lead-qualifier

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly aligned with lead qualification, but it can contact leads, modify CRM records, and run an unbundled local script without enough scoping or reviewable controls.

Review before installing. Only use this skill with CRM/API tokens scoped to the minimum needed, confirmed consent for WhatsApp/SMS outreach, clear human approval rules for outbound messages and CRM stage changes, and a reviewed or bundled CRM client instead of the external /root path. Treat the support, finance, PAPI, and operational-routing sections as out of scope unless separately authorized and controlled.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T07 · Tool Hijacking and Spoofing

Warning
Location
SKILL.md:63
Finding
Execution of an Unbundled and Unverifiable External CRM Client## Vulnerability Details **File Location**: `SKILL.md:63-65` **Vulnerability Type**: Execution of an unverified local tool outside the audited package **Risk Level**: Medium ### Vulnerable Code ```bash python3 /root/.hermes/metaads/ghl_client.py --action update_opp_stage --opp-id <OPP_ID> --stage-id <STAGE_ID> ``` ### Technical Analysis The Skill directs the Agent to execute `/root/.hermes/metaads/ghl_client.py`, but this Python client is not included in the audited project. Consequently, its implementation, integrity, network destinations, credential handling, input validation, and side effects cannot be verified from the package. The effective behavior of the Skill therefore depends on mutable code outside its reviewed boundary. If the external file is replaced or modified, the documented command remains legitimate-looking while executing attacker-controlled logic. The absolute path under `/root` also indicates that the client may run in a privileged account context, although the documented command does not itself perform privilege escalation. The placeholders for the opportunity and stage identifiers are not accompanied by validation requirements. Their safety ultimately depends on the missing client implementation. ### Attack Path 1. An attacker, compromised installer, or another process with access to the host modifies or replaces `/root/.hermes/metaads/ghl_client.py`. 2. The Agent loads the Skill and follows its documented CRM-update procedure. 3. The Agent executes the substituted Python client. 4. The malicious client inherits the Agent's execution context and may access environment variables such as `GHL_API_KEY`, `GHL_LOCATION_ID`, and `HABILIS_API_KEY`. 5. The client can misuse those credentials, transmit lead or CRM data, alter unintended records, or perform other actions permitted by the local account. Exploitation requires prior ability to create or modify the referenced external file. The project itself does not contain code ...[truncated 826 chars]
Remediation
## Remediation Suggestions 1. Bundle the CRM client implementation with the Skill so its complete behavior can be reviewed and versioned with the package. 2. Pin the client to an approved version and verify a cryptographic hash or digital signature before execution. 3. Avoid mutable absolute paths outside the package. Resolve the executable from a controlled, read-only installation directory. 4. Run the client under a dedicated, non-root service account with no unnecessary filesystem or system privileges. 5. Grant GHL and Habilis credentials only the minimum API scopes required for lead qualification and opportunity-stage updates. 6. Avoid broadly exporting credentials into the environment when possible. Use a scoped secret provider and ensure secrets are never logged. 7. Validate `OPP_ID` and `STAGE_ID` against strict expected formats and confirm that both belong to the configured GHL location before updating records. 8. Restrict outbound network access to documented API endpoints and log CRM mutations without recording credentials or sensitive message content. 9. Add integrity checks, dependency review, and automated tests covering authorization boundaries and identifier validation. 10. Document the client's expected network requests, required permissions, data retention behavior, and failure modes so the package's security claims can be independently verified.
Vulnerability Patterns
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Credential Access

High
Category
Privilege Escalation
Content
**GHL Lead Qualifier** handles automated conversational triage for inbound leads entering GoHighLevel via webhooks or forms. It qualifies prospects naturally over WhatsApp/SMS, extracts key details (budget, urgency, requirements), and transitions opportunities across CRM Kanban stages.

### 🚀 Quick Onboarding & First-Time Setup
1. **Get your Access Token & GHL Credentials**:
   - Access the developer portal at [https://ia.sthub.com.br](https://ia.sthub.com.br) to generate your access token.
   - Obtain your GHL Private Integration Token and Location ID in your sub-account settings.
2. **Configure Environment Variables**:
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
### 🚀 Quick Onboarding & First-Time Setup
1. **Get your Access Token & GHL Credentials**:
   - Access the developer portal at [https://ia.sthub.com.br](https://ia.sthub.com.br) to generate your access token.
   - Obtain your GHL Private Integration Token and Location ID in your sub-account settings.
2. **Configure Environment Variables**:
   ```bash
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
The README explicitly describes automated WhatsApp/SMS outreach, extraction of budget/urgency/requirements, and CRM stage updates, but it does not warn operators about consent, privacy, retention, lawful basis, or regulatory obligations. In a lead-qualification skill that handles personal and potentially sensitive commercial data, omission of data-handling guidance can lead to unauthorized processing, surprise messaging, and compliance violations.

Natural-Language Policy Violations

Medium
Confidence
82% confidence
Finding
The description and operating instructions are written in Portuguese and the sample opening message is also in Portuguese, suggesting the skill is intended to converse in that language by default. There is no explicit user opt-in, language selection mechanism, or documented regional constraint justifying a fixed language behavior.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The skill is designed to automatically send outbound WhatsApp/SMS messages and mutate CRM records without clearly surfacing that it will contact external parties and change external system state. In an agent setting, hidden side effects can cause unauthorized outreach, accidental customer contact, and unintended workflow changes, especially when triggered by ambiguous lead messages or webhook events.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The manifest describes a skill focused on conversational lead qualification via WhatsApp, extracting budget/niche information, and updating Kanban stages. However, the documented behavior also covers technical support escalation for PAPI instances, active commercial proposal handling, direct product/course sales routing, and classification of system 2FA notifications, which are materially broader operational workflows than lead qualification.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The manifest explicitly advertises autonomous lead messaging and CRM/Kanban updates, but it does not disclose guardrails, consent requirements, approval steps, or user-facing warnings about contacting customers and modifying business records. In a sales/CRM context, this can lead to unauthorized outreach, inaccurate qualification changes, or silent record modifications that affect customer handling and downstream business decisions.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
This markdown file contains operational instructions and examples exclusively in Portuguese, which can impose a fixed language/locale on users or operators. The policy allows locale constraints only when user choice is offered or the regional limitation is clearly documented and justified, neither of which appears here.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The document expands the skill from simple GoHighLevel lead qualification into unrelated operational support, finance, licensing, ERP/PAPI actions, and incident handling. In an agentic workflow, this scope drift can cause the assistant to take or recommend actions on sensitive business systems and customer incidents without the controls, permissions, or validation expected for those domains.

Description-Behavior Mismatch

Low
Confidence
76% confidence
Finding
The manifest says the skill updates Kanban stages, so CRM updates are in scope, but the file specifically instructs invoking an external script at an absolute filesystem path to perform the action. That implementation introduces a broader operational behavior than the manifest conveys, especially because the skill is presented as a conversational qualification logic rather than a wrapper around local script execution.

Intent-Code Divergence

Low
Confidence
78% confidence
Finding
The document labels one section as '## 5. Interesse Direto em Educação & MBA AI' and then appends billing/support action text and tags for 'chamado-finalizado', 'suporte-eunerd', and 'financeiro-pendente', which contradict the stated education-lead intent. The numbering also later repeats sections '## 4' and '## 5', suggesting the documentation does not consistently represent the intended routing behavior.

Static analysis

No suspicious patterns detected.