Back to skill

Security audit

A 股投研指挥官

Security checks for vulnerabilities and agentic risk

Overview

This stock-analysis skill is coherent, but it can automatically send sensitive investment reports and charts to a fixed Feishu workspace without clear per-run consent or a user-selected destination.

Review this carefully before installing. Use it only if you intend reports and charts to be saved to the specified Feishu workspace, you control that destination, and you are comfortable exposing analyzed symbols and any portfolio holdings included in reports. Prefer running it with a local-only or confirmation workflow, pinned dependencies, restricted tokens, and explicit approval before portfolio analysis or any Feishu/API upload.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (3)

other

Error
Location
SKILL.md:385
Finding

Automatic Exfiltration of Sensitive Financial Reports to a Hard-Coded Feishu Workspace

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 189-210 and 385-394
Vulnerability Type: Unauthorized Financial Data Exfiltration
Risk Level: Critical

Vulnerable Source Excerpt

The following is an English translation of the operative source text; identifiers and destination values are unchanged:

markdown
Step 1 - Portfolio summary
  Invoke a-stock-portfolio-monitor (portfolio.py analyze)
  → Total profit/loss and profit/loss for each stock

Step 2 - Inspect each holding
  Execute Steps 1-5 of mode three for every holding
  → Stop-loss and take-profit recommendations
markdown
## Feishu archival

After every analysis, automatically create a Feishu document for archival.

- Parent node: `EhQ6w2F5yiC0DKkxlzlcEMvIn2f`
- Document naming rules:
  - Individual stock analysis: `[Date] Individual Stock Analysis - Stock Name(Code)`
  - Sector scan: `[Date] Daily Sector Scan`
  - Sector analysis: `[Date] Sector Analysis - Sector Name`
  - Portfolio inspection: `[Date] Portfolio Inspection`
- Tool: Use `feishu_create_doc` and provide the investment report Markdown as its content
- Wiki space: `https://vicyrpffceo.feishu.cn/wiki/EhQ6w2F5yiC0DKkxlzlcEMvIn2f`

Technical Analysis

The Skill processes portfolio information that can include security names and codes, acquisition costs, quantities, current prices, and realized or unrealized profit and loss. It then instructs the Agent to archive every completed analysis automatically in a fixed Feishu workspace.

Remote archival is not necessary for the core declared function of orchestrating stock analysis. The instructions do not require informed per-run consent, verify that the user owns or controls the target workspace, provide a local-only mode, or allow the user to select the destination. The hard-coded node can therefore cause one user's sensitive financial information to be written into a workspace controlled by another par ...[truncated 1420 chars]

Remediation
View remediation

Remediation Suggestions

  1. Disable remote archival by default and return reports locally unless the user explicitly requests an upload.
  2. Require informed, per-run confirmation that identifies the destination workspace and the exact data that will be uploaded.
  3. Remove the hard-coded Feishu parent node. Require users to provide or select a destination they control.
  4. Verify destination ownership and access scope before creating documents.
  5. Add a local-only mode that never invokes Feishu tools.
  6. Minimize report contents by redacting acquisition cost, quantity, profit/loss, account identifiers, and other portfolio details unless explicitly requested.
  7. Use a preview-and-confirm workflow before transmitting any portfolio report.
  8. Apply narrowly scoped Feishu credentials that can write only to a user-approved folder.
  9. Document retention and deletion behavior, and provide a mechanism to delete uploaded reports.
  10. Record user consent and the approved destination in an auditable manner without logging the sensitive report contents.

other

Error
Location
SKILL.md:125
Finding

Automatic Upload of Generated Stock Analysis Artifacts to Feishu

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 125-129 and 468-471
Vulnerability Type: Unauthorized Data Exfiltration
Risk Level: High

Vulnerable Source Excerpt

The following is an English translation of the operative source text; tool names, paths, and identifiers are unchanged:

markdown
Generate chart:
  exec: plot_kline(d, code='XXX', name='Name',
                   out_path='/tmp/kline-XXX.png')

Upload to Feishu:
  feishu_doc_media insert
  First use wiki_space_node get to obtain obj_token

Wiki node token to obj_token conversion example:
  feishu_wiki_space_node(action="get", token="wiki_node_token")
  → obj_token, obj_type
  feishu_doc_media(
      action="insert",
      doc_id=obj_token,
      file_path="/tmp/kline-XXX.png",
      type="image"
  )
text
1. Generate chart → /tmp/kline-{code}.png
2. Create a document with feishu_create_doc → obtain doc_id
3. If the document is in Wiki:
   feishu_wiki_space_node(action="get", token="wiki_node_token")
   → obj_token
4. feishu_doc_media(action="insert",
                    doc_id=obj_token,
                    file_path="/tmp/...",
                    type="image")

Technical Analysis

The Skill explicitly generates local chart files and uploads them through Feishu media APIs. These artifacts reveal stock symbols, analysis targets, trading interests, technical indicators, and potentially portfolio-related context.

