Back to skill

Security audit

业绩评价分析

Security checks for vulnerabilities and agentic risk

Overview

The skill appears intended for retail performance reporting, but it can produce authoritative-looking store reports from fixed simulated numbers without disclosing that to the user.

Review before installing. This skill should only be used as a demo unless its metrics are clearly labeled synthetic or replaced with real, validated data sources. Do not rely on its reports for staffing, sales intervention, or performance decisions in its current form.

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

T09 · Insecure Skill Coding Practices

Warning
Location
analyze.py:42
Finding

Hard-Coded Simulated Metrics Presented as Store-Specific Analysis

Content
View full analysis

Vulnerability Details

File Location: analyze.py:42-53, analyze.py:62-70, analyze.py:84-92, and analyze.py:109-117
Vulnerability Type: Hard-coded simulated business data and inadequate input handling
Risk Level: Medium

Vulnerable Code

python
def evaluate_target(store_id: str, month: str = "2026-03") -> EvaluationResult:
    return EvaluationResult(
        dimension="Target achievement",
        current=313226,
        expected=350000,
        achievement_rate=89.5,
        status="Attention",
        icon="🟡",
        finding="Achievement rate is 89.5%, with a gap of 36,774"
    )
python
def evaluate_mom(store_id: str, current_month: str = "2026-03") -> EvaluationResult:
    return EvaluationResult(
        dimension="Month-over-month analysis",
        current=313226,
        expected=200000,
        achievement_rate=156.6,
        status="Normal",
        icon="🟢",
        finding="Month-over-month growth is 56.6%"
    )
python
return EvaluationResult(
    dimension=f"Historical baseline ({weekday_cn})",
    current=12047,
    expected=11584,
    achievement_rate=104.0,
    status="Normal",
    icon="🟢",
    finding="At the historical 52nd percentile"
)
python
return EvaluationResult(
    dimension=f"Weekend performance ({weekday_name})",
    current=14267,
    expected=20366,
    achievement_rate=70.0,
    status="Alert",
    icon="🔴",
    finding="30% below the Saturday baseline"
)

Technical Analysis

The evaluation functions accept store identifiers and reporting-period parameters but do not use them to retrieve or calculate store-specific metrics. Instead, they return fixed current values, expected values, achievement rates, statuses, and findings.

comprehensive_evaluation subsequently associates these fixed results with the caller-supplied store_id, store_name, and date. ...[truncated 1730 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace hard-coded values with data retrieved through documented, authenticated, and trusted interfaces.
  2. Validate store_id, reporting dates, and month parameters before querying or calculating metrics.
  3. Bind every returned metric to the requested store and reporting period.
  4. Return an explicit error when required source data is unavailable rather than substituting simulated values.
  5. If demonstration data is required, isolate it behind an explicit test or demo mode and prominently label all resulting output as synthetic.
  6. Calculate achievement rates and findings from validated source values instead of hard-coding both inputs and conclusions.
  7. Implement the documented Benchmark dimension or remove that capability from the documentation and report claims.
  8. Add automated tests proving that different store IDs and reporting periods produce appropriately distinct results.
  9. Add provenance metadata to reports, including data source, retrieval time, reporting period, and whether any fallback data was used.
  10. Require human review before generated recommendations can trigger staffing or other consequential operational actions.
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)

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

声明强调四个核心维度是目标达成、环比、历史基线和同行Benchmark,并将其作为量化“不达预期”的核心框架。但在提供的代码片段中,导出的函数为 evaluate_target、evaluate_mom、evaluate_baseline、evaluate_weekend,且 comprehensive_evaluation 的说明明确写为“目标+环比+基线+周末专项”。这表明实际实现至少在对外接口和文档层面与声明存在实质不一致:一方面,声明中的 Benchmark 能力没有在可见代码中得到体现;另一方面,代码暴露了未声明的“周末专项”能力。虽然代码片段不含 analyze.py 的具体实现,不能完全排除内部仍有 Benchmark 逻辑,但基于当前可见接口与说明,描述与行为存在明显偏差。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

整体方向与描述相关,确实是在做业绩评价与综合状态判断,也能输出报告、达成率和差距信息。但存在实质性描述不符:最重要的是声明强调“四维度”中包含Benchmark,而代码完全没有Benchmark实现,反而用“周末专项评价”替代;此外,声明提到“预期类型识别”,代码只有静态函数划分,没有针对输入或场景进行识别判断。代码中的注释还表明本应调用其他技能,但当前仅返回硬编码模拟值,因此与“整合四个维度分析”相比实现明显不完整。因此应判定为描述与实际行为存在不匹配。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger conditions are broad and generic, which can cause the skill to activate on loosely related performance-analysis requests without clear boundaries. In agent environments, overbroad invocation increases the risk of unintended tool use, incorrect business conclusions, or interference with more appropriate skills, especially when the skill also appears to overclaim its implemented capabilities.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest and module docstring describe four dimensions as 目标达成、环比、基线、Benchmark, but the documented and exported functions list '周末专项' and evaluate_weekend rather than any Benchmark-related evaluator. This indicates the implemented/exported behavior does not match the stated analysis dimensions.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Within the file, the module docstring first states the skill integrates 目标达成、环比、基线、Benchmark四个维度, but the '主要功能' section says comprehensive_evaluation performs '目标+环比+基线+周末专项'. These statements actively conflict about what the fourth analysis dimension is.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file contains user-facing natural-language descriptions entirely in Chinese, including the skill name and purpose, with no indication that language is selectable or that the skill is intentionally restricted to a Chinese-only audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The docstrings state that the code calls other analysis skills, but the functions return hard-coded mock values instead of real data. In an analytics skill, this is dangerous because it silently fabricates results that may be trusted as live operational analysis, leading to materially false reporting and potentially harmful business actions.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill advertises a four-dimensional evaluation including Benchmark analysis, but the implementation never performs any benchmark calculation and instead inserts a weekend-only dimension. This can mislead downstream users or agents into believing competitive benchmarking was performed when it was not, causing incorrect business decisions based on fabricated completeness.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The report formatter produces all headings, labels, and status text in Chinese, which enforces a single language in the skill's output. There is no mechanism for user choice or justification for a locale-specific restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This file contains user-facing natural-language documentation almost entirely in Chinese, including the feature description and usage example context. Under the stated policy, forcing a specific language without user opt-in can be a locale/language policy violation when no alternative or choice is provided.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.