Back to skill

Security audit

Solana Whale Tracker Pro

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Solana monitoring tool with expected external API and notification behavior, but users should protect notification credentials and review its limited security hardening before use.

Before installing, use a virtual environment, pin reviewed dependency versions, and treat Telegram bot tokens and email app passwords as secrets. Expect public market and blockchain queries plus alert contents to be sent to the configured third-party services, and avoid feeding untrusted token names, addresses, or signatures into Telegram HTML alerts until escaping/validation is added.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/notifier.py:82
Finding
Unescaped Dynamic Values in Telegram HTML Notifications<![CDATA[ ## Vulnerability Details **File Location**: `scripts/notifier.py`, lines 82-126 **Vulnerability Type**: Telegram HTML injection and notification-content manipulation **Risk Level**: Medium ### Vulnerable Code ```python message = f""" {emoji} <b>价格警报</b> <b>代币:</b> {token.upper()} <b>当前价格:</b> ${current_price:,.2f} <b>目标价格:</b> ${target_price:,.2f} <b>条件:</b> {direction} <b>时间:</b> {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} #SolanaMonitor #PriceAlert """ return self.send_message(message) def send_whale_alert(self, signature: str, amount: float, token: str, from_addr: str, to_addr: str) -> bool: message = f""" 🐋 <b>巨鲸转账警报</b> <b>金额:</b> {amount:,.2f} {token.upper()} <b>来源:</b> <code>{from_addr[:16]}...{from_addr[-8:]}</code> <b>目标:</b> <code>{to_addr[:16]}...{to_addr[-8:]}</code> <b>交易:</b> <a href="https://solscan.io/tx/{signature}">查看</a> <b>时间:</b> {datetime.now().strftime('%Y-%m-%d %H:%M:%S')} #SolanaMonitor #WhaleAlert """ return self.send_message(message) ``` The resulting messages are passed to `send_message()`, whose default parsing mode is HTML: ```python def send_message(self, message: str, parse_mode: str = 'HTML') -> bool: ``` ### Technical Analysis The notification functions interpolate `token`, `from_addr`, `to_addr`, and `signature` directly into content rendered by Telegram as HTML. These values are not HTML-escaped or validated before insertion. If an attacker can influence any of these fields through a future API integration, monitored data source, plugin, or direct invocation of `NotificationManager.send_alert()`, HTML metacharacters may alter the structure or presentation of the notification. The `signature` value is particularly sensitive because it is inserted into an HTML link attribute. Telegram restricts the HTML elements it supports, limiting the scope compared with browser-based HTML injection. Nevertheless, crafted values may create misleading formatting, alter links, produce de ...[truncated 1278 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Escape every dynamic text field before inserting it into Telegram HTML: ```python from html import escape safe_token = escape(token.upper(), quote=True) safe_from_addr = escape(from_addr, quote=True) safe_to_addr = escape(to_addr, quote=True) ``` 2. Strictly validate Solana transaction signatures and wallet addresses before including them in messages. Reject values containing characters outside the expected Base58 alphabet and enforce appropriate length limits. 3. Construct the Solscan link only after validation: ```python import re BASE58_RE = re.compile(r"^[1-9A-HJ-NP-Za-km-z]+$") if not BASE58_RE.fullmatch(signature): raise ValueError("Invalid Solana transaction signature") safe_signature = escape(signature, quote=True) tx_url = f"https://solscan.io/tx/{safe_signature}" ``` 4. Consider using plain-text notifications when rich formatting is unnecessary. 5. Add tests using values containing `<`, `>`, `&`, quotation marks, closing tags, and fake link markup. Confirm that the resulting message displays these values literally and cannot introduce new Telegram entities. 6. Treat all alert fields as untrusted at the notification boundary, even when current callers normally obtain them from public blockchain or pricing services. ]]>

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding
Dependencies Are Not Reproducibly Pinned or Integrity-Verified<![CDATA[ ## Vulnerability Details **File Location**: `requirements.txt`, lines 1-2 **Vulnerability Type**: Unbounded dependency resolution and missing package integrity verification **Risk Level**: Low ### Vulnerable Code The complete dependency file is: ```text requests>=2.28.0 python-dotenv>=1.0.0 ``` The documented installation process executes: ```bash pip install -r requirements.txt ``` ### Technical Analysis Both dependencies use lower-bound-only constraints. A future installation can therefore resolve to any later package version available from the configured Python package index. The project supplies no lock file, exact versions, package hashes, or documented trusted index configuration. The package names observed in the project are legitimate; the audit found no direct evidence of typosquatting, dependency confusion, or a currently malicious dependency. The risk is that installation behavior is not reproducible and can change after the Skill has been audited. `python-dotenv` also appears unused by the reviewed Python scripts, unnecessarily increasing the dependency and supply-chain surface. ### Attack Path 1. A user follows the documented installation procedure. 2. `pip` resolves each `>=` requirement against the package index configured in the user’s environment. 3. A newer, unreviewed, compromised, or unexpectedly incompatible release is selected. 4. Package installation or later import executes code from that unreviewed release in the user’s Python environment. 5. The dependency receives the same runtime privileges as the Skill process. This is a supply-chain exposure rather than evidence that the current package intentionally retrieves or executes a malicious payload. ### Impact Assessment If an upstream package release or configured package index were compromised, dependency code could execute with the privileges of the installing user or Skill process. Depending on that environment, this could permit access to files, network resour ...[truncated 211 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin dependencies to versions that have been tested and reviewed: ```text requests==<reviewed-version> ``` 2. Generate and commit a lock file containing transitive dependencies and cryptographic hashes. Install with hash enforcement: ```bash python -m pip install --require-hashes -r requirements.lock ``` 3. Rebuild the lock file through a controlled dependency-update process that includes vulnerability scanning and automated tests. 4. Remove `python-dotenv` unless configuration loading is implemented and the package is actually required. 5. Use the official Python Package Index explicitly in trusted deployment environments and prevent dependency resolution from untrusted or attacker-controlled indexes. 6. Run dependency installation and the Skill itself in an isolated virtual environment or container with only the filesystem and network permissions required for monitoring. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (17)

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The skill documentation is written entirely in Chinese, including setup, usage, pricing, and safety information, with no indication that other languages are supported or that the locale restriction is intentional. This can violate a language/locale policy when users are not given an opt-in choice or clear region-specific justification.

External Transmission

Medium
Category
Data Exfiltration
Content
### 获取价格

```bash
curl http://localhost:8000/api/v1/price/solana
```

### 设置警报
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill explicitly supports outbound alerting via Telegram and email and instructs users to place bot tokens, chat IDs, and email credentials in configuration, but it does not warn users that market data, alert contents, and operational metadata will be transmitted to third-party services. This creates privacy and security risk because sensitive usage patterns or credentials may be exposed, mishandled, or logged externally without informed user consent.

External Transmission

Medium
Category
Data Exfiltration
Content
"""
        self.bot_token = bot_token
        self.chat_id = chat_id
        self.api_url = "https://api.telegram.org/bot"
    
    def send_message(self, message: str, parse_mode: str = 'HTML') -> bool:
        """
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
'parse_mode': parse_mode
            }
            
            response = requests.post(url, json=data, timeout=10)
            result = response.json()
            
            if result.get('ok'):
Confidence
80% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This Python file contains its primary documentation and operational messages in Chinese, including the module docstring and later user-facing output, but it does not offer any language selection or explain that the skill is intentionally region-specific. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

External Transmission

Medium
Category
Data Exfiltration
Content
from typing import Dict, List, Optional

# CoinGecko API(免费,无需 API Key)
COINGECKO_API = "https://api.coingecko.com/api/v3"

class PriceMonitor:
    """Solana 代币价格监控器"""
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The module title, description, docstrings, and all user-facing messages are written in Chinese, which effectively imposes a specific language/locale on users. The file does not offer any opt-in, language selection, or justification that this is a region-specific tool, so it conflicts with the policy against forcing a language without user choice.

External Transmission

Medium
Category
Data Exfiltration
Content
]
            }
            
            response = requests.post(SOLANA_RPC, json=payload, timeout=10)
            response.raise_for_status()
            
            data = response.json()
Confidence
80% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
]
            }
            
            response = requests.post(SOLANA_RPC, json=payload, timeout=10)
            response.raise_for_status()
            
            data = response.json()
