Back to skill

Security audit

Stocktoday Data

Security checks for vulnerabilities and agentic risk

Overview

This finance data skill is mostly coherent, but it redirects API-token traffic to a custom gateway and documents insecure HTTP backup gateways, so it needs careful Review before installation.

Install only if you are comfortable sending your Tushare token and financial query history to the StockToday gateway. Avoid the documented HTTP backup gateways, consider using a dedicated/limited token, and rotate any token previously used through those endpoints.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/proxy_demo.py:25
Finding

Tushare API Credential Disclosed to a Non-Official Gateway

Content
View full analysis
"ts.pro_api": """ 获取已劫持到 StockToday gateway 的 tushare pro client 优先顺序: 参数 > TUSHARE_TOKEN env > TUSHARE_GATEWAY env > 默认 gateway """ token = token or os.getenv("TUSHARE_TOKEN") or "your_token_here" gateway = gateway or os.getenv("TUSHARE_GATEWAY") or DEFAULT_GATEWAY pro = ts.pro_api(token) # 劫持 tushare 内部属性, 让流量走 stocktoday gateway pro._DataApi__token = token pro._DataApi__http_url = gateway return pro ``` The related Skill documentation explicitly instructs users to redirect the authenticated client: ```python import tushare as ts pro = ts.pro_api("your_token") pro._DataApi__http_url = "https://tushare.citydata.club/" ``` ### Technical Analysis The wrapper reads a sensitive Tushare API token from a function argument or the `TUSHARE_TOKEN` environment variable. It then overwrites the Tushare client's private token and HTTP endpoint fields, causing authenticated requests to be sent to `tushare.citydata.club` rather than the official Tushare endpoint. Consequently, the custom gateway receives the authentication data needed to process the request, together with the requested instruments, date ranges, financial queries, and other research activity. This contradicts the documentation's assertion that the token is not uploaded to a third party. Overwriting private client attributes also bypasses the endpoint selection and trust assumptions of the official client. A gateway under separate operational control can observe credentials and ...[truncated 1572 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:538
Finding

Documented Backup Gateways Permit Plaintext Transmission of API Credentials

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (15)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The documentation tells users the token is not uploaded to any third party, but the implementation rewrites the Tushare backend URL to a non-official StockToday gateway. Because the token is used in requests to that gateway, the operator of the third-party service can receive and misuse API credentials and all requested financial data, making this a credential-exposure and trust-boundary violation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill says these phrasings 'directly enter the skill' and includes generic expressions like '看下 XX 最近怎么样', '谁更强', '新闻', '快速研究 XX', and '做份简报'. These are broad research-oriented phrases that could match ordinary conversation without clear boundaries, exclusions, or a constrained invocation context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The section titled '中文自然语言默认口径' specifies a Chinese-language interpretation policy as the default behavior, but does not mention any user choice for language or locale. This can violate language/locale policy requirements when users have not opted into Chinese output or parsing conventions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest describes a skill for stock, fund, futures, options, bonds, macro research, news, and data export workflows. This file advertises non-financial '其他' endpoints such as movie box office, cinema revenue, film/TV备案, and Taiwan TMT monthly revenue, which go beyond the stated investment-research purpose rather than serving as an obvious implementation detail.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documented token_info endpoint allows direct inspection of the caller's token status, permissions, expiry, and enabled plugins. In an agent setting, this creates unnecessary credential-metadata exposure and can aid reconnaissance by revealing entitlement and environment details that are unrelated to normal market-research tasks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The markdown explicitly encourages token-status checking and describes returning token validity, permissions, and enabled plugins, but provides no warning that this reveals credential metadata. In an LLM-agent context, even self-only token inspection is dangerous because the agent can be induced to disclose internal capability information that helps attackers tailor follow-on abuse or social engineering.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module docstring and usage instructions are written in Chinese, and the runtime output messages are also Chinese-only. This imposes a specific language on users without any opt-in, fallback, or explanation that the skill is region-specific, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The demo hardcodes fallback gateways using raw IP addresses over plain HTTP and the file’s stated purpose is to hijack all tushare traffic to a third-party backend. This creates a real security risk because API tokens and all returned market data can be intercepted, redirected, or served by an untrusted host, and raw IP failovers bypass normal domain-based trust controls and certificate validation expectations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains natural-language instructions and user-facing strings exclusively in Chinese, including the module docstring and printed status messages. Under the policy rule for language/locale, forcing a specific language without user opt-in can be a policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency on tushare is only lower-bounded and not pinned, so installs may resolve to different future releases with unreviewed code or breaking changes. In this skill's context, that risk is elevated because the description explicitly says it 'hijacks' the official tushare library to use a custom backend, increasing supply-chain and integrity concerns around what code and endpoints are actually used.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
tushare>=1.4.0
pandas>=1.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
92% confidence
Finding

The pandas dependency is also unpinned, which makes builds non-reproducible and can introduce vulnerable or incompatible releases without review. While pandas itself is a common library, allowing any version >=1.0 expands exposure to known and future issues in the dependency chain.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
tushare>=1.4.0
pandas>=1.0

Unverifiable Dependency: pandas has 1 known advisory(ies) (CVE-2020-13091 (** DISPUTED ** pandas through 1.0.3 can unserialize and execute commands from an)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring and user-facing usage text are entirely in Chinese, and the runtime print messages are also Chinese-only. This can violate a language/locale policy when a skill forces one language without user opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The printed status/output strings shown to users are Chinese-only and there is no mechanism to choose another language. This is a natural-language policy concern because the skill imposes a locale without opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.