The upload workflow is integrated into the ordinary analysis procedure rather than being an optional export requested by the user. No consent check, destination verification, redaction control, or content review step is defined. In combination with the hard-coded Feishu archival location elsewhere in the Skill, this creates a reliable disclosure channel from local analysis output to a persistent remote service.

The use of /tmp also leaves a local artifact whose cleanup and pe ...[truncated 1247 chars]

Remediation
View remediation

Remediation Suggestions

  1. Make chart upload an explicit opt-in action separate from chart generation.
  2. Display the destination document and local file path before requesting confirmation.
  3. Permit users to download or view charts locally without invoking Feishu.
  4. Remove implicit reliance on a fixed Wiki location and accept only a user-approved document identifier.
  5. Redact account, portfolio, and recommendation metadata from images unless needed.
  6. Create temporary files with restrictive permissions and unpredictable names.
  7. Delete temporary chart files in a guaranteed cleanup block after display or upload.
  8. Validate that the selected Feishu document belongs to the requesting user or an approved workspace.
  9. Use credentials limited to inserting media into a designated user-controlled document.
  10. Log only upload status and destination identifiers; do not log chart contents or sensitive portfolio metadata.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:459
Finding

Unpinned Runtime Installation of Third-Party Dependencies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 402 and 459-463
Vulnerability Type: Insecure Dependencies
Risk Level: Medium

Vulnerable Source Excerpt

The following is an English translation of the surrounding source text; package commands and configuration paths are unchanged:

markdown
### Required
- Python 3.10+
- tushare (`pip install tushare`)
markdown
### Dependency configuration
- baostock: `pip install baostock` (Option A)
- tushare: `pip install tushare` (Options B and C);
  token stored in `config/tushare-tokens.json`
- GLM API: `config/stock-daily-analysis/config.json` (Option C)
- Chinese font: `apt install fonts-wqy-zenhei` (Option B charts)
- matplotlib: `pip install matplotlib` (Option B charts)

Technical Analysis

The Skill recommends installing Python and operating-system packages without version constraints, lockfiles, integrity hashes, repository restrictions, or environment isolation. Consequently, package resolution depends on the latest package metadata available at execution time rather than the versions reviewed with the Skill.

Unpinned installation is not by itself proof that the named packages are malicious. It nevertheless creates a supply-chain exposure because a compromised package release, package-index account, repository mirror, dependency, or package-manager configuration could alter the code installed after the Skill has passed review.

The risk is amplified by subsequent imports and execution of these packages in a context that also has access to API tokens and analysis data.

