Back to skill

Security audit

gate-exchange-activitycenter

Security checks for vulnerabilities and agentic risk

Overview

This Gate activity-center skill is mostly read-only and purpose-aligned, but it needs review because it uses configured Gate credentials while rendering API-provided absolute links without limiting them to trusted Gate domains.

Install only if you intend to use Gate activity-center queries through a local Gate MCP session, and use an API key limited to Activity:Read. Treat returned activity links cautiously: verify the destination is an expected Gate domain before signing in, claiming rewards, connecting wallets, or entering account information.

Vulnerability Patterns
  • 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
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:207
Finding

Unvalidated External Activity URLs Are Rendered as Trusted Clickable Links

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 207–213, 225–230, and 250–257
Vulnerability Type: Improper validation of externally supplied URLs
Risk Level: Medium

Vulnerable Code

markdown
## URL Processing Rules

All activity URLs returned by API must be processed before displaying to users:

| URL Pattern | Processing | Example |
|-------------|------------|---------|
| Relative path (starts with `/`) | Prepend `https://www.gate.com` | `/competition/xxx` → `https://www.gate.com/competition/xxx` |
| Already has host (starts with `http://` or `https://`) | Keep as-is, no modification | `https://www.gate.com/campaigns/xxx` → `https://www.gate.com/campaigns/xxx` |
markdown
| API Field | Display Label | Processing Rule |
|-----------|---------------|-----------------|
| `master_one_line` | Activity Title | Display as-is |
| `url` | Activity Link | Apply URL Processing Rules (prepend `https://www.gate.com` for relative paths) |
| `type_name` | Activity Type | Display the `type_name` value directly (NOT `type_id`) |
markdown
| Activity Title | Activity Type | Activity Link |
|----------------|---------------|---------------|
| {master_one_line} | {type_name} | [View Details]({processed_url}) |

Technical Analysis

The skill instructs the agent to preserve any API-returned absolute URL beginning with http:// or https:// without validating its scheme security, normalized hostname, port, user-information component, or relationship to Gate. The resulting value is directly embedded in a user-facing Markdown link labeled View Details.

Consequently, a compromised, manipulated, or malformed MCP/API response can supply an attacker-controlled URL such as https://attacker.example/login. The skill will present that destination with the same trusted-looking label used for legitimate Gate campaigns. Permitting plaintext HTTP also exposes users to network-level interception and link substitution.

This is a trust-bou ...[truncated 1526 chars]

Remediation
View remediation

Remediation Suggestions

  1. Permit only https URLs; reject plaintext http destinations.
  2. Parse URLs with a standards-compliant URL parser rather than relying on string-prefix checks.
  3. Normalize and validate the hostname against an explicit allowlist, such as gate.com and specifically approved Gate subdomains.
  4. Require exact hostname or proper subdomain-boundary matching. Do not use unsafe suffix checks that would accept domains such as gate.com.attacker.example.
  5. Reject URLs containing user-information components, unexpected ports, malformed or encoded hostnames, control characters, or ambiguous parsing constructs.
  6. Resolve relative paths against the fixed trusted origin https://www.gate.com, then validate the final normalized URL under the same policy.
  7. Consider restricting paths to known activity-center route prefixes where operationally possible.
  8. If validation fails, omit the link and use a safe message such as Activity link temporarily unavailable.
  9. Apply the same validation to recommendation links and the My Events entry link.
  10. Add tests covering attacker-controlled domains, HTTP URLs, user-information confusion, Unicode or punycode hostnames, suffix-confusion domains, protocol-relative URLs, encoded separators, and unexpected ports.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `SKILL.md` keeps routing and recommendation logic.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Line L21 describes a language-handling rule that mandates converting non-English input to English before making the API call. For a natural-language policy review, this is a locale/language constraint stated without any user opt-in or documented regional justification, which can conflict with organizational language-choice expectations.

Content

No source excerpt is available for this finding.

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

md
### Key Rules

1. **Fixed page_size=3**: All activity list queries use `page_size=3`, no pagination
2. **No Type Clarification**: For hot recommendation, call API directly without asking user
3. **Type Matching**: Case-insensitive matching for activity types

## Source

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.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrases are broad enough that the skill may activate on ambiguous requests such as generic questions about activities, recommendations, or rewards. In a credentialed trading-platform context, misrouting can cause unnecessary API calls and unintended disclosure of account-specific activity entry points or campaign data when the user did not clearly request this skill.

Content

No source excerpt is available for this finding.

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

md
- Credentials Source: Local Gate MCP deployment (`GATE_API_KEY`, `GATE_API_SECRET`)
- API Key Required: Yes
- Permissions: Activity: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

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

Forcing translation of non-English user input before search can alter the user’s intended query, especially for proper nouns, branded campaign names, or region-specific terminology. In this skill, that can lead to incorrect searches, missed results, or querying for a different activity than the user requested, which is a data integrity and user-intent handling issue.

Content

No source excerpt is available for this finding.

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 `Activity: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.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger example "Recommend some activities" is broad and can overlap with ordinary conversational requests, making the skill activate when the user did not explicitly intend to invoke the Gate activity center. Unintended activation can cause context hijacking, irrelevant API calls, and accidental exposure of account-linked activity entry points in multi-skill environments.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The phrase "What activities are available" is highly ambiguous and lacks any scope limiting it to Gate exchange campaigns, so it may match many unrelated user requests. In an agent environment, this increases the risk of wrongful routing, user confusion, and unauthorized or unnecessary retrieval of platform-specific data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The example "Show me the query process" is a generic search/process request that can be triggered outside the intended financial-activity context. Because this scenario instructs the system to reveal step-by-step API calls and intermediate results, unintended activation could expose internal workflow details and increase prompt/agent behavior disclosure.

Content

No source excerpt is available for this finding.