Back to skill

Security audit

Hs300 Research V5

Security checks for vulnerabilities and agentic risk

Overview

This stock-research skill is mostly purpose-related, but it exposes service credentials and gives investment-style guidance from misleading or simulated data paths.

Review before installing. The publisher should remove and rotate embedded credentials, make JQData status truthful and opt-in, replace or clearly watermark simulated market inputs, scope third-party queries to the intended HS300 workflow, and pin dependencies. Users should not run this with packaged credentials or rely on its position guidance without validating data provenance.

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

Lp3

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding
The skill describes commands and architecture that perform network access and likely write reports/files, yet it declares no permissions. This creates a capability-transparency gap: a caller or platform may treat the skill as low-risk while it can still reach external services and persist output, increasing the chance of unauthorized data egress, unexpected filesystem changes, or policy bypass.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The declared purpose is narrow HS300 constituent research, but the skill content indicates substantially broader behavior: multi-provider connectivity, natural-language querying, technical/fundamental screening, report generation, and use of external credentials. This mismatch is dangerous because reviewers and users may authorize the skill under a limited-risk mental model while it actually performs broader data collection and external interactions, including credentialed access to third-party services.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The script hard-codes JQData credentials directly in source code, which exposes an external service account to anyone with file access and makes accidental disclosure through version control, logs, or redistribution very likely. An exposed credential can be abused to consume paid quotas, access account-scoped data, or impersonate the account holder, and the skill context does not justify embedding secrets in code.

Description-Behavior Mismatch

Medium
Confidence
87% confidence
Finding
The skill advertises HS300 constituent research, but pywencai_query exposes unrestricted natural-language queries to an external market service. That broadens the capability boundary and allows users or upstream agents to issue arbitrary exchange-wide requests, increasing data exfiltration, policy bypass, and unintended outbound-query risk beyond the declared scope.

Description-Behavior Mismatch

Medium
Confidence
84% confidence
Finding
The ability to download exchange announcement PDFs is broader than the stated purpose of HS300 constituent research and index tracking. Unscoped file download functionality can be abused to fetch and store arbitrary remote documents from exchange infrastructure, expanding the attack surface and data-handling responsibilities of the skill.

Context-Inappropriate Capability

Medium
Confidence
86% confidence
Finding
The module exposes broad exchange-wide announcement, stock-list, index, and IPO retrieval functions that exceed the manifest's narrow HS300 research scope. This mismatch increases the chance that a calling agent can use the skill as a general market data and disclosure retriever, undermining least-privilege assumptions and expanding outbound/network behavior unexpectedly.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
Comments and runtime messaging state that JQData is disabled, but the code still imports credentials, authenticates, and actively queries JQData for daily and fundamentals data. This deceptive capability mismatch can mislead reviewers and users about outbound authentication and data flows, causing hidden third-party access with stored credentials.

Context-Inappropriate Capability

High
Confidence
99% confidence
Finding
The file embeds a live JQData username and password directly in source code via jq.auth(...). Hard-coded third-party credentials are a real secret exposure: anyone who can view the skill can reuse the account, consume paid quotas, access associated data/services, or pivot into other environments if the password is reused.

Intent-Code Divergence

Medium
Confidence
86% confidence
Finding
The file’s comment says JQData should only be enabled after approval, but the configuration sets JQ_AUTH = True anyway. This creates a governance and access-control bypass risk: code may connect to an external data service before approval, potentially using embedded credentials without authorization.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The skill is declared as HS300 constituent research, but it also pulls and reports pywencai market-wide screening results that may include non-HS300 stocks and sectors. This expands scope silently and can mislead downstream users into acting on data outside the intended investment universe, weakening trust and control boundaries.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The code generates synthetic random index data with generate_market_index_data() and later uses it as if it were real market input. In a financial research skill, fabricated market context can directly distort analysis, rankings, and position recommendations, causing materially incorrect decisions.

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The script presents simulated index-derived outputs as real 'market environment judgment' and uses them to produce suggested total position and other investment-style guidance. This is dangerous because users may rely on authoritative-looking but fictional analytics when allocating capital or assessing risk.

Vague Triggers

Medium
Confidence
79% confidence
Finding
The trigger section includes a catch-all activation such as arbitrary natural-language queries, which can cause the skill to run for requests well beyond its intended domain. Overbroad triggering raises the risk of unintended execution, excessive external requests, and user prompt content being sent to third-party data services without clear scoping.

Missing User Warnings

