T09 · Insecure Skill Coding Practices
- Location
scripts/ghl-api.py:52- Finding
Bearer Token Exposure Through Unrestricted HTTP Redirects in the API Client
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent GoHighLevel CRM integration, but it can modify live customer, billing, messaging, and account data using a bearer token without strong safeguards.
Review before installing. Use a least-privilege sub-account token, not an agency-wide token unless necessary. Treat all send, delete, invoice, payment, workflow, social posting, and account-management actions as live production changes and require your own confirmation workflow. Consider patching or wrapping the scripts to block cross-origin redirects before using sensitive tokens.
scripts/ghl-api.py:52Bearer Token Exposure Through Unrestricted HTTP Redirects in the API Client
scripts/setup-wizard.py:46Setup Wizard May Disclose a User-Supplied Bearer Token Through Unrestricted Redirects
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
| | | | `GET /locations/{id}/customFields` — List | |
| | | | `POST /locations/{id}/customFields` — Create | |
| | | | `PUT /locations/{id}/customFields/{fid}` — Update | |
| | | | `DELETE /locations/{id}/customFields/{fid}` — Delete | |
| | | | **Custom Values CRUD:** | |
| | | | `GET /locations/{id}/customValues` — List | |
| | | | `POST /locations/{id}/customValues` — Create | |
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
| | | | `GET /locations/{id}/customValues` — List | |
| | | | `POST /locations/{id}/customValues` — Create | |
| | | | `PUT /locations/{id}/customValues/{vid}` — Update | |
| | | | `DELETE /locations/{id}/customValues/{vid}` — Delete | |
| | | | **Tags CRUD:** | |
| | | | `GET /locations/{id}/tags` — List | |
| | | | `POST /locations/{id}/tags` — Create | |
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
| | | | `GET /locations/{id}/tags` — List | |
| | | | `POST /locations/{id}/tags` — Create | |
| | | | `PUT /locations/{id}/tags/{tid}` — Update | |
| | | | `DELETE /locations/{id}/tags/{tid}` — Delete | |
| 11 | **Users** | `/users/` | CRUD, filter by email/role | `users` |
| 12 | **Forms** | `/forms/` | List forms, get submissions | `forms` |
| 13 | **Surveys** | `/surveys/` | List surveys, get submissions | `surveys` |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
- **"Rotate and expire later"** — new token generated, old token stays active for 7-day grace period
- **"Rotate and expire now"** — old token invalidated immediately (use for compromised credentials)
- You can edit scopes without regenerating the token
- **OAuth tokens** (marketplace apps only): Access tokens expire in 24 hours (86,399s); refresh tokens last up to 1 year
- Agency tokens can access sub-account data by passing `locationId` parameter
- **Rate limits are per-resource** — each sub-account independently gets 100/10s burst + 200K/day. SaaS endpoints: 10 req/sec global
- All list endpoints default to 20 records, max 100 per page via `limit` param
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## Webhook Events
50+ webhook event types for real-time notifications. Key events: `ContactCreate`, `ContactDelete`, `ContactTagUpdate`, `InboundMessage`, `OutboundMessage`, `OpportunityCreate`, `OpportunityStageUpdate`, `OpportunityStatusUpdate`, appointment events, payment events, form submission events. Webhooks continue firing even if access token expires. Config is per marketplace app.
Docs: https://marketplace.gohighlevel.com/docs/webhook/WebhookIntegrationGuide
## Official SDKs & Developer Resources
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
| GET | `/conversations/{conversationId}` | Get conversation |
| POST | `/conversations/` | Create conversation |
| PUT | `/conversations/{conversationId}` | Update conversation |
| DELETE | `/conversations/{conversationId}` | Delete conversation |
| POST | `/conversations/messages` | Send message |
| POST | `/conversations/messages/inbound` | Add inbound message |
| POST | `/conversations/messages/upload` | Upload attachment |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
## OAuth Token Lifecycle (Marketplace Apps Only)
- Access tokens expire in **24 hours** (86,399 seconds)
- Refresh tokens last up to **1 year**
- Private Integration tokens do NOT expire (but 90-day rotation recommended)
- `/oauth/token` is the ONLY endpoint that does NOT require the `Version` header
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
header("Step 2: Setting Up Your Private Integration")
# If token not set, show instructions then prompt
if not token_ok:
p(f"""
{BOLD}How to get your Private Integration token:{RESET}
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
header("Step 2: Setting Up Your Private Integration")
# If token not set, show instructions then prompt
if not token_ok:
p(f"""
{BOLD}How to get your Private Integration token:{RESET}
The skill requires environment variable access and outbound network access but does not declare explicit tool scope or permissions boundaries in the manifest. This weakens least-privilege enforcement and makes it harder for a host agent to safely sandbox execution, especially because the skill can interact with live CRM data and messaging endpoints.
The skill advertises high-impact actions like sending messages, booking appointments, modifying pipelines, and creating invoices without an upfront warning that these are real-world, externally visible operations. In an agent setting, lack of prominent side-effect disclosure increases the risk of users authorizing or triggering destructive or customer-facing actions unintentionally.
The setup trigger phrases are broad natural-language matches such as 'connect my GHL' and 'set up highlevel', which can cause unintended activation in normal conversation. Since the setup path runs a script and tests live credentials against an external service, accidental invocation can create unexpected side effects or prompt for sensitive configuration unnecessarily.
This markdown file documents update, create, and delete operations for schemas and records, including irreversible deletion, but provides no warning about potential impact to user data or system state. Under the markdown-specific SQP-2 criteria, descriptions that omit warnings for behaviors affecting data integrity should be flagged.
The Associations section includes create, update, delete, and relation-creation endpoints, all of which can alter production relationship data. The documentation does not warn users that these actions change live associations or may have downstream effects.
The proposals/documents section includes endpoints that send documents or templates, which can trigger outbound communications and potentially expose customer-facing content. The markdown does not disclose that these operations may contact recipients or affect external parties.
Creating a share link can expose snapshot data to anyone with access to the generated link, which has privacy and access-control implications. The section does not include any warning about link sharing, scope of access, or the sensitivity of shared data.
These endpoints can change subscription or enablement state for locations or companies, including bulk operations that may affect many tenants at once. The documentation omits warnings about operational impact, reversibility, or the need for extra caution before executing account-wide changes.
The Voice AI section exposes call logs and multiple CRUD surfaces for agents, actions, and goals, which may involve sensitive conversational data and configuration changes. The documentation does not warn users about privacy considerations for logs or the production impact of modifying AI behavior.
The Businesses section includes full CRUD operations, including deletion, which can alter or remove business records. The description lacks any caution about data integrity, deletion impact, or the need to verify the target business before mutating data.
Deleting app installations and performing billing charge CRUD can disrupt integrations or affect financial records. The markdown does not disclose the operational or billing consequences of these endpoints, leaving users without adequate warning.
This summary lists groups such as email, media delete, phone system, conversation AI, knowledge base, and custom AI agents, all of which can affect privacy, user data, communications, or system behavior. The section provides no warning despite explicitly noting limited documentation, increasing the risk of misuse.
This markdown file documents DELETE operations for calendars and appointments, which can affect user data and system integrity. The reference provides no warning or cautionary note about destructive behavior, confirmation expectations, or irreversible consequences.
This reference documents multiple destructive and state-changing contact operations such as delete, update, tag removal, campaign/workflow removal, and note/task deletion, but provides no safety guidance, confirmation requirements, or warnings about irreversible effects. In a natural-language agent skill that exposes CRM actions directly, this omission increases the chance of unintended destructive actions or operator misuse, especially when an LLM may translate ambiguous user requests into API calls.
This markdown file documents delete, void, payment-recording, and invoice-sending endpoints, which can affect user data, billing state, or customer communications. The file does not include any warning about destructive effects, reversibility, or the need for care when invoking these operations.
The troubleshooting guide includes a live POST example that creates a real contact in the connected GoHighLevel account, but it does not warn users that this mutates production data. In an agent skill context, examples are often copied or executed as-is, so this can lead to unintended data creation, CRM pollution, and accidental actions against customer environments.
No suspicious patterns detected.