T09 · Insecure Skill Coding Practices
- Location
quant_selector.py:24- Finding
Hard-Coded JQData Account Credentials
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent A-share stock-screening tool, but it embeds undisclosed JQData credentials and its documented screening method does not match the code closely enough for a finance workflow.
Review carefully before installing. Do not use this package with the embedded JQData credentials; they should be removed and rotated by the publisher. Treat outputs as informational only, because the actual stock universe and filters differ from the SKILL.md description, and use pinned dependencies in an isolated environment if testing it.
quant_selector.py:24Hard-Coded JQData Account Credentials
README.md:29Unpinned Third-Party Runtime Dependencies
quant_selector.py:82Documented Financial Risk Controls Are Not Implemented and Data Failures Are Silently Suppressed
The skill documentation materially misrepresents behavior: it claims A股全市场 selection with specific first-layer filters, while the implementation reportedly uses a narrower stock universe, different filtering logic, and undeclared external credentials. This is dangerous because users and downstream agents may make financial decisions under false assumptions, and hidden credential use introduces an additional secret-handling and unauthorized external access risk.
The file contains hardcoded JQData credentials and immediately uses them for external authentication. Plaintext secrets in source code are highly sensitive because they can be copied, reused, leaked through version control, or abused to access the linked third-party account outside the intended stock-selection workflow.
Using hardcoded credentials for external authentication without any user-facing disclosure means the skill silently authenticates to a third-party service with embedded account data. In this context, that is especially dangerous because the skill is expected to do stock screening, not secretly carry reusable account secrets; an operator or downstream system could unknowingly expose or misuse them.
Plaintext authentication credentials are present in the source and can be disclosed through repository access, code review, logs, backups, or model/tool reuse. Because this skill operates in a normal application context, there is no legitimate need to expose secrets inline; their presence materially increases the chance of account compromise and downstream abuse.
The trigger text is overly broad and can cause the skill to activate for generic stock-selection or recommendation requests without clear user consent or scope control. In a finance context, this increases the chance of unintended execution, over-reliance on a specific strategy, and recommendations being produced in situations where the user did not specifically request this methodology.
The usage section defines invocation conditions loosely, including broad phrases like generating stock recommendation lists, which can lead to accidental or inappropriate routing to this skill. Because this is a finance skill, ambiguous activation is more dangerous than in low-risk domains: it may steer users into a specific investment workflow without sufficient context, suitability checks, or methodology disclosure.
Natural-language strings throughout the file, including the module description, prompts, and output messages, are exclusively in Chinese. This imposes a specific language on users without opt-in or an alternative locale path, which matches the language/locale policy violation criteria.
The documentation says layer 1 excludes stocks based on asset-liability ratio above 70% and bottom-20% average turnover, and later prints '剔除亏损/高杠杆/低流动性公司'. But the code actually filters on negative adjusted profit, PB > 10, and market cap < 10, without computing leverage ratio or trading-amount ranking.
The manifest says the skill selects stocks '从A股全市场中' using a three-layer process, but the implementation restricts the universe to representative index constituents and then truncates to at most 500 symbols. This materially narrows the selection universe, so the actual behavior does not match the described scope of screening the full A-share market.
The document content, headings, usage notes, and warnings are all presented only in Chinese. Under the policy for natural-language violations, forcing a specific language without user opt-in can be a locale/language policy issue unless the constraint is clearly justified.
The layer-3 docstring states an industry cap of 3-5 stocks, while the code hardcodes max_per_industry = 5. Later output states '每行业最多3只', which contradicts the implemented cap and can mislead users about the portfolio-construction behavior.
No suspicious patterns detected.