Back to skill

Security audit

蝉标AI投标文件写作

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a real tender-document cloud assistant, but its account setup and data-collection disclosures conflict with what the code actually collects and stores.

Install only if you are comfortable sending tender and bid documents, generated results, and account-related data to the vendor cloud service. Avoid the automatic trial path unless you consent to device-identifying data collection, prefer a dedicated secret-storage mechanism over pasting API keys or SMS codes into chat, and keep the service base URL fixed to the documented vendor endpoint.

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
scripts/zcm_lib/cli.py:202
Finding

Device Fingerprint Collection Contradicts Declared Data-Collection Scope

Content
View full analysis

Vulnerability Details

File Location: scripts/zcm_lib/cli.py:202-233; conflicting declarations in SKILL.md:13-15,26
Vulnerability Type: Undisclosed collection and transmission of local device identifiers
Risk Level: Medium

Complete Code Snippet

python
def _collect_device():
    """采集 6 项设备特征;任一失败置空串,绝不中断。"""
    import getpass
    import platform as _platform
    import socket
    import uuid as _uuid

    def _try(fn):
        try:
            v = fn()
            return str(v).strip() if v else ""
        except Exception:
            return ""

    def _mac():
        node = _uuid.getnode()
        if (node >> 40) & 0x01:   # 组播位=1:随机 MAC,视为采集失败
            return ""
        return hashlib.sha256(str(node).encode("utf-8")).hexdigest()

    return {
        "hostname": _try(socket.gethostname),
        "platform": _try(_platform.system),
        "arch": _try(_platform.machine),
        "username": _try(getpass.getuser),
        "home_path": _try(lambda: os.path.expanduser("~")),
        "mac_hash": _try(_mac),
    }


def _trial_flow():
    """免费试用:设备指纹自动注册 → 拿 Api Key 写入 config.json。幂等:同设备返回原 Key。"""
    body = {"device": _collect_device()}
    if CHANNEL:
        body["channel"] = CHANNEL
    resp = _anon_json("POST", "/trial-accounts", json_body=body)

The Skill metadata makes the following conflicting declaration:

yaml
environment:
- ZCM_APP_KEY(可选:App Key,替代凭证文件)
- ZCM_BASE / ZCM_CONFIG / ZCM_HOME / ZCM_OUTPUT_DIR(可选:地址与路径覆盖)
billing: 标书生成消耗 App Key 所属账户积分(提交前预检余额)
not-collected: 设备信息 / 手机号 / 验证码 / 除上述 ZCM_* 外的任何环境变量

Elsewhere, SKILL.md:26 states that device characteristics are automatically collected:

markdown
**安装完成后,助手会自动为你开通试用账号**(零输入,赠 50,000 字,自动采集设备特征,Api Key 自动保存、下次免输)

Technical Analysis

The trial-registration path invokes _collect_device() and gathers six categories of local information:

  • Hostname
  • Operating-system name
  • CPU architecture
  • Local username
  • User home-directory path
  • SH ...[truncated 2605 chars]
Remediation
View remediation

Remediation Suggestions

  1. Minimize collected data

    • Remove username, home_path, and hostname unless each field is strictly necessary.
    • Avoid deriving a persistent identifier from the hardware MAC address.
    • If abuse prevention requires a device identifier, generate a random application-specific identifier and store it locally.
  2. Enforce explicit consent in code

    • Require a dedicated flag such as --consent-device-registration.
    • Reject trial registration unless that flag is present or an interactive prompt receives affirmative consent.
    • Display the exact fields, destination, purpose, and retention implications before collection.
  3. Correct the Skill metadata

    • Remove the false not-collected: device information declaration.
    • Enumerate every device field that can be read and transmitted.
    • Keep the metadata, user-facing instructions, and executable behavior consistent.
  4. Constrain the destination

    • Validate that trial-registration data is sent only over HTTPS to the documented service origin.
    • Do not allow an inherited or stored base URL override to redirect device-registration data without separate informed approval.
  5. Provide a privacy-preserving alternative

    • Permit users to supply an existing API key without device collection.
    • Clearly separate ordinary authenticated operation from optional trial registration.
    • Document retention, deletion, and account-unlinking procedures for collected identifiers.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (49)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This skill describes collecting device fingerprint data for automatic trial-account creation while the metadata claims such data is not collected. That combination is dangerous because it obscures sensitive data collection and account-linking behavior from users and reviewers, undermining consent and making privacy-invasive processing harder to detect. The same section also describes phone binding, local credential storage, knowledge/experience upload, and feedback submission, which materially expands the skill's data-handling surface beyond the advertised core bidding workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This skill describes collecting device fingerprint data for automatic trial-account creation while the metadata claims such data is not collected. That combination is dangerous because it obscures sensitive data collection and account-linking behavior from users and reviewers, undermining consent and making privacy-invasive processing harder to detect. The same section also describes phone binding, local credential storage, knowledge/experience upload, and feedback submission, which materially expands the skill's data-handling surface beyond the advertised core bidding workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

This skill describes collecting device fingerprint data for automatic trial-account creation while the metadata claims such data is not collected. That combination is dangerous because it obscures sensitive data collection and account-linking behavior from users and reviewers, undermining consent and making privacy-invasive processing harder to detect. The same section also describes phone binding, local credential storage, knowledge/experience upload, and feedback submission, which materially expands the skill's data-handling surface beyond the advertised core bidding workflow.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This skill describes collecting device fingerprint data for automatic trial-account creation while the metadata claims such data is not collected. That combination is dangerous because it obscures sensitive data collection and account-linking behavior from users and reviewers, undermining consent and making privacy-invasive processing harder to detect. The same section also describes phone binding, local credential storage, knowledge/experience upload, and feedback submission, which materially expands the skill's data-handling surface beyond the advertised core bidding workflow.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest says device information is not collected, but the documentation states that installation automatically collects device fingerprint data to open a trial account. This is a clear deceptive-data-practice issue: users may expose host-identifying information without informed consent, and the contradiction makes downstream security review and policy enforcement unreliable.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 38)May include surrounding context.

