Back to skill

Security audit

新闻流事件驱动选股系统

Security checks across malware telemetry and agentic risk

Overview

The skill performs the advertised stock-news analysis, but it broadly auto-processes chat/news content and includes under-scoped public deployment guidance with plaintext HTTP and root SSH administration.

Review before installing. Use only with explicit invocation or a dedicated approved channel, do not submit confidential or regulated financial information, configure Qianfan credentials carefully, and avoid the documented production deployment as written unless HTTPS, authentication, least-privilege deployment accounts, and clear consent notices are added.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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

Error
Location
references/web-dashboard-setup.md:55
Finding
Public Analysis Endpoint Transmits User-Supplied Financial Content over Plaintext HTTP<![CDATA[ ## Vulnerability Details **File Location**: `references/web-dashboard-setup.md`, lines 55-89 **Vulnerability Type**: Plaintext transmission of potentially sensitive user input **Risk Level**: High ### Vulnerable Code ```nginx server { listen 80; server_name racingai.top www.racingai.top; # Event-driven trading dashboard location /event-driven { proxy_pass http://127.0.0.1:5566; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } # Analysis API location = /api/analyze { proxy_pass http://127.0.0.1:5566; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_read_timeout 120s; } # Health check location = /api/health { proxy_pass http://127.0.0.1:5566; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } # Other traffic location / { proxy_pass http://127.0.0.1:5173; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; } } ``` The documentation also explicitly tests the production API over HTTP: ```bash curl http://racingai.top/api/health curl -X POST http://racingai.top/api/analyze -H 'Content-Type: application/json' -d '{"text":"央行降准0.5个百分点"}' ``` ### Technical Analysis The documented public nginx server listens only on TCP port 80 and provides no TLS listener or redirect to HTTPS. Consequently, news submitted to `/api/analyze` and the resulting investment analysis cross the client-facing network in plaintext. Although the backend subsequently sends the news to Baidu Qianfan through HTTPS, that protection does not ...[truncated 1793 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Configure nginx with a valid TLS certificate and serve the dashboard and API exclusively over HTTPS. 2. Redirect all port 80 traffic to HTTPS: ```nginx server { listen 80; server_name racingai.top www.racingai.top; return 301 https://$host$request_uri; } ``` 3. Add a TLS-enabled virtual host: ```nginx server { listen 443 ssl; server_name racingai.top www.racingai.top; ssl_certificate /path/to/fullchain.pem; ssl_certificate_key /path/to/privkey.pem; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; location = /api/analyze { proxy_pass http://127.0.0.1:5566; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_read_timeout 120s; } } ``` 4. Change every documented dashboard and API URL from `http://` to `https://`. 5. Add an explicit privacy notice explaining that submitted text is transferred to Baidu Qianfan and warning users not to submit confidential or regulated information. 6. Require authentication and authorization for `/api/analyze` if it is not intended to be a fully public service. 7. Add request-size limits, rate limiting, access logging, and abuse monitoring. 8. Validate deployment automatically to ensure that production API requests cannot be completed over plaintext HTTP. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
references/web-dashboard-setup.md:167
Finding
Deployment Instructions Require Unnecessary Direct Root SSH Access<![CDATA[ ## Vulnerability Details **File Location**: `references/web-dashboard-setup.md`, lines 167-170 **Vulnerability Type**: Excessive deployment privileges and violation of least privilege **Risk Level**: Medium ### Vulnerable Code ```bash # Copy updated files scp ~/.hermes/output/event-driven-trader-dashboard.html root@<SERVER_IP>:/var/www/event-driven/ scp ~/.hermes/skills/quant-finance/wq-news-event-driven-stock-pick/scripts/news_analyzer.py root@<SERVER_IP>:/var/www/event-driven/ # Restart service ssh root@<SERVER_IP> "systemctl restart event-driven" ``` Equivalent root-level deployment instructions also appear in `SKILL.md`: ```bash scp ~/.hermes/output/event-driven-trader-dashboard.html root@<SERVER_IP>:/var/www/event-driven/ scp ~/.hermes/skills/quant-finance/wq-news-event-driven-stock-pick/scripts/news_analyzer.py root@<SERVER_IP>:/var/www/event-driven/ ssh root@<SERVER_IP> "systemctl restart event-driven" ``` ### Technical Analysis Uploading two application files and restarting one service do not require unrestricted root access. The documented workflow instead instructs operators to establish direct SSH sessions as `root`, copy executable application content into the production server, and invoke `systemctl`. This exceeds the minimum privileges necessary for the Skill's declared news-analysis functionality. It also creates an unnecessarily broad credential boundary: compromise of the deployment key, operator workstation, SSH agent, or deployment session can yield complete control of the server rather than access limited to the application. The project does not read, create, modify, or exfiltrate SSH keys. The risk arises from the documented use of privileged remote access, not from embedded SSH-key manipulation. ### Attack Path 1. An operator configures direct root SSH access to follow the documented deployment process. 2. Root credentials or an authorized root SSH key become available on the operator workstation or through an SSH agent ...[truncated 1180 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Disable direct root SSH login: ```text PermitRootLogin no ``` 2. Create a dedicated deployment account that has no interactive administrative privileges and can write only to a staging or release directory. 3. Assign application files to a dedicated service account rather than `root`. 4. Grant narrowly scoped `sudo` permission only for the required service action, for example: ```sudoers deploy ALL=(root) NOPASSWD: /bin/systemctl restart event-driven.service deploy ALL=(root) NOPASSWD: /bin/systemctl status event-driven.service ``` 5. Do not grant the deployment account unrestricted `sudo`, shell access as the service user, or write access to nginx and systemd configuration. 6. Upload versioned, integrity-checked release artifacts to a staging directory and perform an atomic deployment after verification. 7. Pin the SSH host key in `known_hosts`, require host-key verification, and protect deployment keys with passphrases or hardware-backed credentials. 8. Prefer a reviewed CI/CD pipeline with short-lived credentials, approval controls, immutable artifacts, and deployment audit logs. 9. Separate unrelated applications onto different service accounts or hosts to reduce the impact of a deployment-account compromise. 10. Update all documentation examples to use the restricted deployment account instead of `root@<SERVER_IP>`. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (8)

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill invokes local Python scripts, reads local files, and calls external APIs, but the manifest does not declare corresponding permissions or data-handling expectations. This creates a trust and review gap: operators may approve or trigger the skill without realizing it can access environment data, local paths, and transmit content over the network.

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The skill scope expands from simple news-driven stock analysis into instructions for running a local/remote web service, reverse proxying, and production deployment. This broader operational surface increases attack exposure and can lead users to deploy network-accessible infrastructure that was not implied by the original skill purpose or permission model.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The documentation includes SCP/SSH deployment steps, systemd service control, nginx configuration, and remote server file paths that are unrelated to ordinary stock-picking analysis. Embedding server-administration guidance in a skill raises the chance of unsafe operator actions, accidental exposure of services, and misuse of privileged infrastructure from within an analysis workflow.

Vague Triggers

Medium
Confidence
87% confidence
Finding
The trigger description says Hermes Agent will automatically activate when财经新闻 is posted in the group, which is overly broad for a group-chat environment. This can cause unintended processing of normal conversation, external or attacker-supplied content, and unnecessary transmission of message contents to the analysis pipeline or third-party API, creating privacy, cost, and prompt-injection exposure.

Vague Triggers

Medium
Confidence
84% confidence
Finding
The trigger condition is broad enough to activate on essentially any finance-, policy-, industry-, or company-related text in a group chat. That can cause unintended processing of messages, unexpected external transmission to the analysis API, and analysis runs on content users did not mean to submit to the system.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill asks users to submit news text for analysis via Baidu Qianfan API but does not provide a clear privacy warning that submitted content will be sent to an external service. In a chat context, this can expose proprietary research, internal communications, or sensitive market-moving information without informed user consent.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The document explicitly describes sending user-entered news text from the browser to a backend, which then forwards it to Baidu Qianfan for NLP analysis, but it does not mention any user-facing disclosure, consent, or data-handling warning. Because users may paste proprietary research, client data, or other sensitive financial information, this creates a real privacy and compliance risk through third-party transmission.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script transmits user-provided news content to Baidu Qianfan without an explicit user-facing consent notice at runtime beyond what can be inferred from the source code. If operators pass proprietary research, embargoed news, customer data, or regulated content, this can create unintended third-party data disclosure and compliance risk.

VirusTotal

VirusTotal findings are pending for this skill version.

View on VirusTotal

Static analysis

No suspicious patterns detected.