Back to skill

Security audit

Solana Monitor Pro

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Solana monitoring tool, but it asks users to configure notification credentials and handles them with weak disclosure and unsafe error logging.

Install only if you are comfortable giving the skill Telegram bot and email-sending credentials. Use dedicated low-privilege bot/email accounts, keep config files out of source control, restrict file permissions, rotate exposed tokens, and avoid logging raw request exceptions. Review dependency versions before deployment.

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/notifier.py:50
Finding
Telegram Bot Token May Be Disclosed Through Exception Logging## Vulnerability Details **File Location**: `scripts/notifier.py`, lines 50–68 **Vulnerability Type**: Secret exposure through unsanitized exception logging **Risk Level**: Medium ### Vulnerable Code ```python url = f"{self.api_url}{self.bot_token}/sendMessage" data = { 'chat_id': self.chat_id, 'text': message, 'parse_mode': parse_mode } response = requests.post(url, json=data, timeout=10) result = response.json() if result.get('ok'): print(f"✅ Telegram message sent successfully") return True else: print(f"❌ Telegram delivery failed: {result.get('description')}") return False except Exception as e: print(f"❌ Telegram delivery exception: {e}") return False ``` ### Technical Analysis The Telegram bot token is embedded directly in the request URL. Exceptions raised by the HTTP client or its underlying networking components can include the requested URL. Printing the raw exception without redaction may therefore write the bot token to terminal output, CI logs, service logs, or centralized monitoring systems. Sending alert data to Telegram is necessary for the Skill's declared notification functionality, and no intentional exfiltration was identified. The vulnerability is instead caused by unsafe handling of errors around a credential-bearing URL. ### Attack Path 1. A user configures the Skill with a valid Telegram bot token. 2. An attacker, proxy, malformed network environment, or ordinary connectivity failure causes the Telegram request to raise an exception. 3. The exception representation includes all or part of the token-bearing request URL. 4. The handler prints the raw exception to an accessible log destination. 5. An attacker with access to those logs extracts the bot token. 6. The attacker uses Telegram's Bot API with the recovered token to impersonate or misuse the bot within its Telegram-granted capabilities. Exploitation depends on the except ...[truncated 473 chars]
Remediation
## Remediation Suggestions - Do not print or persist raw exceptions from requests whose URLs contain credentials. - Replace raw exception output with a sanitized message containing only a safe error category, such as the exception class and a redacted description. - Apply centralized log redaction for Telegram URL patterns, replacing `/bot<token>/` with `/bot[REDACTED]/`. - Avoid passing the credential-bearing URL to generic logging utilities. - Ensure CI, service, and centralized logs have restrictive access controls and appropriate retention periods. - Rotate the Telegram bot token immediately if it may already have appeared in logs. - Add automated tests that simulate request failures and assert that captured output does not contain the configured token.
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 (18)

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The skill description is presented in Chinese from the outset and does not indicate that other languages are supported or that the Chinese-only presentation is intentional for a region-specific use case. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

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
91% confidence
Finding
The skill advertises API-based price monitoring and outbound notifications through Telegram and email, but it provides no warning that operational data and user-configured content may be transmitted to third-party services. In a monitoring skill that handles alerts and external integrations, omission of privacy, credential, and data-sharing guidance increases the risk of unsafe deployment and accidental disclosure.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The configuration example explicitly asks users to place secrets such as a Telegram bot token and email app password into a YAML file, but it gives no guidance on secure storage, file permissions, secret rotation, or avoiding source-control exposure. This is dangerous because users commonly copy such examples verbatim, leading to plaintext credential storage and credential leakage through repositories, backups, or shared workspaces.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This code file contains user-facing natural-language strings and documentation in Chinese, including the module description and operational messages. The policy requires avoiding forced language or locale constraints unless the skill offers user choice or clearly documents a justified region-specific limitation, which is not present here.

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
The module title, description, docstrings, and user-facing output are written in Chinese, which imposes a specific language on users. The file does not provide any language selection, opt-in, or justification that this is a region-specific tool, so it violates the language/locale policy criterion.

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
96% confidence
Finding
This Python file contains its primary description and user-facing messages in Chinese, starting with the module docstring and continuing throughout the script. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is explicitly justified, which is not present here.

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 entire skill description and instructions are presented only in Chinese, with no indication that this locale is optional or required for a region-specific purpose. The stated policy forbids language or locale constraints unless the skill offers user choice or clearly justifies the restriction.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
The manifest presents the display name and description in Chinese, but there is no indication that the skill is region-specific or that users can choose their preferred language. This can violate a language/locale policy when a skill implicitly forces one language without opt-in or 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 and makes builds non-reproducible. In a security context, this also prevents reviewers from determining whether a vulnerable or patched release will be installed.

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
89% confidence
Finding
The manifest references requests without an exact version while known advisories exist for some releases, so the actual security posture cannot be verified. This uncertainty is dangerous because deployment may pull an affected version depending on when and where installation occurs.

Unpinned Dependencies

Low
Category
Supply Chain
Content
requests>=2.28.0
python-dotenv>=1.0.0
Confidence
96% confidence
Finding
The package is not pinned to an exact version, so installations may drift across environments and time. That weakens supply-chain control and makes it impossible to verify from this manifest alone whether the resolved version includes known security fixes.

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
82% confidence
Finding
python-dotenv has known advisories for some versions, and because the requirement is unpinned, reviewers cannot tell whether installs will resolve to a safe release. If a vulnerable version is selected, file-handling or environment-loading behavior could introduce security issues in downstream use.

Static analysis

No suspicious patterns detected.