Back to skill

Security audit

akshare-local-workbench

Security checks for vulnerabilities and agentic risk

Overview

This is a real local AKShare workbench, but it under-discloses AI-provider credential handling and has local cache and dependency risks users should review before installing.

Install only if you want a local AKShare financial data workbench and are comfortable with its AI assistant feature. Keep the backend and frontend bound to localhost, use HTTPS or a trusted local model endpoint for AI configuration, avoid entering high-value API keys unless you understand where they will be sent, rotate/delete any key saved in ai_config.json when done, keep cache directories private, and update the flagged frontend dev dependencies before routine use on sensitive machines.

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

T09 · Insecure Skill Coding Practices

Warning
Location
assets/akshare-workbench/backend/app/services/ai_config.py:49
Finding

AI API Credentials Are Stored in Plaintext and May Be Forwarded to an Untrusted or Cleartext Endpoint

Content
View full analysis
AIConfig: config = AIConfig( base_url=base_url.strip(), model=model.strip(), api_key=api_key.strip(), ) with _lock: _CONFIG_DIR.mkdir(parents=True, exist_ok=True) with _CONFIG_PATH.open("w", encoding="utf-8") as fh: json.dump( { "base_url": config.base_url, "model": config.model, "api_key": config.api_key, }, fh, ensure_ascii=False, indent=2, ) return config ``` The configuration API accepts any nonempty Base URL and persists it together with the API key. It does not require HTTPS, restrict the destination host, or explicitly confirm custom endpoints: ```python @router.put("/ai/config", response_model=AIConfigPublic) def update_ai_config(payload: AIConfigUpdate) -> AIConfigPublic: from app.services.ai_config import load_config, save_config if not payload.base_url.strip() or not payload.model.strip(): raise HTTPException( status_code=status.HTTP_422_UNPROCESSABLE_ENTITY, detail="base_url 与 model 不能为空。", ) api_key = payload.api_key.strip() if not api_key: existing = load_config() if existing is None: raise HTTPExcept ...[truncated 5337 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (60)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The static analysis indicates the packaged skill behavior extends beyond the declared local workbench operations into external LLM/provider communication, intent parsing from chat messages, and model-auth/config handling. If true, this is dangerous because user prompts, environment secrets, or local project data could be sent to external services without clear disclosure, and the hidden planning layer could trigger actions outside the expected local maintenance scope.

Content

No source excerpt is available for this finding.

Possible Typosquatting: 'uvicorn' resembles popular package 'gunicorn'

High
Category
Supply Chain
Confidence
70% confidence
Finding

Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: nanoid==3.3.12 — 2 advisory(ies): CVE-2026-67214 (nanoid: non-secure generators can loop indefinitely with negative size); CVE-2026-67213 (nanoid: custom generators can loop indefinitely when size is zero)

High
Category
Supply Chain
Confidence
80% 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.

Known Vulnerable Dependency: postcss==8.5.15 — 2 advisory(ies): CVE-2026-69153 (PostCSS: incomplete fix of GHSA-6g55-p6wh-862q — attacker-controlled sourceMappi); CVE-2026-73646 (PostCSS: Path Traversal in Previous Source Map Auto-Loading (sourceMappingURL) l)

High
Category
Supply Chain
Confidence
83% confidence
Finding

postcss 8.5.15 is a real risk because the cited issues concern source map handling and path traversal during processing of attacker-controlled CSS or sourceMappingURL data. In this workbench, PostCSS is part of the frontend build/dev pipeline, so exposure is mainly during local development or builds rather than direct production runtime, which limits but does not eliminate risk.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: vite==8.0.14 — 2 advisory(ies): CVE-2026-53571 (vite: `server.fs.deny` bypass on Windows alternate paths); CVE-2026-53632 (launch-editor: NTLMv2 hash disclosure via UNC path handling on Windows)

High
Category
Supply Chain
Confidence
88% confidence
Finding

vite 8.0.14 has reported Windows-specific issues including a dev-server file access restriction bypass and possible NTLMv2 hash disclosure through UNC path handling in launch-editor flows. Because this skill is explicitly for installing, running, and troubleshooting a local single-user workbench, the vulnerable component is likely to be used in development, making the finding relevant—especially on Windows hosts—even if the exposure is narrower than an internet-facing production service.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: vite==8.0.14 — 2 advisory(ies): CVE-2026-53571 (vite: `server.fs.deny` bypass on Windows alternate paths); CVE-2026-53632 (launch-editor: NTLMv2 hash disclosure via UNC path handling on Windows)

High
Category
Supply Chain
Confidence
95% confidence
Finding

The frontend pins Vite 8.0.14, which is reported as affected by two advisories: a Windows server.fs.deny bypass and an NTLMv2 hash disclosure issue in launch-editor via UNC path handling. In this skill, developers are explicitly instructed to run local dev and maintenance workflows, which makes use of the Vite development tool plausible; on Windows systems, that increases the chance the vulnerable code path could be exposed during development or troubleshooting.

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/akshare-workbench/style_reference.html (reported line 1060)May include surrounding context.

html
</style>
</head>
<body>
    <!-- Background Blobs -->
    <div class="bg-blobs">
        <div class="blob blob-1"></div>
        <div class="blob blob-2"></div>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/akshare-workbench/style_reference.html (reported line 1188)May include surrounding context.

html
</div>
                </div>

                <!-- AI Translation -->
                <div class="glass-card product-card">
                    <div class="product-icon icon-purple">🌐</div>
                    <h3 data-en="AI Translation" data-zh="AI Translation 智能翻译">AI Translation</h3>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/akshare-workbench/style_reference.html (reported line 1220)May include surrounding context.

html
<!-- Bottom Row: AI Extraction + AI Business Intelligence -->
            <div class="products-row-bottom">
                <!-- AI Extraction -->
                <div class="glass-card product-card">
                    <div class="product-icon icon-amber">📊</div>
                    <h3 data-en="AI Extraction" data-zh="AI Extraction 智能提取">AI Extraction</h3>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/akshare-workbench/style_reference.html (reported line 1280)May include surrounding context.

html
</div>
        </section>

        <!-- Product Overview Section -->
        <section class="overview-section">
            <div class="section-title">
                <h2 data-en="Unified AI Platform" data-zh="统一AI平台">Unified AI Platform</h2>

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/akshare-workbench/style_reference.html (reported line 1439)May include surrounding context.

html
</div>
        </section>

        <!-- Workflow Section -->
        <section class="workflow-section">
            <div class="section-title">
                <h2 data-en="Seamless Integration" data-zh="无缝集成">Seamless Integration</h2>

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
78% confidence
Finding

Copying the full parent environment into child processes propagates all existing environment variables, including secrets such as API keys, tokens, proxy credentials, or CI credentials, into backend and frontend processes and potentially their logs or dependencies. In a development workbench that runs third-party package tooling like npm and Python services, this broad inheritance increases secret exposure unnecessarily.

Content

Scanner excerpt · scripts/workbench_ctl.py (reported line 110)May include surrounding context.

python
def conservative_env(root: Path) -> dict[str, str]:
    env = os.environ.copy()
    env.setdefault("AKSHARE_WORKBENCH_ROOT", str(root))
    env.setdefault("AKSHARE_PROXY_MODE", "auto")
    env.setdefault("AKSHARE_MAX_CONCURRENT", "1")

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/workbench_ctl.py (reported line 150)May include surrounding context.

python
".skill-runtime",
        ".pytest_cache",
        "__pycache__",
        ".env",
    }
    return {name for name in names if name in ignored or name.endswith(".pyc")}

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill advertises operational capabilities that inherently involve shell execution, file access, environment-variable handling, and some network use, but it does not declare an explicit tool scope such as permissions or allowed-tools. That creates an authorization and review gap: an operator may approve the skill based on its description without understanding the full set of actions it can perform, increasing the risk of unintended command execution or data access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Several natural-language strings in this route file are hard-coded in Chinese, including error details and labels related to task and AI configuration handling. Because the file does not offer locale selection or indicate a justified region-specific constraint, this appears to force a specific language without user opt-in, matching the stated policy-violation criteria.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes a bundled local AKShare workbench for creating the project from assets, running the FastAPI/React app, managing cache, editing the indicator catalog, and mitigating Eastmoney request limits. This route file additionally exposes endpoints to store AI provider configuration and invoke an AI planning service, which is not mentioned in the stated skill purpose and changes the workbench from a local data tool into an AI-enabled system.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The /ai/config read and update routes load and persist model endpoint settings and API key state, which is a separate capability from installing, operating, and troubleshooting a local AKShare financial data workbench. Handling AI-provider configuration is not an obvious requirement of the manifest’s declared purpose, especially since the manifest emphasizes local bundled assets and local app management.

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 focused on installing, running, maintaining, troubleshooting, caching, and editing the AKShare workbench itself. This YAML file instead defines a very large end-user data catalog covering stocks, bonds, FX, macro, funds, futures, and overseas markets from many providers, which materially broadens the skill from local workbench operations into operating a full multi-source financial data service.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This YAML manifest presents names, labels, descriptions, and parameter guidance exclusively in Chinese across the file, which effectively forces a specific language for users. There is no visible opt-in, multilingual alternative, or documented justification that this skill is intentionally restricted to a Chinese-language or China-region audience.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This module manages and persists base_url, model, and api_key for an external AI service, which is not mentioned in the manifest description of a bundled local AKShare financial data workbench. While local app setup and maintenance are in scope, adding configurable third-party AI connectivity and credential handling is a separate capability not justified by the stated purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The prompt explicitly requires the model's reply field to be '给用户的中文说明', which imposes a specific language on all responses. This is a natural-language locale policy issue because the file does not provide user opt-in or indicate that the skill is intentionally limited to Chinese-only use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code returns multiple natural-language HTTP error details in Chinese, such as parameter validation and runtime failure messages. For a general-purpose backend service, forcing a specific language without user opt-in is a natural-language policy issue unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The default browser headers hard-code Accept-Language: zh-CN,zh;q=0.9,en;q=0.8, which imposes a specific locale preference on all outbound requests. This is a natural-language locale policy issue because the code does not offer a user choice or document a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Insecure deserialization: pandas.read_pickle()

