T09 · Insecure Skill Coding Practices
- Location
scripts/notifier.py:27- Finding
Telegram Bot Token Exposure Through Exception Logging
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a disclosed Binance market-monitoring and alerting tool, with notable safety and hygiene issues but no evidence of hidden malicious behavior.
Install only if you are comfortable with a Chinese-language trading monitor that writes local signal files and can send configured alerts to Telegram or Feishu. Keep notification tokens and webhooks private, restrict any cron log permissions, pin dependencies before production use, and review or fix the signal logic before acting on alerts with real money. Do not use the included Binance order API reference with live credentials unless you independently understand and intend the trade action.
scripts/notifier.py:27Telegram Bot Token Exposure Through Exception Logging
requirements.txt:1Unpinned Third-Party Dependencies Permit Unreviewed Future Releases
scripts/calculator.py:37Stop-Loss Logic Is Unreachable Because Entry Conditions Are Evaluated First
The skill documentation describes capabilities that read and write local files and make outbound network requests, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates an authorization ambiguity where an agent may be granted broader access than users expect, increasing the risk of unintended file access, data modification, or external exfiltration through notification endpoints.
The skill description is written entirely in Chinese and continues throughout the file with no indication that users may choose another language. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.
This JSON contains user-facing action fields in Chinese only ("观望", "无操作") with no indication that the skill is intentionally region-specific or that users can opt into this locale. That creates a natural-language locale policy issue because the file forces a specific language without documented justification or choice.
The reason value is natural-language content presented only in Chinese, but this file does not indicate any user opt-in to that language or a justified region-specific constraint. Under the policy, forcing a specific language in user-facing text is a reportable locale violation.
The documentation includes a signed POST example to the production Binance Futures order endpoint, which is a real state-changing trading action, but it does not clearly warn users that running it against live credentials can place an actual order. In a trading-monitor skill, users may reasonably copy examples directly, so the lack of a safety warning materially increases the chance of accidental live trades and financial loss.
This Python file contains its module description, docstrings, and returned explanatory messages entirely in Chinese, including user-facing reason text such as trading signal explanations. Under the policy, language constraints should not be forced without user opt-in or a clearly documented locale-specific justification, and none is present in this file.
This code includes user-facing natural-language descriptions and log messages exclusively in Chinese, such as the module docstring and function documentation. The policy requires avoiding forced language or locale unless the skill offers user opt-in or clearly documents a justified regional constraint, which is not present here.
This Python file contains multiple user-facing strings and documentation in Chinese, including message output and module descriptions, without indicating that the user can choose a language or that the skill is region-specific. The policy requires flagging language or locale constraints when they are forced without user opt-in or clear justification.
This code sends trading signal content to external services via Telegram and Feishu when enabled, which is a network transmission of potentially sensitive system or strategy data. While the script logs startup and results, it does not visibly disclose to the user that data will be transmitted to third-party services, and there is no confirmation prompt or explanatory comment/docstring near the sending logic.
This code contains natural-language strings exclusively in Chinese, including the module description, function docstrings, warnings, and status messages. Under the stated policy, forcing a specific language without offering user choice or documenting a justified locale restriction is a policy violation.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
logger.warning("Telegram 配置不完整,跳过推送")
return False
url = f"https://api.telegram.org/bot{bot_token}/sendMessage"
data = {
"chat_id": chat_id,
"text": message,
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
}
try:
response = requests.post(url, json=data, timeout=10)
response.raise_for_status()
result = response.json()
The code posts arbitrary message content to a configurable Feishu webhook URL with no validation or allowlisting. Because the destination is fully configuration-controlled, a malicious or compromised configuration could exfiltrate trading signals or other data to an attacker-controlled endpoint under the guise of notifications.
}
try:
response = requests.post(webhook_url, json=data, timeout=10)
response.raise_for_status()
logger.info("✅ 飞书消息发送成功")
return True
This JSON file contains user-facing natural-language values in Chinese, including the recommendation actions and reason text. Because the file provides only one language and does not indicate user opt-in or a justified region-specific constraint, it appears to enforce a specific locale in a way that may violate language-choice policy.
The entire document is written in Chinese and does not indicate that the user can choose another language or that the content is intentionally limited to a Chinese-speaking audience. Under the policy, a fixed language or locale without opt-in can be a natural-language policy violation.
The dependency is specified with a lower bound only, so builds are not reproducible and may resolve to different versions over time. This increases supply-chain risk because the environment could install a vulnerable or breaking release of requests without review, which matters in a monitoring skill that makes outbound network calls.
requests>=2.28.0
python-dateutil>=2.8.0
The manifest references requests without pinning, and requests has multiple historical advisories; because the resolved version is unknown, the deployment may install an affected release. In this skill's context, requests is likely used for market data and Telegram/Feishu notifications, so an affected version could expose credentials or weaken request security depending on implementation.
python-dateutil is also unpinned, which makes installations non-deterministic and exposes the project to future vulnerable or incompatible releases. Even if this package is less security-sensitive than an HTTP client, unpinned dependencies still create avoidable supply-chain uncertainty.
requests>=2.28.0
python-dateutil>=2.8.0
User-facing natural-language content in the module docstring and log messages is entirely in Chinese, and the file does not indicate that the skill is region-specific or provide any language selection. This can violate a language/locale policy when users are not given an explicit opt-in or alternative locale.
This code file contains user- and developer-facing natural-language text exclusively in Chinese, including the module description and function documentation. Under the policy rule, forcing a specific language without opt-in or justification is a locale/language policy issue, and no line indicates that Chinese is optional or required for a region-specific tool.
No suspicious patterns detected.