T09 · Insecure Skill Coding Practices
- Location
references/web-dashboard-setup.md:52- Finding
Production Dashboard Transmits Financial News Over Plaintext HTTP
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill’s core news-analysis purpose is coherent, but it needs Review because it can auto-send financial text to a third-party API and its deployment guidance exposes a plaintext, unauthenticated public analysis service with root-based server updates.
Install only if you are comfortable sending analyzed news text to Baidu Qianfan and can control when the skill runs. Before production use, require explicit user confirmation, avoid confidential or embargoed inputs, serve the dashboard only over HTTPS, add authentication/rate limits/body-size limits to /api/analyze, and replace root SSH deployment with a least-privileged deploy account.
references/web-dashboard-setup.md:52Production Dashboard Transmits Financial News Over Plaintext HTTP
references/web-dashboard-setup.md:64Public Analysis Endpoint Lacks Documented Authentication and Abuse Controls
references/web-dashboard-setup.md:167Deployment Workflow Uses Unnecessary Remote Root Access
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
)
try:
with urllib.request.urlopen(req, timeout=120) as resp:
result = json.loads(resp.read().decode("utf-8"))
return result
except urllib.error.HTTPError as e:
The skill explicitly sends financial news content to Baidu Qianfan for analysis but does not clearly warn users that submitted data leaves the local system and is processed by a third-party service. If users include proprietary research, internal notes, or embargoed market-moving information, this could cause confidentiality, compliance, or data-governance issues.
The README says the skill auto-triggers when financial news is sent in the "新闻流事件驱动选股" group, which imposes a specific language/locale condition. There is no indication that users may choose an English equivalent trigger or opt into this locale-specific behavior.
The README states that user-supplied financial news is sent to the Baidu Qianfan API for NLP analysis, but it does not clearly warn users that their input will leave the local environment and be processed by a third party. In a finance workflow, users may paste proprietary research, client information, or embargoed market-sensitive text, so the lack of explicit disclosure and consent creates a real privacy and data-governance risk.
The skill documents capabilities that read local files, invoke external Python scripts, and send data to a third-party API, but it does not declare any explicit tool scope or permissions boundaries. This creates an authorization and review gap: operators and users cannot easily tell what resources the skill may access, and an agent runtime may grant broader powers than necessary.
The trigger conditions are extremely broad, including essentially any finance-, policy-, industry-, or company-related text in a group chat. This can cause accidental activation on routine conversation or pasted content, leading to unintended data processing, unnecessary external API calls, and higher risk of prompt injection via untrusted text.
The skill instructs sending news text to Baidu Qianfan for analysis but does not clearly warn users at the point of use that their supplied content will leave the local environment. This creates a data disclosure risk, especially if users paste proprietary research, internal messages, or unpublished market-sensitive information.
The skill's stated purpose is news-driven stock analysis, but the documentation significantly expands into running a local/remote web service, nginx routing, SPA integration, and operational deployment guidance. This scope expansion increases attack surface beyond the declared function, making it easier for the skill to influence hosting, routing, and service behavior unrelated to simple analysis.
The documentation includes remote administration actions such as scp/ssh as root and restarting services on a public ECS server, which are not necessary for ordinary stock-picking analysis. If an agent follows these instructions, it could modify production infrastructure or overwrite files on a remote host, turning a content-analysis skill into a deployment pathway.
The document explicitly describes sending user-entered news text to an external Baidu Qianfan API, but it does not mention user consent, privacy notice, data classification, or restrictions on pasting confidential information. This creates a real data-handling risk because users may unknowingly transmit sensitive market research, internal notes, or regulated information to a third-party service.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
排查步骤:
1. 确认服务运行中:本地 `python3 app.py` / 线上 `systemctl status event-driven`
2. `curl http://localhost:5566/api/health` 应返回 `{"status":"ok"}`
3. 线上:`curl http://racingai.top/api/health`
4. 测试分析接口:`curl -X POST http://racingai.top/api/analyze -H 'Content-Type: application/json' -d '{"text":"央行降准0.5个百分点"}'`
5. 浏览器 F12 控制台检查 fetch 请求是否发出、是否有 CORS 错误
The file's natural-language interface, usage text, and system prompt are written entirely in Chinese and instruct the model to produce Chinese-language output, with no opt-in or language selection mechanism. This constitutes a locale/language policy issue because the skill enforces a specific language rather than offering a user choice or clearly documenting a necessary regional constraint.
The script sends full news text to a third-party LLM API without a clear user-facing disclosure at runtime about external transmission, retention, or privacy implications. If users provide proprietary research, embargoed news, or internal notes, sensitive data may be exposed to an external service contrary to user expectations or policy.
The entire template, including headings, warnings, and labels, is fixed in Chinese. This imposes a specific language/locale on all generated reports, and the file does not indicate any user opt-in or configurable language selection.
The Security section states that scripts/news_analyzer.py reads QIANFAN_API_KEY from the environment and exits with an error if it is not set. Earlier, the Features section says the system has a degradation mechanism that falls back to inline analysis when the Qianfan API is unavailable, which conflicts with an unconditional exit-on-missing-key description and creates a documentation-level contradiction about runtime behavior.
The README says the agent will automatically trigger when users post financial news in the '新闻流事件驱动选股' group, and the primary documentation is Chinese-focused. This suggests a locale/language-specific operating assumption without explicit opt-in or a documented justification for restricting behavior to that language/context.
Natural-language policy violations apply to all file types, including markdown. This file forces a specific language/locale for all instructions and operational guidance, with no opt-in, alternative language, or explanation that the skill is intentionally Chinese-only or region-specific.
No suspicious patterns detected.