Back to skill

Security audit

Gate Exchange Trading Copilot

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Gate trading copilot, but it needs Review because real trading authority depends on mutable external instructions and the manifest overstates some supported capabilities.

Review before installing. Only use this with narrowly scoped Gate API permissions and with an agent/runtime that enforces confirmations outside natural-language skill text. The publisher should vendor or pin the shared runtime rules, remove highest-priority authority for remote instructions, and align the manifest with the actual spot/futures-only scope before broad distribution.

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
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:18
Finding

Mutable Remote Instructions Are Granted Highest Priority

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 18–20
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: High

Vulnerable Code

markdown
⚠️ 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 [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/gate-runtime-rules.md)

Technical Analysis

The Skill requires the Agent to retrieve instructions from an external GitHub URL before selecting or invoking any tool. It then grants those remotely maintained instructions “the highest priority.”

The referenced gate-runtime-rules.md file is not included in the audited package and the URL points to the mutable master branch rather than an immutable commit. Consequently, the effective behavior of the Skill can change after review without any modification to this package.

This creates an external instruction-control channel. A party capable of modifying the referenced repository content could introduce instructions that alter tool selection, authentication handling, data disclosure, confirmation requirements, or authenticated trading behavior. Similar references reinforce this dependency at SKILL.md:167–170, references/routing-and-analysis.md:88, and references/execution-and-guardrails.md:61.

This is instruction hijacking rather than remote code execution: no downloaded executable payload or local shell execution was found.

Attack Path

  1. A user or runtime loads this Skill.
  2. SKILL.md:18–20 stops normal processing and requires the Agent to retrieve the external runtime-rules document.
  3. An attacker with write access to the remote repository, or control obtained through repository compromise, modifies the file on the master branch.
  4. The Agent retrieves the modified document during a later Skill invocation.
  5. Because the Skill assigns the re ...[truncated 1589 chars]
Remediation
View remediation

Remediation Suggestions

  1. Include the complete runtime rules inside the reviewed Skill package and reference that local, version-controlled file.
  2. Remove language granting externally retrieved content “highest priority.” Remote documentation must be treated as untrusted reference material and must never override system, developer, host-runtime, or local security constraints.
  3. If remote retrieval is operationally unavoidable:
    • Pin the URL to an immutable commit hash instead of master.
    • Record and verify a cryptographic digest before using the content.
    • Fail closed if the digest or expected origin does not match.
  4. Define a local allowlist of permitted MCP tool names and operation classes that remote documentation cannot expand.
  5. Enforce confirmation, risk blocks, and authentication boundaries in trusted host policy rather than natural-language instructions fetched at runtime.
  6. Prevent remotely sourced text from authorizing write operations, changing confirmation semantics, requesting credentials, or selecting additional endpoints.
  7. Vendor and audit all transitive instruction documents before release, and require a new package version and security review whenever they change.
  8. Correct the Skill trigger metadata that mentions margin borrowing, TradFi, Alpha, and combined trades even though the body excludes or does not implement several of those capabilities; this reduces accidental over-routing, although it is not the confirmed vulnerability itself.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (15)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `SKILL.md` keeps composite routing, trade lifecycle policy, and guardrails.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest claims the skill can handle margin borrowing, but the execution guardrails only support spot and USDT perpetual futures and omit margin-borrow workflows entirely. In a financial execution context, this capability mismatch is dangerous because the agent may misclassify margin requests, provide invalid instructions, or imply support for leveraged actions without the required product-specific controls and tool restrictions.

Content

No source excerpt is available for this finding.

Instruction Override

High
Category
Prompt Injection
Confidence
90% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · references/routing-and-analysis.md (reported line 288)May include surrounding context.

md
- honeypot / likely unsellable token
- invalid or non-tradable pair / contract
- exchange currently does not allow trading on that asset
- the user asks to bypass security or compliance
- the requested execution ability is outside supported scope

### 4.5 Default `CAUTION` cases

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description contains broad trigger phrases such as 'market buy', 'TradFi', and 'Alpha' that are likely to match common user language and may cause this high-risk trading/execution skill to activate in contexts where the user did not clearly intend exchange trading. Because this skill can progress toward authenticated account actions, overbroad routing increases the chance of unintended invocation and unsafe escalation into trading workflows.

Content

No source excerpt is available for this finding.

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 19)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 [gate-runtime-rules.md](https://github.com/gate/gate-skills/blob/master/skills/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.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill manifest advertises Alpha trading as a trigger/use case, but the execution guardrails explicitly mark Alpha trading as unsupported. This inconsistency can cause unsafe routing, user confusion, or downstream agents attempting unsupported execution paths, which is especially risky in a trading skill where product mismatches can lead to incorrect order handling or false 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 42)May include surrounding context.

md
- Order/position management after execution

Out of scope:
- Fully automatic execution without confirmation
- Unsupported products (options/alpha/defi/copy if not explicitly covered)

Misroute examples:

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 · references/mcp.md (reported line 18)May include surrounding context.

md
- Order/position management after execution

Out of scope:
- Fully automatic execution without confirmation
- Unsupported products (options/alpha/defi/copy if not explicitly covered)

Misroute examples:

Autonomous Decision Making

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

md
## 8. Safety and Degradation Rules

1. Never skip confirmation for write operations.
2. Never bypass compliance/risk hard blocks.
3. Never fabricate market evidence, fills, or position states.
4. Keep analysis-only mode when execution tools/auth are unavailable.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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/execution-and-guardrails.md (reported line 347)May include surrounding context.

md
## 8. Safety and Degradation Rules

1. Never skip confirmation for write operations.
2. Never bypass compliance/risk hard blocks.
3. Never fabricate market evidence, fills, or position states.
4. Keep analysis-only mode when execution tools/auth are unavailable.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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/mcp.md (reported line 102)May include surrounding context.

md
## 8. Safety and Degradation Rules

1. Never skip confirmation for write operations.
2. Never bypass compliance/risk hard blocks.
3. Never fabricate market evidence, fills, or position states.
4. Keep analysis-only mode when execution tools/auth are unavailable.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This skill operationalizes trading analysis and proceeds to order-draft flows without requiring a clear, explicit warning that trading can result in partial or total financial loss. In a trading copilot, omission of risk disclosure can make outputs seem more authoritative or safe than they are, increasing the chance users act on high-risk recommendations without understanding downside exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This scenario allows amendment of an existing live spot order and proceeds to execution after confirmation, but it does not require an explicit user-facing warning that a real open order will be modified and may become more aggressive or fill immediately. In a trading copilot, that omission is risky because users may interpret the step as a harmless draft refinement rather than a change to live market exposure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This scenario authorizes reduction of an active futures position and execution via order creation, but it lacks an explicit warning that the action will alter live leveraged exposure and may realize PnL, incur fees, or affect liquidation risk. In the futures context, the absence of a clear execution warning is more dangerous than in passive analysis because reduce-only trading still changes real positions immediately.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The phrase "Normalized references/scenarios.md prompt examples to English-only wording for release consistency" describes a language restriction in natural language. Under the policy, forcing a specific language without user opt-in or a clearly documented justification is a reportable locale-policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.