Back to skill

Security audit

Gate Exchange Account and Asset Manager

Security checks for vulnerabilities and agentic risk

Overview

This Gate account skill is mostly coherent, but it requires trusting mutable external instructions while also using sensitive financial account reads and write-capable tools.

Install only if you are comfortable granting this skill broad read access to Gate account data and Unified:Write permission. Use least-privilege API keys, prefer read-only credentials unless you need mutations, and verify the external gate-runtime-rules.md source before allowing write-capable use.

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:15
Finding

Mandatory Loading of Mutable External Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 15–18
Vulnerability Type: External instruction redirection
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)
- **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.

Technical Analysis

The Skill requires the agent to retrieve and obey a remote document before using any tool. The URL references GitHub's mutable master branch rather than an immutable commit, and no integrity hash or authenticated version constraint is provided.

The statement that the remote rules have “the highest priority” attempts to elevate externally controlled content above the locally audited Skill instructions. Consequently, the effective behavior of the Skill is not fully represented by the reviewed package and can change after publication without a corresponding package update or security review.

This is instruction hijacking rather than remote code execution: the referenced resource is an instruction document, and the audited files contain no mechanism that directly downloads and executes native code. Nevertheless, agent instructions can control authenticated MCP operations, including the four documented Gate unified-account mutation tools.

Attack Path

  1. A user or agent loads this Skill to inspect or manage a Gate account.
  2. The Skill mandates retrieval of gate-runtime-rules.md from the mutable GitHub master branch.
  3. An attacker compromises the upstream repository, a maintainer account, or the remote document's publication path, or otherwise causes malicious instructions to be served.
  4. The remote content instructs ...[truncated 1409 chars]
Remediation
View remediation

Remediation Suggestions

  1. Bundle gate-runtime-rules.md inside the Skill package and reference it through a relative path so that all effective instructions are included in the reviewed artifact.
  2. If remote distribution is unavoidable, pin the URL to an immutable Git commit rather than master.
  3. Record and verify a cryptographic digest of the expected document before treating its contents as trusted.
  4. Remove the assertion that external content has “the highest priority.” Explicitly state that remote or referenced documents cannot override system, developer, user, platform, or local safety constraints.
  5. Treat fetched content as untrusted data by default and reject instructions that expand tool scope, alter confirmation requirements, request disclosure, or conflict with the reviewed package.
  6. Enforce mutation safeguards outside the prompt layer, preferably in the MCP server or a policy gateway. Require immediate, parameter-bound, single-use confirmation for each write.
  7. Apply least-privilege API credentials. Separate read-only credentials from write-enabled credentials where possible, and enable only the permissions required for the current operation.
  8. Add release-time checks that reject mutable external instruction links and verify that every mandatory policy document is present in the audited package.
  9. Version the local Skill and runtime rules together so any policy change triggers a new review and release.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • 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
Findings (7)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `SKILL.md` keeps orchestration/routing logic across account domains.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · references/scenarios.md (reported line 24)May include surrounding context.

md
If confirmation is missing, ambiguous, or stale, do not execute any write tool call.

## Global Output Rules (Mandatory)

- Annotate data timestamp in every report section
- Keep API numeric precision as returned; do not round unless user explicitly asks

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger list includes broad natural-language phrases such as "account balance," "how much do I have," and "affiliate" that can match common user requests without tight scoping or exclusions. In this skill, broad activation is more dangerous because the skill can orchestrate many authenticated account data reads and can route toward write-capable workflows, increasing the chance of unintended invocation, privacy exposure, or steering into sensitive financial actions.

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 17)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.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Trigger keywords such as "account," "assets," and especially "how much" are overly generic and can activate this skill for unrelated prompts, causing retrieval of sensitive financial information beyond user intent. Because the skill orchestrates many account and earnings tools, loose routing materially raises the risk of inappropriate tool invocation and unnecessary exposure of private data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The fallback rule maps vague phrases like "check my account" to an asset-overview workflow that can trigger many sensitive balance and holdings queries without the user specifying scope. In a financial skill with broad read permissions across spot, unified, futures, options, earn, alpha, and rebate domains, this increases the chance of over-collection and unintended disclosure of private account data within the session.

Content

No source excerpt is available for this finding.

Unrestricted Tool Access

Medium
Category
Excessive Agency
Confidence
84% confidence
Finding

The instruction to "execute all tools in parallel" for activated dimensions can cause bulk querying across numerous financial data sources once a signal fires, without an explicit minimization step per request. In this context, parallel execution amplifies the privacy impact of misrouting or overly broad triggers by collecting more user-sensitive account data than is strictly necessary.

Content

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

md
1. Activate signal dimensions from user query
2. Assemble deduplicated tool set from all activated dimensions
3. Execute all tools in parallel (no serial dependencies)
4. LLM aggregates multi-source results, annotates data timestamp and source
5. Output structured report per activated dimension