Back to skill

Security audit

德胧P&L分析Skill

Security checks for vulnerabilities and agentic risk

Overview

This skill is a hotel profit-and-loss analysis helper with no evidence of hidden data theft, destructive behavior, or privilege escalation.

Use this for hotel finance analysis only with data you are comfortable processing locally. Verify the publisher/provenance before relying on claims such as official group data, and install optional Python dependencies in an isolated environment with pinned versions if charts are needed.

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

T08 · Insecure Dependencies

Warning
Location
scripts/chart_generator.py:6
Finding

Unpinned Third-Party Python Dependency

Content
View full analysis

Vulnerability Details

File Location: scripts/chart_generator.py:6
Related Import Location: scripts/chart_generator.py:13-15
Vulnerability Type: Unpinned third-party dependency
Risk Level: Medium

Vulnerable Code

python
"""
酒店P&L数据可视化脚本
使用ECharts生成交互式图表

依赖:pip install pyecharts
"""

The dependency is subsequently imported as follows:

python
try:
    from pyecharts.charts import Bar, Line, Pie, Gauge, Radar
    from pyecharts import options as opts
    from pyecharts.globals import ThemeType
    HAS_PYECHARTS = True

Technical Analysis

The project directs users to install pyecharts without specifying a reviewed version, cryptographic hash, lockfile, or trusted package index. Consequently, pip resolves whichever package and transitive dependency versions are available at installation time.

This makes the installation non-reproducible and leaves the project exposed to supply-chain compromise. If a future release or transitive dependency is compromised, malicious code could execute during package installation or when pyecharts is imported. The package name itself is not identified as malicious; the risk arises from uncontrolled dependency resolution.

Attack Path

  1. A user or automated agent follows the documented pip install pyecharts instruction.
  2. pip contacts its configured package index and resolves the latest available version and transitive dependencies.
  3. An attacker compromises a resolved release, one of its transitive dependencies, or the configured package source.
  4. Malicious installation hooks or import-time code execute when the package is installed or imported.
  5. The payload runs with the privileges of the user or service executing the installation or chart generator.

Impact Assessment

Successful exploitation could execute arbitrary code within the installing user’s security context. Depending on that account’s privileges and environment, the attacker could access files an ...[truncated 416 chars]

Remediation
View remediation

Remediation Suggestions

  1. Create a dependency manifest and pin pyecharts to a reviewed version:
text
pyecharts==<reviewed-version>
  1. Generate and record cryptographic hashes for the package and all transitive dependencies:
text
pyecharts==<reviewed-version> \
    --hash=sha256:<verified-hash>
  1. Install through a locked requirements file with hash enforcement:
bash
python -m pip install --require-hashes -r requirements.txt
  1. Use an isolated virtual environment and a trusted, explicitly configured package index.

  2. Review and update the lockfile through a controlled dependency-update process that includes vulnerability scanning and package provenance verification.

  3. Avoid encouraging direct installation of an unconstrained latest version in source-code documentation.

Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (10)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown design file is written entirely as a Chinese-language skill specification and presents all sample user interactions in Chinese, with no indication that users may choose another language. Under the policy rule for natural-language violations, forcing a specific language without user opt-in should be flagged unless clearly justified as region-specific, which is not explicitly stated here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

All instructions, triggers, examples, and outputs are presented exclusively in Chinese, and the examples assume Chinese interaction as the only supported mode. There is no explicit opt-in, language choice, or statement that the skill is intentionally limited to a Chinese-speaking or region-specific context, which creates a natural-language locale policy concern.

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 generic business terms such as '分析P&L', '本月经营分析', and '对标分析', which can easily appear in ordinary conversation and may invoke the skill unintentionally. Because this skill is designed to analyze financial and operational hotel data, accidental activation could lead to unintended processing or disclosure of sensitive business metrics in the wrong context.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring says this is a visualization script that 'uses ECharts to generate interactive charts', which implies actual chart generation via the declared dependency. In practice, all generator methods build plain Python dicts and return JSON strings, and the imported pyecharts classes are never used anywhere in the file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

该 markdown 文件通篇以中文呈现,且未见任何说明用户可选择其他语言,或该语言限制有特定地区/合规依据。按规则,若技能或文档强制特定语言而没有用户选择或明确正当性,可构成自然语言层面的语言/locale 政策问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

该文件全文以中文呈现,且没有任何说明表明这是仅面向中文用户或特定区域业务场景的内容,也未提供其他语言选项。按规则,若技能或说明材料默认强制特定语言而无用户选择或明确正当化,属于自然语言政策风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This markdown file presents all instructional and reference content only in Chinese, including headings, definitions, and notes. Under the policy rule for natural-language violations, forcing a specific language without user opt-in can be a locale/language policy issue when no choice or justification is provided.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The docstring for generate_profit_analysis explicitly describes a '利润分析瀑布图数据' output. However, the returned config defines a single bar series without the offset/base series structure normally required for a waterfall chart, so the implementation does not match the documented intent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains user-facing natural language such as the module description, class docstring, and later report labels in Chinese, which effectively fixes the skill's interaction language. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale restriction is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This manifest-style JSON file contains user-facing natural-language values entirely in Chinese, including hotel names, month labels, and rating text. Under the policy rule for language/locale, forcing a specific language without opt-in or justification can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.