Medium
Category
Dangerous Code Execution
Confidence
95% confidence
Finding

This cache reads .pkl files with pandas.read_pickle(), which uses Python pickle deserialization and can execute attacker-controlled code during load. In this file, the cache directory is configurable via AKSHARE_RESULT_CACHE_DIR, and the application is a local workbench handling filesystem state, so if an attacker or lower-privileged local user can place or swap a crafted pickle in that directory, cache reads can become arbitrary code execution in the app process.

Content

Scanner excerpt · assets/akshare-workbench/backend/app/services/result_cache.py (reported line 63)May include surrounding context.

python
if time.time() - path.stat().st_mtime > ttl:
                return None
            with _lock:
                dataframe = pd.read_pickle(path)
            if isinstance(dataframe, pd.DataFrame):
                logger.info("AKShare result cache hit: %s", indicator.id)
                return dataframe.copy()

Tainted flow: 'path' from os.environ.get (line 76, credential/environment) → pandas.read_pickle (deserialization)

Medium
Category
Data Flow
Confidence
90% confidence
Finding

The path used for deserialization is ultimately influenced by the AKSHARE_RESULT_CACHE_DIR environment variable, so an attacker who can affect process startup configuration or point the app at a writable/shared directory can steer read_pickle() to attacker-controlled files. Because pickle loading is unsafe by design, this tainted path increases the exploitability of the insecure deserialization and turns a cache feature into a local code-execution vector.

Content

Scanner excerpt · assets/akshare-workbench/backend/app/services/result_cache.py (reported line 63)May include surrounding context.

python
if time.time() - path.stat().st_mtime > ttl:
                return None
            with _lock:
                dataframe = pd.read_pickle(path)
            if isinstance(dataframe, pd.DataFrame):
                logger.info("AKShare result cache hit: %s", indicator.id)
                return dataframe.copy()

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
assets/akshare-workbench/backend/app/api/routes.py:204