Confidence
80% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The natural-language content of the skill file is entirely in Chinese, and there is no indication that users may choose another language or that the skill is intended only for a Chinese-language audience. Under the stated policy, forcing a specific language without opt-in is a policy violation unless the locale constraint is documented and justified.

Natural-Language Policy Violations

Low
Confidence
90% confidence
Finding
The display name and description are written in Chinese, and the manifest does not indicate that language selection is optional or that the skill is intended only for a Chinese-speaking region. This can violate language/locale policy when a skill imposes a specific language without user opt-in or documented justification.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.28.0
python-dotenv>=1.0.0
Confidence
96% confidence
Finding
The dependency is specified with a lower bound only, which allows future installs to resolve to different versions over time. This weakens reproducibility and can unintentionally introduce vulnerable or breaking releases into the environment, especially for a security-relevant HTTP library like requests.

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
88% confidence
Finding
The manifest does not pin requests, and the package has multiple known advisories across versions, so the actual installed version may be vulnerable without any visibility from this file alone. Because requests commonly handles authentication, redirects, proxies, and remote network input, consuming an affected version can expose credentials or weaken transport security.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.28.0
python-dotenv>=1.0.0
Confidence
94% confidence
Finding
The python-dotenv package is also unpinned, so installations are not deterministic and may pull in newly released versions without review. This creates supply-chain risk and makes it harder to verify whether deployed environments are using a safe version.

Unverifiable Dependency: python-dotenv has 2 known advisory(ies) (CVE-2026-28684 (python-dotenv: Symlink following in set_key allows arbitrary file overwrite via ); CVE-2026-28684 (python-dotenv reads key-value pairs from a .env file and can set them as environ)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
84% confidence
Finding
The unpinned python-dotenv dependency cannot be verified against known advisories, so an affected version could be installed depending on resolution time and environment. Given dotenv libraries may read local files and modify environment configuration, vulnerable versions can create file-handling or configuration integrity risks.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
This code file includes natural-language documentation and user-facing strings exclusively in Chinese, beginning with the module description. Under the policy rule for language/locale, forcing a specific language without user opt-in can be a violation when no alternative or choice is provided.

Static analysis

No suspicious patterns detected.