Back to skill

Security audit

Quant-Expert

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed China A-share market analysis helper that uses Tushare, a holiday API, optional web research, and user-requested file exports without hidden persistence or destructive behavior.

Install only if you are comfortable providing a Tushare API token and allowing market-data/network queries. For recommendation-style use, verify cited web sources independently and treat outputs as decision support, not financial advice. Use --output only with paths you intend to create or overwrite.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (11)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill advertises and operationalizes access to environment secrets, networked data retrieval, and scripts that may write files, but it does not declare an explicit tool/permission scope. That creates an authorization ambiguity where an agent may invoke broader capabilities than a reviewer or user expects, increasing the risk of secret exposure or unintended external access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The instruction "Always reason in Beijing time" imposes a fixed locale/timezone behavior for all uses of the skill. The file does not indicate user opt-in or that this locale constraint is optional, which matches the policy concern for forced locale behavior.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document states that advanced combinations are not fully automated by the shipped scripts, implying the shipped implementation is limited to Tushare-based helpers. Later sections prescribe a mandatory 'Event Intelligence' web layer with source URLs for judgment tasks, which contradicts that earlier characterization of what shipped automation covers.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation makes external web event intelligence mandatory for judgment-oriented stock diagnosis, even though the skill metadata scopes the skill to Tushare Pro data and a holiday helper. This scope expansion can cause the agent to access untrusted external content, increasing prompt-injection risk, data provenance issues, and potentially violating deployment expectations or network restrictions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This section defines a general web-based evidence pipeline with source collection, scoring, and URLs, which materially extends the skill beyond its declared Tushare-and-holiday-helper scope. In an agent setting, such undocumented external retrieval broadens the attack surface to adversarial web content and can induce unsafe tool use, misleading analysis, or policy bypass through untrusted documents.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module description states the script is specifically for Chinese holidays and determines dates using Beijing time, and the implementation consistently defaults to Beijing time for 'today'. Because the skill fixes a specific locale/timezone behavior without offering a user-selectable option or explicit opt-in, it matches the policy category for forced locale behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring states that all date logic uses Beijing time, which imposes a specific locale/timezone policy on all users. Because the script does not offer a timezone choice or explain that it is strictly intended for a China-market-specific context, this is a natural-language locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring states that all date logic uses Beijing time (UTC+8), imposing a specific locale/timezone policy on all users. The file does not offer an alternative timezone selection or explain a region-specific compliance need, so this is a natural-language locale policy issue.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes a quantitative analysis skill centered on screening and market-data queries, which implies read-oriented analytics. This script additionally accepts an arbitrary output path and persists results to disk via CSV export, which is extra behavior beyond simply performing analysis or returning Tushare data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code performs a file write via to_csv() using a path supplied by --output, but the only disclosure is the argument definition and a post-write info message. There is no prior warning, confirmation, or inline comment/docstring calling out that the script will create or overwrite a local file when this option is used.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/tushare_helper.py (reported line 201)May include surrounding context.

python
for attempt in range(retry + 1):
            try:
                self._rate_limit()
                api_func = getattr(self.pro, api_name)
                df = api_func(**params)
                if df is not None and not df.empty:
                    return df

Static analysis

No suspicious patterns detected.