Back to skill

Security audit

industry-prosperity-tracker

Security checks for vulnerabilities and agentic risk

Overview

The skill does what it claims overall, but its generated HTML reports and file-writing paths are not safely scoped.

Review this before installing if you may open generated HTML from untrusted inputs or let the skill run on loosely phrased finance requests. Prefer installing only after the publisher escapes report fields, validates sector IDs and stock names, narrows triggers, and pins AKShare.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate_report.py:59
Finding

Stored HTML Injection in Generated Reports

Content
View full analysis
{tier} {ind['name']} {value_str} {mom_str} {dir_arrow} {ind['direction_label']} {ind['weight']*100:.0f}% {ind.get('data_date', '')} """ ``` Signal names are also inserted without escaping: ```python for s in signals: items += f"""
{arrow} {s['name']} 权重 {s['weight']*100:.0f}%
""" ``` Direct template replacement exposes additional injection sinks: ```python report = template report = report.replace("{{INDUSTRY_NAME}}", scored_data.get("industry_name", "")) report = r ...[truncated 3299 chars]
Remediation
View remediation
``` 6. Validate custom stock codes with a six-digit allowlist and impose reasonable length and character limits on stock and sector names. 7. Add regression tests containing characters such as `<`, `>`, `"`, `'`, and `&`, and verify that they appear only as encoded text in the output. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch_indicators.py:503
Finding

Path Traversal Through Custom Sector Identifier

Content
View full analysis
_latest.json`. 5. Parent-directory components are resolved by the filesystem. 6. The script creates or ove ...[truncated 740 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
manifest.yaml:29
Finding

Unpinned Third-Party Dependency Creates Supply-Chain Exposure

Content
View full analysis
=3.10" packages: - akshare ``` The script recommends an unconstrained installation: ```python try: import akshare as ak AK_AVAILABLE = True except ImportError: AK_AVAILABLE = False print("[ERROR] AKShare not installed. Run: pip install akshare") ``` The data-source documentation provides the same installation method: ```markdown | AKShare | Open-source Python library | `pip install akshare` | Macroeconomic, customs, and listed-company financial data | ``` ### Technical Analysis The dependency is resolved by package name alone. There is no exact version pin, lockfile, package hash, or documented integrity-verification process. Consequently, separate installations may retrieve different code, and a future compromised or malicious release could execute in the Skill process. Python modules can execute arbitrary code at import time. AKShare also operates with the Skill's network and filesystem permissions during normal use, increasing the potential scope of a supply-chain compromise. No evidence was found that the currently referenced package is malicious. The issue is the absence of controls ensuring that installations use the same reviewed artifact. ### Attack Path 1. A user follows the documented `pip install akshare` command, or the platform installs the package declared by the manifest. 2. The package resolver downloads whichever release currently satisfies the unconstrained package name. 3. A compromised upstream release, package-index account, or distribution artifact is installed. 4. `fetch_indicators.py` imports the packa ...[truncated 671 chars]
Remediation
View remediation
``` 2. Maintain a hash-locked dependency file, for example by using `pip-tools` and installing with: ```bash pip install --require-hashes -r requirements.txt ``` 3. Configure installation to use the official package index over TLS and disable unapproved extra indexes. 4. Record and verify the expected package hashes in release automation. 5. Review changelogs and source differences before updating the pinned version. 6. Run dependency vulnerability and provenance checks in continuous integration. 7. Execute the Skill in a sandbox with only the network and project-directory access required for its declared functionality. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

代码与描述在数据来源和支持范围上基本一致:它确实使用AKShare拉取PMI、PPI、进出口以及A股龙头股财务摘要,并支持半导体、医药、新能源、消费品和自定义行业。但描述声称会“计算综合景气评分(0-100)”并“判断行业处于上行周期、下行周期还是拐点区域”,而该代码块没有任何评分模型、标准化逻辑、总分汇总、阈值判断或周期分类输出。返回结果只包含原始/派生指标列表、权重和说明,并保存为JSON。因此这是明显的描述-行为不匹配:实现了数据采集和部分指标构建,但没有实现声明中的核心分析结论能力。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是核心分析能力:收集/使用行业与宏观数据、计算综合景气评分并判断周期阶段。但该代码块的实际功能是报告生成器,输入依赖“calculate_score.py的输出”,说明评分与判断已在别处完成。本代码只做模板加载、字符串替换、SVG仪表盘绘制、表格/信号HTML渲染和结果写入HTML文件。虽然它与“景气度”主题相关,属于配套展示层,但与声明的主要目的相比,功能明显不一致;尤其声明强调的是分析与计算,而代码并不实现这些能力。因此应判定为描述与该代码块行为不匹配。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file's user-facing instructions and descriptions are entirely in Chinese, and there is no indication that users may opt into another language or that the skill is intentionally restricted to a Chinese-speaking audience. Under the policy for natural-language violations, forcing a specific language without user opt-in is reportable.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The HTML root sets lang="zh-CN", and the visible report content is entirely in Chinese, which indicates the skill output is fixed to a specific language/locale. The provided file does not offer user opt-in, alternative locale handling, or a documented region-specific justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The trigger phrase 行业周期 is broad and can match ordinary financial discussion, causing the skill to activate outside the user's clear intent. Over-broad activation can expose file/script permissions in contexts where the user only wanted general conversation, increasing the chance of unintended tool use.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The English trigger prosperity tracker is generic and could be invoked during unrelated discussion about economics or business conditions. In a skill with file and script permissions, ambiguous activation raises the risk of unintended execution paths or user confusion about what capability is being invoked.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger industry cycle is ambiguous and overlaps with ordinary market commentary, making accidental activation plausible. Because this skill also declares elevated permissions, mistaken activation is more dangerous than for a read-only informational skill.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest requests run_scripts for a finance analysis skill whose stated purpose is computing prosperity scores from market and macro data. That capability enables arbitrary code execution and is significantly more powerful than what is justified by the declared functionality, increasing the blast radius if the skill code is compromised or abused.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The markdown says '用户输入任意行业名称时' ('when the user inputs any industry name'), which defines an extremely broad trigger condition without boundaries or exclusion cases. This could cause unintended invocation because it does not specify where, how, or under what context such input should activate the skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file is entirely presented in Chinese beginning with the title at L01, and nowhere offers an alternative language, user choice, or explanation that the skill is region- or locale-specific. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file contains natural-language instructions, usage examples, and output descriptions only in Chinese, and the same pattern continues in argument help text and runtime messages. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified, which it is not here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The manifest presents the skill name and description entirely in Chinese, while also including English triggers, but does not indicate whether users may choose their preferred language. This can create a locale policy issue if the skill defaults to a single language without opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The entire skill documentation is presented in Chinese and does not indicate that users may choose another language or locale. This can violate language/locale policy when a skill effectively forces a single language without opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file contains natural-language strings in Chinese for the module description, usage guidance, argparse help text, and runtime output, but does not indicate that the skill is Chinese-only or provide any user opt-in for language selection. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.