T09 · Insecure Skill Coding Practices
- Location
jq_config.py:8- Finding
Enabled plaintext JQData credentials are embedded and automatically transmitted
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Chinese stock-research tool, but it ships plaintext financial-data service credentials and enables authenticated provider access in ways the documentation says are disabled or user-configured.
Review before installing or running. The embedded JQData password and Tushare token should be removed and rotated, authentication should use user-supplied environment secrets, JQData documentation should match implementation, and pickle caches should be replaced with a safer format before use in a shared or sensitive environment.
jq_config.py:8Enabled plaintext JQData credentials are embedded and automatically transmitted
tushare_config.py:8Enabled plaintext Tushare API token is distributed in source code
data_fetcher.py:174Executable pickle caches allow local arbitrary code execution
requirements.txt:4Unpinned third-party dependencies create mutable supply-chain exposure
Generic Tushare authentication/configuration is broader than the stated HS300-specific functionality and normalizes embedding credential-handling within the skill. This is risky because it encourages secret placement in code-adjacent content and obscures the extent of third-party data access.
Generic Tushare authentication/configuration is broader than the stated HS300-specific functionality and normalizes embedding credential-handling within the skill. This is risky because it encourages secret placement in code-adjacent content and obscures the extent of third-party data access.
Generic Tushare authentication/configuration is broader than the stated HS300-specific functionality and normalizes embedding credential-handling within the skill. This is risky because it encourages secret placement in code-adjacent content and obscures the extent of third-party data access.
Generic Tushare authentication/configuration is broader than the stated HS300-specific functionality and normalizes embedding credential-handling within the skill. This is risky because it encourages secret placement in code-adjacent content and obscures the extent of third-party data access.
Generic Tushare authentication/configuration is broader than the stated HS300-specific functionality and normalizes embedding credential-handling within the skill. This is risky because it encourages secret placement in code-adjacent content and obscures the extent of third-party data access.
Generic Tushare authentication/configuration is broader than the stated HS300-specific functionality and normalizes embedding credential-handling within the skill. This is risky because it encourages secret placement in code-adjacent content and obscures the extent of third-party data access.
Generic Tushare authentication/configuration is broader than the stated HS300-specific functionality and normalizes embedding credential-handling within the skill. This is risky because it encourages secret placement in code-adjacent content and obscures the extent of third-party data access.
Generic Tushare authentication/configuration is broader than the stated HS300-specific functionality and normalizes embedding credential-handling within the skill. This is risky because it encourages secret placement in code-adjacent content and obscures the extent of third-party data access.
Generic Tushare authentication/configuration is broader than the stated HS300-specific functionality and normalizes embedding credential-handling within the skill. This is risky because it encourages secret placement in code-adjacent content and obscures the extent of third-party data access.
Generic Tushare authentication/configuration is broader than the stated HS300-specific functionality and normalizes embedding credential-handling within the skill. This is risky because it encourages secret placement in code-adjacent content and obscures the extent of third-party data access.
Generic Tushare authentication/configuration is broader than the stated HS300-specific functionality and normalizes embedding credential-handling within the skill. This is risky because it encourages secret placement in code-adjacent content and obscures the extent of third-party data access.
Allowing 'arbitrary natural-language questions' through pywencai creates an effectively unbounded trigger and query surface. In this context that is especially dangerous because user prompts may be transmitted to a third party and used for activities far outside the declared HS300 research scope.
The script contains hard-coded JQData credentials and immediately authenticates with them. Embedded secrets are dangerous because anyone with access to the file can reuse the account, extract data under the owner's identity, incur cost or quota abuse, and potentially pivot into other systems if credentials are reused.
Using hard-coded JQData credentials without disclosure or safe handling exposes sensitive account material directly in code. This creates immediate credential leakage risk for developers, users, repositories, logs, and downstream packaging, and the HS300 research context does not justify embedding live secrets in a distributed skill.
The documentation claims JQData is disabled, but the code still authenticates and uses it for multiple data paths. This mismatch is dangerous because reviewers, operators, or calling agents may rely on the documented behavior and unknowingly permit external authentication, secret use, and outbound data access that they intended to forbid.
The script embeds a live JQData username and password directly in source code via jq.auth(...). Hard-coded credentials are a real secret exposure risk: anyone with access to the skill can reuse the account, consume paid quota, access associated data/services, or pivot into other environments if the password is reused elsewhere. In a research skill, this is not necessary to expose to downstream users and materially increases risk.
This finding is also valid because the code performs authentication with hard-coded credentials and gives no warning, consent flow, or disclosure to the user that a third-party account is being used on their behalf. That creates both a security issue and a trust/compliance issue: users may unknowingly trigger actions under someone else's account, and exposed credentials can be abused by any reader of the code.
The file contains hardcoded username and password credentials in plaintext. Anyone with repository, package, log, or artifact access can recover and misuse them to access the JQData account, potentially leading to data misuse, account takeover, billing exposure, or lateral compromise if the password is reused elsewhere.
The manifest says this skill is for researching HS300 index constituents and large-cap CSI 300 equities, but the file is explicitly an SZSE data source module and implements generic SZSE A-share, index, and announcement retrieval. This is broader and semantically different from an HS300-focused research skill because it operates at exchange scope rather than restricting itself to CSI 300 constituents.
The skill documents networked data collection and local file outputs/cache behavior, but it declares no explicit tool scope or permission boundaries. In an agent environment, undeclared network and write capabilities increase the chance of unintended data exfiltration, uncontrolled external requests, or filesystem side effects without user awareness.
The invocation guidance is so broad that it could activate on many ordinary stock-analysis requests, not just HS300-specific tasks. Overbroad triggers are dangerous in agent systems because they increase accidental invocation of a networked, externally querying skill outside its intended scope.
The skill relies on multiple third-party data providers, but the documentation does not clearly warn that user queries and research requests may be transmitted externally. This lack of transparency is dangerous because users may unknowingly disclose proprietary strategies, watchlists, or sensitive research interests to outside services.
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
jq_config.py�?```pythonJQ_USER = '手机�? JQ_PASSWORD = '密码' JQ_AUTH = False # 免费版数据截�?026-02-10,已禁用
### Tushare Pro(可选)
This Python file contains user-facing natural-language descriptions entirely in Chinese, including the module docstring and later printed status/test messages, with no indication that users may choose another language. Under the language/locale policy, forcing a specific language without user opt-in is a natural-language policy violation unless clearly justified as region-specific; this file does not state such a justification.
The module deserializes cache files with pickle.load(), which executes attacker-controlled Python opcodes during loading. If an attacker can write or replace files in the cache directory, merely reading cached data can trigger arbitrary code execution; because this skill fetches remote data and may run in shared agent environments, trusting local cache contents is unsafe.
return None
try:
with open(path, 'rb') as f:
return pickle.load(f)
except Exception:
return None