Back to skill

Security audit

国家统计局数据采集

Security checks for vulnerabilities and agentic risk

Overview

The skill is not clearly malicious, but it substantially overstates its data-collection capability and includes a link checker that can make unchecked network requests from user-controlled Excel hyperlinks.

Review before installing. Use this only as a draft or helper, not as a trusted data collector: the included crawler does not fetch real NBS data yet and may create empty placeholder datasets. Run link verification only on trusted workbooks or after restricting URLs to official NBS domains, and keep backups before using scripts that save Excel files in place.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/verify_links.py:27
Finding

Unrestricted URL Validation Enables Blind Server-Side Request Forgery

Content
View full analysis
Tuple[bool, str]: """Check whether a URL returns HTTP 200.""" try: result = subprocess.run( ["curl", "-s", "-o", "/dev/null", "-w", "%{http_code}", url, "--connect-timeout", str(timeout)], capture_output=True, text=True, timeout=timeout + 2 ) code = result.stdout.strip() return (code == "200", code) except Exception as e: return (False, str(e)[:50]) ``` The URL passed to this function originates directly from workbook hyperlinks: ```python if cell.hyperlink: links.append({ "cell": cell.coordinate, "text": cell.value, "url": cell.hyperlink.target, "sheet": sheet_name }) ``` It is subsequently requested without validation: ```python url = link["url"] cell_ref = f"{sheet_name}!{link['cell']}" is_valid, code = check_url_http(url) ``` ### Technical Analysis The script treats hyperlink targets extracted from an input Excel workbook as trusted network destinations. It does not restrict URL schemes, destination hostnames, ports, resolved IP addresses, or redirect targets before passing each value to `curl`. Using an argument list for `subprocess.run` prevents ordinary shell metacharacter injection because no shell is invoked. However, it does not prevent server-side request forgery. An attacker-controlled workbook can contain hyperlinks that point to: - Loopback services such as `http://127.0.0.1/` - Private network services such as `http://10.0.0.1/` - Link-local or cloud metadata services - Int ...[truncated 1655 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
scripts/verify_links.py:18
Finding

Unpinned Third-Party Dependency Installation Guidance

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (19)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个以宏观经济数据采集、来源获取和指标计算为核心的技能;而实际代码只是一个Excel后处理工具,使用openpyxl为若干固定工作表添加折线图。它处理的对象虽然与GDP/CPI/PPI等表名相关,但这是对现有Excel内容进行可视化,不属于声明中的核心能力。代码没有网络请求、没有抓取国家统计局数据、没有读取统计年鉴、没有HP滤波或其他经济指标计算,因此其主要目的与声明明显不符,构成实质性不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared description presents a fairly complete NBS macroeconomic data collection skill, including real data acquisition from official sources, indicator support, HP-filter-based output gap calculation, and Excel organization. The supplied code only partially aligns at a superficial level: it is indeed named and structured as an NBS data collection script, accepts GDP/CPI/PPI options, and writes local output files. However, its core behavior is materially different from the declared purpose because the actual data acquisition is not implemented. Both GDP and CPI/PPI fetch functions simply synthesize period records with None metric values and simulated delays. There is no network access, no parsing of NBS resources, no statistical yearbook retrieval, no output-gap/HP-filter computation, and no Excel export. Therefore the description materially overstates implemented capabilities, so this should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是一个面向国家统计局数据采集与分析的完整技能,但该代码块并不采集任何统计数据,也不访问并解析NBS数据页面内容,更不进行宏观指标计算或Excel整理输出。它只处理现有Excel中的超链接元数据,检查链接是否返回HTTP 200,并对一个已知旧年鉴URL进行定向修复。虽然修复对象与国家统计局年鉴链接有关,属于相关辅助工具,但这只是支持性的数据来源链接维护功能,不能代表声明中的主要用途。因此代码实际行为与声明的核心能力和主要目的存在明显不匹配。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill advertises operational steps that imply file access, checkpoint persistence, script execution, and output generation, but it does not declare any explicit tool scope or permissions boundary. That creates an authorization ambiguity where an agent may invoke file or shell capabilities more broadly than intended, increasing the chance of unsafe filesystem writes or command execution during data collection workflows.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description and title present the skill entirely in Chinese and frame its operation as a Chinese-language skill, but there is no indication that the user can choose another language or that Chinese is required by policy. The audit rules require flagging language or locale constraints when they are imposed without user opt-in or clear justification.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/sources.md (reported line 11)May include surrounding context.

