Back to skill

Security audit

盘前雷达

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent Chinese A-share premarket risk-reporting skill with disclosed public-data fetching and optional Feishu posting, but it has integrity hardening gaps users should understand.

Install only if you are comfortable with a Chinese A-share focused tool that fetches public market/news data and may send generated summaries to Feishu when you explicitly configure and run the push workflow. Prefer disabling or removing the included GitHub Actions workflow unless you want scheduled posts, keep Feishu secrets scoped to that webhook, and harden the code by requiring HTTPS sources, escaping HTML output, and constraining NOTIFY_HUB_SCRIPT before using it for routine financial decisions.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch_geopolitics.py:46
Finding

Unauthenticated HTTP Sources Allow Manipulation of Risk-Scoring Inputs

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/render_card.py:55
Finding

Remote News Titles Are Inserted into Generated HTML Without Escaping

Content
View full analysis
Remediation
View remediation
``` 6. Add regression tests using hostile titles containing `<`, `>`, quotes, SVG elements, event handlers, and malformed tags. Verify that these values appear as visible text and never create DOM elements. 7. Apply length limits only after proper encoding and validation; do not treat truncation as sanitization. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (16)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises and documents executable capabilities including shell commands, network access, file generation, and use of environment-backed secrets, but it does not declare any explicit tool scope or permission boundaries. In an agent ecosystem, this can lead to over-privileged execution, making unintended network calls, writing files, or accessing sensitive environment variables without clear user consent or platform enforcement.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases are broad finance terms such as '外围市场' and '风险信号' that can appear in ordinary conversation, increasing the chance the skill is invoked when the user did not intend it. Unintended invocation is risky here because the skill may perform network retrieval, generate reports, or prepare outbound notifications based on casual discussion rather than an explicit request.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill promotes Feishu group push support, including webhook-based cloud delivery, but the description does not prominently warn that generated content may be transmitted to an external group/channel. This creates a data-handling and consent risk: users may trigger or enable sharing without fully understanding that reports, market interpretations, or metadata could leave the local environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code explicitly prefers plain HTTP for GDELT requests and only falls back to HTTPS on failure, which exposes requests and responses to tampering or interception by any network attacker on the path. Because the fetched geopolitical news is later used to generate trading/risk signals, a man-in-the-middle could manipulate article metadata and bias downstream risk scoring or user decisions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/fetch_macro.py (reported line 120)May include surrounding context.

python
# 2. 全球底色(World Bank API,年度,无 key)
#   指标:GDP 增速 / CPI 年化 / 失业率,覆盖美国、中国、全球
# ---------------------------------------------------------------------------
WB = "https://api.worldbank.org/v2/country/{}/indicator/{}?format=json&per_page=3"

# (指标代码, 指标名, 单位后缀)
WB_INDICATORS = [

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/fetch_macro.py (reported line 179)May include surrounding context.

python
# 3. 美国高频宏观(FRED,可选 key)
#    读环境变量 FRED_API_KEY;无 key 时跳过,返回空 dict(由 World Bank 兜底)
# ---------------------------------------------------------------------------
FRED = "https://api.stlouisfed.org/fred/series/observations"

# (series_id, 说明)
FRED_SERIES = [

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code file contains user-facing natural language exclusively in Chinese in the module docstring, including usage instructions. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicit and justified.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/push_feishu.py (reported line 124)May include surrounding context.

python
print("请先安装 notify-hub skill,或设置 NOTIFY_HUB_SCRIPT 环境变量。")
            sys.exit(1)
        print(f"推送到: {target}")
        r = subprocess.run(
            [sys.executable, NOTIFY, "send", "card", json_path, "--to", target],
            capture_output=True, text=True,
        )

Tainted flow: 'NOTIFY' from os.environ.get (line 33, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
91% confidence
Finding

The script path executed by Python comes from the NOTIFY_HUB_SCRIPT environment variable, which means anyone who can influence the environment can redirect execution to an arbitrary local Python file. In agent or automation contexts where environment variables may be inherited from untrusted configuration, this becomes arbitrary code execution in the context of the user running the skill.

Content

Scanner excerpt · scripts/push_feishu.py (reported line 124)May include surrounding context.

python
print("请先安装 notify-hub skill,或设置 NOTIFY_HUB_SCRIPT 环境变量。")
            sys.exit(1)
        print(f"推送到: {target}")
        r = subprocess.run(
            [sys.executable, NOTIFY, "send", "card", json_path, "--to", target],
            capture_output=True, text=True,
        )

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The payload explicitly sends content under the "zh_cn" locale, and the script's user-facing strings are all Chinese. This forces a specific language/locale without any opt-in or documented justification that the skill is only for a Chinese-language context, which matches the policy's language/locale violation criterion.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The design note states '只取「标题 + 国家 + 时间 + 重要性」, 不抓全文', which communicates a deliberately narrow data scope. However, the event objects built later also include 'actual', 'forecast', and 'previous', so the documentation understates what fields are collected and returned.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The natural-language docstring is entirely written in Chinese and presents the skill usage and behavior only in that language. Under the policy, forcing a specific language without user choice can be a locale/language policy violation unless clearly justified or optionality is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This code file contains natural-language docstring content entirely in Chinese for the module description and usage context. Under the stated policy, forcing a specific language without user opt-in can be a locale/language policy violation, and there is no indication of an alternative language option or justification for a Chinese-only audience.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The JSON output includes user-facing fields such as source and note only in Chinese. This reinforces a fixed-language experience without documenting a justified locale constraint or offering an alternative language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This code file contains natural-language guidance that mandates a locale-specific convention: '所有方向判断遵循 A 股习惯:红 = 利多、绿 = 利空'. The policy allows locale constraints only when clearly documented and justified; while this is somewhat contextual, it still hard-codes a market-specific convention without exposing any user choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The HTML root sets lang="zh-CN", and the entire visible UI text is fixed in Simplified Chinese. This creates a language/locale constraint in natural-language content without any indication that users can choose another language or have opted into a China-specific experience.

Content

No source excerpt is available for this finding.