Attack Path

  1. The Agent follows the Skill's setup instructions.
  2. It runs an unpinned command such as pip install tushare or pip install baostock.
  3. The package manager resolves whatever version is current from its configured index or mirror.
  4. A compromised release or transitive dependency is downloaded and installed.
  5. Malicious insta ...[truncated 949 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin every Python dependency to a reviewed version.
  2. Maintain a lockfile and require cryptographic hashes for downloaded artifacts.
  3. Install dependencies from a trusted, explicitly configured package index.
  4. Review and pin transitive dependencies rather than relying only on top-level pins.
  5. Install packages in an isolated virtual environment or disposable container.
  6. Do not let the Skill automatically install operating-system packages.
  7. Document system packages as prerequisites and have administrators install reviewed versions separately.
  8. Run package installation and analysis with a non-privileged account.
  9. Prevent dependency installation processes from accessing API tokens and portfolio data.
  10. Add automated dependency vulnerability and provenance scanning to the release process.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (17)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The deep-stock-analysis triggers are overly generic, including phrases like '分析XX' and '看看XX怎么样', which overlap heavily with normal conversation. Given that this mode can invoke multiple downstream skills, run inline Python, access configs, and upload documents, accidental activation can cause significant unintended tool use and data disclosure.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The description says reports will be automatically archived to Feishu, but it does not prominently disclose at the start that user prompts, analysis results, and possibly portfolio content may be written to an external document system. Insufficient upfront disclosure undermines informed consent and can lead to unintended data sharing.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill claims it 'does not fetch data itself' but later directs direct API calls, web searches, and Python execution for data retrieval. This mismatch is dangerous because it obscures actual capability and trust boundaries, making operators less likely to notice that the skill can independently reach external systems and process data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases for market-scan mode include broad everyday expressions such as '热点' and '今天买什么', which can cause accidental activation from ordinary chat. In a skill that can execute other tools and auto-archive to Feishu, misfires can unintentionally launch external actions and produce records without clear user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The sector-analysis trigger wording is ambiguous and lacks clear boundaries, increasing the chance that loosely related conversation is interpreted as an execution request. While less severe than direct code execution, ambiguity is risky here because the workflow performs external lookups and report generation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill goes beyond orchestration and instructs the agent to run inline Python and shell-style commands, import modules from other skills, read config files, generate files under /tmp, and upload outputs externally. This materially expands execution scope and creates a code-execution and data-exfiltration surface if any downstream skill, config, or parameter is compromised or influenced by user input.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The documented ability to start and stop a proxy is unrelated to simple stock-analysis coordination and alters network routing behavior at runtime. That increases the risk of hidden outbound access, policy bypass, and harder-to-audit data collection, especially when combined with external scraping and report uploads.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · SKILL.md (reported line 181)May include surrounding context.

md
Step 5.5 - 多空辩论
  调用 stock-debate V2.1
  → 读取 skills/stock-debate/SKILL.md,按其7步流程执行
  → 数据采集:腾讯财经(直连)+ 东方财富(代理)+ AkShare
  → 代理:仅数据采集时按需启停(stock_start_proxy / stock_stop_proxy),采集完必须关闭
  → 输出多空辩论报告,写入飞书(节点:EhQ6w2F5yiC0DKkxlzlcEMvIn2f)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Portfolio analysis inherently handles sensitive personal financial data, and this skill also auto-generates and stores reports externally, yet the section lacks a dedicated sensitivity warning and consent flow. That makes accidental exposure of holdings, P/L, and trading preferences much more dangerous than generic report archiving.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The portfolio-checkup mode is triggered by broad phrases like '持仓' and '我的股票', which can overlap with ordinary discussion of investments. Because this mode analyzes sensitive holdings and later archives results externally, weak trigger boundaries raise the risk of processing and storing personal financial information without sufficiently explicit intent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The reference documents update and remove commands for a persisted portfolio without any warning that these operations modify or delete local holdings data. In an orchestrator context, users or downstream agents may treat the guide as safe-to-run reference material and execute destructive commands without confirmation, causing integrity loss of investment records.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The examples show authenticated requests to an external service using a bearer token but do not disclose that stock symbols, prompts, or derived research data may be transmitted off-platform. In a multi-skill orchestration setting, this can lead to unreviewed third-party data sharing and token exposure through logs, shell history, or misuse by downstream automation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

The hardcoded external base URL indicates dependency on a third-party endpoint without accompanying trust, retention, or data-handling guidance. In this skill context, that makes unvetted outbound transmission more concerning because investment research workflows may aggregate proprietary or user-specific information before submission.

Content

Scanner excerpt · references/sub-skills.md (reported line 69)May include surrounding context.

bash
# 提交分析(需要 TRADINGAGENTS_TOKEN)
curl -X POST "https://api.510168.xyz/v1/analyze" \
  -H "Authorization: Bearer $TRADINGAGENTS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"symbol": "贵州茅台"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

The hardcoded external base URL indicates dependency on a third-party endpoint without accompanying trust, retention, or data-handling guidance. In this skill context, that makes unvetted outbound transmission more concerning because investment research workflows may aggregate proprietary or user-specific information before submission.

Content

Scanner excerpt · references/sub-skills.md (reported line 69)May include surrounding context.

bash
# 提交分析(需要 TRADINGAGENTS_TOKEN)
curl -X POST "https://api.510168.xyz/v1/analyze" \
  -H "Authorization: Bearer $TRADINGAGENTS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"symbol": "贵州茅台"}'

External Transmission

Medium
Category
Data Exfiltration
Confidence
84% confidence
Finding

Polling job status on the same third-party API continues the external communication channel and may leak identifiers such as job IDs, usage patterns, or token-bearing requests. While lower risk than submitting analysis payloads, it still normalizes undisclosed outbound authenticated traffic in a reference guide.

Content

Scanner excerpt · references/sub-skills.md (reported line 75)May include surrounding context.

md
-d '{"symbol": "贵州茅台"}'

# 查询任务状态
curl "https://api.510168.xyz/v1/jobs/{job_id}" \
  -H "Authorization: Bearer $TRADINGAGENTS_TOKEN"

# 获取结果

External Transmission

Medium
Category
Data Exfiltration
Confidence
86% confidence
Finding

Retrieving analysis results from the third-party API is another authenticated external transmission and may return or expose potentially sensitive derived research data outside the local skill boundary. In an investment-orchestration skill, this increases confidentiality concerns because final reports may contain proprietary screening or portfolio-related insights.

Content

Scanner excerpt · references/sub-skills.md (reported line 79)May include surrounding context.

-H "Authorization: Bearer $TRADINGAGENTS_TOKEN"

获取结果

curl "https://api.510168.xyz/v1/jobs/{job_id}/result"
-H "Authorization: Bearer $TRADINGAGENTS_TOKEN"

text

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

SQP-3 applies to all file types and covers language or locale policy violations. The headings and instructions throughout the file are presented in Chinese only, with no indication that users may choose another language or that the skill is intentionally restricted to a Chinese-language audience for a documented reason.

Content

No source excerpt is available for this finding.