md
- **data.stats.gov.cn**: https://data.stats.gov.cn

### ⚠️ 重要:API变化
- 旧API(已废弃): `https://data.stats.gov.cn/easyquery.htm` → 返回404
- 新API: 需要使用新的URL格式

---

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/sources.md (reported line 73)May include surrounding context.

md
- **data.stats.gov.cn**: https://data.stats.gov.cn

### ⚠️ 重要:API变化
- 旧API(已废弃): `https://data.stats.gov.cn/easyquery.htm` → 返回404
- 新API: 需要使用新的URL格式

---

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/sources.md (reported line 77)May include surrounding context.

md
- **data.stats.gov.cn**: https://data.stats.gov.cn

### ⚠️ 重要:API变化
- 旧API(已废弃): `https://data.stats.gov.cn/easyquery.htm` → 返回404
- 新API: 需要使用新的URL格式

---

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/sources.md (reported line 80)May include surrounding context.

md
- **data.stats.gov.cn**: https://data.stats.gov.cn

### ⚠️ 重要:API变化
- 旧API(已废弃): `https://data.stats.gov.cn/easyquery.htm` → 返回404
- 新API: 需要使用新的URL格式

---

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code file contains natural-language instructions and CLI/help text primarily in Chinese, and the runtime output also uses Chinese strings. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script advertises NBS data collection, but the GDP and CPI fetchers only emit placeholder records with None values and simulated delays instead of retrieving authoritative data. This creates a data integrity risk: downstream users may trust generated files as real collected statistics, leading to silent misuse in analytics or decision-making.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The PPI code path calls fetch_cpi_monthly() and then saves the result as ppi_monthly, which means the produced dataset has CPI-shaped fields rather than actual PPI data. In a data-collection skill, this is dangerous because it silently corrupts economic inputs and can propagate incorrect analysis, reports, or policy conclusions without obvious runtime failure.

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/verify_links.py (reported line 27)May include surrounding context.

python
def check_url_http(url: str, timeout: int = 8) -> Tuple[bool, str]:
    """检查URL是否返回200"""
    try:
        result = subprocess.run(
            ["curl", "-s", "-o", "/dev/null", "-w", "%{http_code}", 
             url, "--connect-timeout", str(timeout)],
            capture_output=True,

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file-level docstring describes the tool as '验证Excel中的数据来源链接有效性' / 'Verify Data Source Links in Excel', which implies a read-only validation utility. However, the optional fix path rewrites hyperlink targets in the workbook and saves the file in place, expanding behavior from verification into file modification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The file is entirely written in Chinese and provides no indication that users may choose another language or locale. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The command-line interface declares a --config/-c argument as a chart configuration file, which implies user-supplied configuration affects behavior. However, args.config is never read, and the program always iterates over the hard-coded CHART_CONFIGS, so the documentation conveyed by the CLI contradicts actual behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains natural-language strings and documentation that assume Chinese-language use, including the top-level description and CLI help text. Under the policy rule, forcing a specific language without user opt-in can be a locale-policy violation when no justification or alternative is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code file includes user-facing documentation and CLI output in Chinese, including the primary description and usage guidance, without indicating that another language is available or that Chinese is required for a region-specific reason. The policy explicitly calls for flagging language or locale constraints when they are imposed without user opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The docstring '修复无效链接' suggests a general invalid-link repair capability, but the code only checks a single exact URL in a narrow fix_map labeled as a 2004-format special case. This is not merely incomplete output formatting; the stated intent is broader than the actual behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.