T09 · Insecure Skill Coding Practices
- Location
scripts/zonein.py:788- Finding
Misleading Disclosure of Sensitive Data Transmitted to the ZoneIn API
- Content
View full analysis
Vulnerability Details
File Location:
README.md:62,SKILL.md:279,scripts/zonein.py:164-183,scripts/zonein.py:788-797
Vulnerability Type: Incomplete privacy disclosure and transmission of reusable credentials
Risk Level: MediumThe documentation states:
text Only your API key is sent externally (as X-API-Key header to https://mcp.zonein.xyz/api/v1)However, the Telegram setup handlers transmit a reusable Telegram bot credential and, in the advanced setup flow, the user's chat identifier:
python def cmd_telegram_setup_init(args): """Easy Telegram setup: provide bot_token only, then send /start to bot.""" data = api_post("/telegram/setup-init", {"bot_token": args.bot_token}) _output(data) def cmd_telegram_setup(args): """Full Telegram setup with bot_token + chat_id.""" data = api_post("/telegram/setup", {"bot_token": args.bot_token, "chat_id": args.chat_id}) _output(data)These values are serialized and sent to the ZoneIn service by the common request function:
python def _do_request(path, params=None, method="GET", body=None): """Make authenticated request to Zonein API.""" key = get_api_key() url = f"{API_BASE}{path}" if params: query = urllib.parse.urlencode({k: v for k, v in params.items() if v is not None}) if query: url = f"{url}?{query}" data_bytes = None headers = {"X-API-Key": key, "Accept": CONTENT_JSON} if body is not None: data_bytes = json.dumps(body).encode("utf-8") headers["Content-Type"] = CONTENT_JSON req = urllib.request.Request(url, data=data_bytes, headers=headers, method=method) try: with urllib.request.urlopen(req, timeout=30) as resp: return json.loads(resp.read().decode("utf-8"))Other handlers also transmit withdrawal and destination wallet addresses, trading strategies, risk configurat ...[truncated 2338 chars]
- Remediation
View remediation
Remediation Suggestions
- Replace every “Only your API key is sent externally” statement with a complete disclosure of command-dependent data transmission.
- Explicitly identify Telegram bot tokens as reusable credentials and explain why ZoneIn needs them.
- Document server-side storage, encryption, access controls, retention, deletion, logging, and subprocessors for Telegram credentials.
- Obtain explicit confirmation immediately before uploading a bot token, including the destination and security implications.
- Avoid placing secrets on command lines where they can appear in shell history or process listings. Accept the token through protected standard input, a secret file with restrictive permissions, or an operating-system credential store.
- Ensure tokens are never returned in API responses, application logs, telemetry, exceptions, or support diagnostics.
- Encrypt stored bot tokens with a dedicated key-management service and restrict decryption to the minimum service identity.
- Provide token revocation and rotation instructions, and delete the stored token when Telegram integration is disabled.
- Clearly disclose the transmission of wallet addresses, order details, agent configuration, and financial metadata in the README and Skill manifest.
