Back to skill

Security audit

Gate Exchange Coupon

Security checks for vulnerabilities and agentic risk

Overview

This skill reads Gate coupon and voucher information through scoped read-only MCP tools and does not show hidden writes, persistence, or secret exfiltration.

Install only if you are comfortable connecting a Gate MCP session with coupon read permission. Use a Gate API key scoped to Coupon:Read, avoid broader trading or transfer permissions, and do not paste API secrets into chat.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (12)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `SKILL.md` keeps coupon semantics, mapping rules, and rendering policy.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill grants unrestricted tool access without appropriate constraints. An agent with unfettered tool access can perform arbitrary actions including file modification, network requests, and code execution.

Content

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

md
## General Rules

⚠️ STOP — You MUST read and strictly follow the shared runtime rules before proceeding.
Do NOT select or call any tool until all rules are read. These rules have the highest priority.
→ Read `./references/gate-runtime-rules.md`
- **Only call MCP tools explicitly listed in this skill.** Tools not documented here must NOT be called, even if they
  exist in the MCP server.

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 56)May include surrounding context.

md
- Credentials Source: Local Gate MCP deployment (`GATE_API_KEY`, `GATE_API_SECRET`)
- API Key Required: Yes
- Permissions: Coupon:Read
- Never ask the user to paste secrets into chat; rely on the configured MCP session only.
- API Key Provisioning Reference: https://www.gate.com/myaccount/profile/api-key/manage (create or rotate keys outside the chat when the local MCP setup requires them).

### Installation Check

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 · SKILL.md (reported line 86)May include surrounding context.

md
> **IMPORTANT — Type Translation Rule**: When displaying the coupon type, map `coupon_type` strictly to the Display Name. You may translate Display Names to match the response language, but **the mapping must be exact** — never swap or conflate two different types. Critical distinction: `position_voucher` (Position Trial Voucher) is a **position-based trial voucher** — translate as "仓位体验券" in Chinese, never as "合约体验金"; `contract_bonus` (Futures Bonus) is **futures trial funds** — translate as "合约体验金". They are completely different products.

| `coupon_type`             | Display Name                          | Description                                                                                                           |
| ------------------------- | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `position_voucher`        | Position Trial Voucher                | Virtual capital for opening futures positions (NOT the same as Futures Bonus). Profits can be withdrawn; the principal is reclaimed after expiry. |
| `tradfi_position_voucher` | TradFi Position Voucher               | Same concept as position voucher but applies to TradFi instruments (stocks, forex, etc.).                             |

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 · SKILL.md (reported line 133)May include surrounding context.

md
### `cex_coupon_list_user_coupons` Parameters


| Parameter        | Default  | Description                                                                                                     |
| ---------------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `expired`        | `0`      | `0` = valid coupons; `1` = expired/used coupons                                                                 |
| `limit`          | `20`     | Page size (1–20)                                                                                                |

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 · SKILL.md (reported line 136)May include surrounding context.

md
| Parameter        | Default  | Description                                                                                                     |
| ---------------- | -------- | --------------------------------------------------------------------------------------------------------------- |
| `expired`        | `0`      | `0` = valid coupons; `1` = expired/used coupons                                                                 |
| `limit`          | `20`     | Page size (1–20)                                                                                                |
| `last_id`        | `0`      | Cursor pagination: last id from previous page                                                                   |
| `expire_time`    | `0`      | Cursor pagination: `expire_time_order_by` of the last item from the previous page; used together with `last_id` |
| `order_by`       | `latest` | `latest` = by acquisition time; `expired` = by expiry asc                                                       |

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 · SKILL.md (reported line 140)May include surrounding context.

md
| `last_id`        | `0`      | Cursor pagination: last id from previous page                                                                   |
| `expire_time`    | `0`      | Cursor pagination: `expire_time_order_by` of the last item from the previous page; used together with `last_id` |
| `order_by`       | `latest` | `latest` = by acquisition time; `expired` = by expiry asc                                                       |
| `coupon_type`    | (all)    | Filter by coupon type                                                                                           |
| `is_task_coupon` | (all)    | `0` = regular only; `1` = task coupons only                                                                     |

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 · SKILL.md (reported line 159)May include surrounding context.

md
Classify the user intent and route to the matching reference document:


| Intent                         | Example Phrases                                                                                                          | Route to                                                               |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- |
| **List available coupons**     | "What coupons do I have?", "Show my available coupons", "Do I have any vouchers?", "Check my coupon balance"             | Read `references/list-coupons.md`                                      |
| **Search by coupon type**      | "Do I have a commission rebate voucher?", "Check if I have a futures bonus", "Show my VIP trial cards"                   | Read `references/list-coupons.md`                                      |

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 · SKILL.md (reported line 167)May include surrounding context.

md
| **View usage rules**           | "What are the rules for this coupon?", "How do I use this voucher?", "What are the terms of my futures bonus?"           | Read `references/coupon-detail.md`                                     |
| **Trace coupon source**        | "How did I get this coupon?", "Where did this voucher come from?", "What activity gave me this coupon?"                  | Read `references/coupon-detail.md`                                     |
| **Query expired/used coupons** | "Show my used coupons", "List my expired vouchers", "What coupons have I used?"                                          | Read `references/list-coupons.md`                                      |
| **Unclear**                    | "Tell me about my coupons", "coupon help"                                                                                | Clarify: ask if user wants to list all coupons or check a specific one |


## Execution

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% 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 175)May include surrounding context.

md
1. Identify user intent from the Routing Rules table above.
2. Load the corresponding reference document.
3. Follow the workflow in that document step by step.
4. All operations are read-only — no confirmation gate required.

## Error Handling

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 · SKILL.md (reported line 180)May include surrounding context.

md
## Error Handling


| Situation                        | Action                                                                                                                                         |
| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| Coupon not found                 | Coupon record does not exist or does not belong to current user. Ask user to re-check which coupon they meant; re-fetch list to get valid IDs. |
| Invalid coupon type              | `coupon_type` is not a recognized enum value. Map user's natural language to the Coupon Types Reference table and retry.                       |

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 · references/gate-runtime-rules.md (reported line 16)May include surrounding context.

md
## 1. MCP Session and Authentication

- Use the already configured Gate MCP session for the current host.
- Local Gate MCP deployments use `GATE_API_KEY` and `GATE_API_SECRET`; never ask the user to paste these secrets into chat.
- Minimal permission for this skill is `Coupon:Read`.
- If the required Gate MCP tools are missing, stop and switch to setup guidance only.
- If the MCP session returns an auth or permission error, stop and guide the user to repair the configured local MCP credentials before continuing.