Back to skill

Security audit

Solana Market

Security checks for vulnerabilities and agentic risk

Overview

The skill mainly documents Solana token prices, but the package also contains undocumented wallet-monitoring and token-risk scripts, including continuous Helius polling for a wallet address.

Review before installing. The documented price features are straightforward, but the package includes an undisclosed wallet whale-tracking script that can use a Helius API key and repeatedly query a specific wallet address. Install only if you are comfortable with that capability being present, and prefer a version that documents or removes wallet monitoring.

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
scripts/track-whale.js:44
Finding
Undocumented Wallet Monitoring and External Network Disclosure Exceed Declared Skill Scope## Vulnerability Details **File Location**: `scripts/track-whale.js:3-6, 11, 44-48, 66-76, 97-100` **Vulnerability Type**: Undocumented privacy-sensitive network activity and excessive functional scope **Risk Level**: Medium ### Complete Code Snippet ```js /** * Track large transfers for a specific wallet via Helius. * Usage: * node track-whale.js <wallet_address> <min_usd_value> [--lang zh|en] * node track-whale.js <wallet_address> <min_usd_value> --watch [--interval 30] [--lang zh|en] */ const { scanWhaleTransfers, createWhaleTracker } = require(path.join(sharedDir, 'services')); async function runOnce(address, minUsdValue) { const result = await scanWhaleTransfers({ address, minUsdValue, limit: 30, }); if (!result.events || result.events.length === 0) { console.log(isZh ? `✅ 最近 ${result.checked} 笔交易中未发现超过 ${formatUSD(minUsdValue)} 的大额转账。` : `✅ No whale transfers above ${formatUSD(minUsdValue)} found in the latest ${result.checked} transactions.`); return; } console.log(isZh ? '🐋 鲸鱼转账扫描结果:' : '🐋 Whale transfer scan:'); for (const event of result.events) { console.log(formatEventLine(event)); } } async function runWatch(address, minUsdValue) { const pollMs = Math.max(10, Number.isFinite(intervalSec) ? intervalSec : 30) * 1000; const tracker = createWhaleTracker({ address, minUsdValue, pollIntervalMs: pollMs, onEvent: (event) => { console.log(formatEventLine(event)); }, onError: () => { console.log(`⚠️ ${isZh ? '鲸鱼监听暂时失败,系统将继续重试。' : 'Whale tracking temporarily failed, retrying automatically.'}`); }, }); if (!config.heliusApiKey) { console.log(`❌ ${isZh ? '未配置 HELIUS_API_KEY,无法启用鲸鱼追踪。' : 'HELIUS_API_KEY is not configured. Whale tracking is unavailable.'}`); process.exit(1); } } ``` ### Technical Analysis ...[truncated 3193 chars]
Remediation
## Remediation Suggestions 1. Remove `track-whale.js` from this Skill if wallet monitoring is not part of its intended price and market-overview functionality. 2. If the capability is intentional, separate it into a dedicated Skill with an explicit description, activation conditions, provider disclosure, and permission model. 3. Require explicit user confirmation before transmitting a wallet address to Helius or any other external provider. State what data will be sent and whether watch mode creates continuing requests. 4. Add `track-whale.js` to the documented available-scripts list and describe its arguments, network behavior, polling duration, and termination mechanism. 5. Bundle the relevant shared service implementation with the audited package, or pin it to a verifiable version so request destinations, TLS handling, logging, retention, and credential usage can be reviewed. 6. Restrict outbound traffic to an allowlisted HTTPS endpoint and validate that wallet addresses and thresholds are the only user-derived values included in requests. 7. Ensure the Helius API key is read from a protected secret store, never printed in errors or logs, and scoped or rate-limited where supported. 8. Apply bounded execution controls to watch mode, such as a maximum duration or request count, and display a clear notice before continuous monitoring begins. 9. Avoid storing queried addresses or transfer events unless necessary. If storage is required, define retention limits and provide appropriate redaction and deletion controls.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding
声明描述聚焦于“实时价格和市场概览”,即价格/行情类查询;而代码的主功能明显是“检查代币风险报告”,文件名、用法说明、输出标题都指向 RugCheck 风险分析。虽然代码也显示价格,但那只是附带信息。其核心能力是获取并展示风险数据、风险标签、警告和持仓集中度,这些都未在声明中体现,属于 materially different primary purpose,而不是单纯的实现细节。因此应判定为描述与实际行为不匹配。

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
声明描述的是“查询 Solana 生态代币实时价格和市场概览”,重点应是价格、行情、市场状态类信息;但代码实际并未查询代币价格、K线、市场总览或行情数据。相反,它接收钱包地址和美元阈值,调用 scanWhaleTransfers/createWhaleTracker 来扫描或持续监听某个地址的大额转账,并输出转账方向、数量、美元价值和交易签名。这属于链上地址行为监控/鲸鱼追踪,与代币价格查询是 materially different primary purpose。所需资源和输入也不一致:代码需要 Helius API Key、钱包地址、阈值参数,而不是代币标识或市场查询参数。因此描述与实际行为明显不符。

Ae1

High
Category
analysis-evasion
Content
| `market-overview.js` | 市场概览 | `[--lang en]` |
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Vague Triggers

Medium
Confidence
93% confidence
Finding
The activation criteria are broad enough to match generic discussions about prices, markets, or 'how much,' which can cause the skill to trigger outside its intended Solana-token context. Over-broad triggering can route unrelated user conversations into external script execution, increasing the chance of unintended data access, misleading responses, or unsafe chaining with other wallet-related skills.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The example phrases are ambiguous and can overlap with ordinary market or price-related conversation unrelated to this skill. In an agent environment, this ambiguity increases accidental invocation risk, which may lead to irrelevant tool use and broaden the attack surface for prompt-routing abuse.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The script sets the default language to 'zh' when the user does not provide a --lang argument. This imposes a specific locale by default rather than offering a neutral default or explicit user choice, which matches the language/locale policy violation criteria.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The script implements wallet-specific whale-transfer monitoring and continuous tracking, which exceeds the manifest’s stated scope of token price and market overview queries. This kind of capability broadens data collection and surveillance behavior beyond user-expected functionality, increasing the risk of unauthorized monitoring or policy bypass if the skill is approved under a narrower description.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The script sets the default language to 'zh' and treats any non-'en' value as Chinese, which imposes a locale choice without user opt-in. This is a natural-language policy issue because the user is not first offered a neutral default or prompted to choose their preferred language.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The natural-language instructions and user-facing examples are written as if the skill operates in Chinese by default, but there is no explicit user opt-in or justification for a Chinese-only locale. Because language choice is not surfaced in the skill description, this may violate language or locale policy expectations.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The script sets the default language to 'zh' and treats any non-'en' value as Chinese output. This is a natural-language locale policy issue because the user is forced into a specific language unless they explicitly override it.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The script sets the default language to 'zh' unless the user explicitly passes '--lang', which imposes a specific locale by default. This is a natural-language policy concern because the file does not offer a neutral default or require opt-in before forcing a language choice.

Static analysis

No suspicious patterns detected.