md
**升级 skill 必须保留配置**:如果当前已安装目录存在 `config.json`,升级时不得删除、覆盖或替换该文件;只能更新 `SKILL.md`、`scripts/`、`references/` 等 skill 内容文件。本地生成目录 `biaoshu-writer-med-files/` 也必须保留。

Lp1

High
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The CLI reads sensitive configuration from environment variables such as ZCM_APP_KEY and ZCM_BASE, but this capability is not reflected in the declared permissions or user-facing description. Undeclared environment access weakens transparency and can expose secrets unexpectedly in agent runtimes where env access is privileged or broader than users realize.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The guidance explicitly asks users to paste a real API key into the conversation so the assistant can save it. In an agent environment, conversation content may be logged, retained, inspected by operators, or exposed to downstream tooling, turning the chat channel into an unsafe secret-collection path.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The _collect_device function gathers hostname, platform, architecture, username, home path, and a hashed MAC-derived identifier, then sends them for trial-account creation. These identifiers are not necessary for bid-document processing and create a fingerprinting capability that can track or correlate users/devices across sessions.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The file performs outbound network access via urllib.request.urlopen in download_to_local(), but the static finding indicates this capability is not declared in the skill permissions. Undeclared network behavior is dangerous because it can fetch attacker-controlled content, reach internal resources if user-supplied URLs are allowed, and violate the platform's trust and permission model.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'shell' capability that is not listed in its permissions. This may indicate deceptive intent or missing permission declarations.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The instructions require the assistant to include specific original Chinese wording and examples verbatim whenever introducing the skill or explaining how to get the API key. This imposes a fixed language on user-facing output without any opt-in or alternative locale path, which is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This file imposes a specific language/locale for all instructions and user-facing guidance without indicating that users may choose another language. Under the stated policy, forcing a 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
94% confidence
Finding

The file forces a specific language for all user-facing instructions and workflow details, which is a natural-language locale policy concern under the stated rules. There is no indication that the skill is region-specific, nor any opt-in or alternative language support for users who do not read Chinese.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This documentation instructs users to upload bid documents or provide file URLs, and also mentions submitting sensitive unit names, but it does not warn that these materials will be transmitted to and processed by a third-party cloud platform. In this skill’s context, the files likely contain confidential commercial, pricing, identity, and procurement information, so omission of a clear data-handling warning can lead to unintended disclosure and privacy/compliance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
72% confidence
Finding

The entire skill file is written only in Chinese and does not indicate that language selection is optional or that the skill is intentionally restricted to a Chinese-speaking or China-specific context. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation explicitly states that uploaded files and task results are retained on the vendor's servers under the API key owner's account, but it does not require the skill to clearly warn end users before transfer or persistence occurs. In this skill's context, users may upload sensitive bid/tender documents containing confidential business, pricing, and compliance data, so silent server-side retention materially increases privacy and data-governance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill file is written as mandatory operational guidance in Chinese and does not provide any user opt-in, alternative language, or justification that the skill is region-specific. Under the policy for natural-language violations, forcing a specific language without user choice can be a locale/language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document title and the entire operating manual are written in Chinese, and later instructions require relaying script output directly to the user, implying a fixed Chinese-language interaction model. There is no indication that the user can choose another language or locale, which can violate a language/locale policy requiring user choice or opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manual says to show script output 'as is' and provides only Chinese examples for progress updates, which effectively constrains user-facing communication to Chinese. Because no opt-in or fallback language behavior is specified, users interacting in another language may be forced into a locale they did not choose.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/usage.md (reported line 70)May include surrounding context.

json
   {"app_key":"bk_live_xxxxx","base":"","output_dir":""}

建好后 chmod 600 config.json(含真实 Key)。通常不用手写——方式 2~5 任一命令都会自动生成到当前 skill 根目录。 2. 用户把 Key 发你后,先定位当前安装的 biaoshu-writer-med/SKILL.md 所在目录,再由你代跑 login --app-key bk_live_xxx 保存(自动建/更新同级 config.json,权限 600)——别把这条命令丢给用户自己敲。 3. 临时用环境变量:export ZCM_APP_KEY=bk_live_xxx(首次会自动落盘到当前 skill 根目录的 config.json,不是全局目录)。 4. 没 Key 想直接注册:向用户要手机号,由你代跑 register --phone(skill 内手机号+短信验证码换取 Api Key,自动保存)——见本节末尾「绑定手机号 / 可用字数不足」流程,别让用户自己敲命令。

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code consistently forces Chinese labels and user-facing text through constants and formatted strings such as risk labels, status text, and evidence notes. Because there is no visible opt-in, locale selection, or documented justification for a Chinese-only experience in this file, it appears to violate the language/locale policy requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code hard-codes report titles and labels in Chinese, and the same pattern continues throughout the file for all rendered reports. That creates a natural-language locale policy issue if the skill is expected to support users without explicitly opting them into Chinese or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The generated HTML hard-codes lang='zh' and embeds Chinese-only branding and footer text, which imposes a specific language/locale in the rendered report. The file does not offer any user opt-in or configurable locale selection, matching the policy-violation criterion for forced language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The function constructs user-facing messages entirely in Chinese ("预计/本次需要约...", "当前可用..."), which imposes a specific language in the skill behavior. The file does not show any user opt-in, locale selection, or justification that this skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/zcm_lib/reporting.py:59