High
Confidence
99% confidence
Finding
Using hardcoded JQData credentials without warning or disclosure means the script silently authenticates to a third-party account and encourages insecure credential handling practices. This creates both secret-exposure risk and unauthorized use risk, especially if the file is shared as part of a reusable research skill.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The module performs outbound authentication using local credentials to JQData/Tushare without any user-facing disclosure or consent mechanism. In an agent environment, hidden credentialed network access is risky because it can surprise users, leak behavioral metadata to third parties, and violate expected trust boundaries.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
pywencai_query forwards arbitrary natural-language input to an external third-party service without any user-facing warning, validation, or scope restriction. In an agent setting, this can leak sensitive user-provided text, permit unintended third-party processing, and enable broader queries than the skill’s manifest suggests.

Missing User Warnings

High
Confidence
97% confidence
Finding
The code not only stores credentials in the file but automatically authenticates with them without disclosure or user consent. That makes the secret operationally exploitable in any environment where the skill runs, increasing the chance of unauthorized account use, billing abuse, and accidental leakage through logs, forks, or redistribution.

Missing User Warnings

Medium
Confidence
99% confidence
Finding
The file contains hardcoded credentials in plaintext, which is a direct secret exposure issue. Anyone with repository or package access can reuse the account, leading to unauthorized API usage, billing/quotas abuse, account compromise, and possible lateral exposure if the password is reused elsewhere.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The fetcher accepts a raw cookie and forwards it to a network-backed third-party query library without any disclosure, scoping, or handling safeguards. If the cookie contains authenticated session material, accidental reuse, logging elsewhere in the stack, or use against an unexpected backend could expose account access or sensitive session context.

Missing User Warnings

Medium
Confidence
99% confidence
Finding
A live-looking Tushare API token is hardcoded directly in source and authentication is enabled, which exposes a credential to anyone with file access and encourages insecure secret handling. Even if the token is only for data access, it can be abused for unauthorized API use, quota exhaustion, account misuse, or leakage into downstream repos, logs, and packaged artifacts.

Unpinned Dependencies

Low
Category
Supply Chain
Content
# 沪深300多因子投研系统依赖清单

# 数据获取
akshare>=1.8.0
tushare>=1.2.89
pywencai>=0.13.0    # 同花顺问财 — 自然语言补充查询
# jqdatasdk>=1.8.0  # 已禁用 — 免费版数据截止2026-02-10
Confidence
95% confidence
Finding
The dependency is specified with a lower-bound constraint only, which allows future installs to resolve to different versions over time. This creates supply-chain and reproducibility risk because a later release could introduce malicious code, breaking changes, or newly disclosed vulnerabilities without review.

Unpinned Dependencies

Low
Category
Supply Chain
Content
# 数据获取
akshare>=1.8.0
tushare>=1.2.89
pywencai>=0.13.0    # 同花顺问财 — 自然语言补充查询
# jqdatasdk>=1.8.0  # 已禁用 — 免费版数据截止2026-02-10
Confidence
95% confidence
Finding
Using tushare>=1.2.89 permits unreviewed newer versions to be installed, making builds non-reproducible and increasing dependency-chain risk. In a research skill that pulls external market data, this could unexpectedly change runtime behavior or pull in a compromised upstream release.

Unpinned Dependencies

Low
Category
Supply Chain
Content
# jqdatasdk>=1.8.0  # 已禁用 — 免费版数据截止2026-02-10

# 数据处理
pandas>=1.3.0
numpy>=1.21.0

# 技术分析
Confidence
95% confidence
Finding
A lower-bound-only pandas requirement allows environments to resolve to arbitrary future versions, weakening build integrity and reproducibility. While not an immediate exploit by itself, it increases supply-chain exposure and can silently introduce vulnerable or incompatible code.

Unpinned Dependencies

Low
Category
Supply Chain
Content
# 数据处理
pandas>=1.3.0
numpy>=1.21.0

# 技术分析
ta-lib>=0.4.24
Confidence
93% confidence
Finding
The numpy requirement is unpinned, so installations may pull different future versions depending on timing and resolver state. This is a common but real supply-chain hygiene issue because it reduces reproducibility and can admit vulnerable or malicious releases unexpectedly.

Unpinned Dependencies

Low
Category
Supply Chain
Content
numpy>=1.21.0

# 技术分析
ta-lib>=0.4.24

# 科学计算
scipy>=1.7.0
Confidence
94% confidence
Finding
ta-lib>=0.4.24 allows any later version, which means the deployed package contents can vary over time without code changes. That creates a low-severity supply-chain risk and can also lead to instability in financial analysis workflows that depend on deterministic calculations.

Static analysis

No suspicious patterns detected.