Back to skill

Security audit

标书制作工具

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real cloud bidding-document tool, but it has material privacy and credential-handling disclosure problems.

Review this skill carefully before installing. Use it only if you are comfortable sending bid/tender documents and account data to the vendor service. Do not paste production API keys or SMS codes into ordinary chat unless your environment explicitly treats chat as a secure secret channel; prefer a dedicated secret input flow or the vendor website. The publisher should fix the device-fingerprint disclosure, add explicit consent before trial registration, and document exactly what document, device, phone, credential, and feedback data is sent and retained.

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:198
Finding

Device Fingerprinting Contradicts the Declared Data-Collection Boundary

Content
View full analysis

Vulnerability Details

File Location: scripts/zcm_lib/cli.py:198-232
Related Declaration: SKILL.md:17,27
Vulnerability Type: Undisclosed collection and transmission of local device identifiers
Risk Level: Medium

Evidence

The Skill metadata states that device information is not collected:

yaml
not-collected: 设备信息 / 手机号 / 验证码 / 除上述 ZCM_* 外的任何环境变量

Elsewhere, the documentation mentions automatic device-feature collection, creating an internally inconsistent disclosure:

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

The implementation collects several local identifiers:

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:
            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)

Technical Analysis

The free-trial workflow gathers the hostname, operating-system type, architecture, local username, home-directory path, and a SHA-256 hash derived from the machine’s MAC address. It then submits those fields in the request body to the configured API endpoint.

Hashing the MAC address does not make it anonymous. ...[truncated 2136 chars]

Remediation
View remediation

Remediation Suggestions

  1. Correct SKILL.md metadata so it accurately enumerates every collected field, its purpose, retention expectations, and remote destination.
  2. Require explicit user consent before collecting or transmitting device identifiers. The consent prompt should list the specific fields rather than referring generically to “device features.”
  3. Remove unnecessary fields such as hostname, username, and home-directory path from trial registration.
  4. Replace the MAC-derived identifier with a randomly generated, application-scoped installation identifier stored locally with restrictive permissions.
  5. Provide a registration path that does not require device fingerprinting.
  6. Ensure non-interactive execution cannot silently bypass the consent decision.
  7. Add tests verifying that trial registration transmits only documented, allowlisted fields.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (53)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents an end-to-end AI bidding-document analysis and generation skill. The supplied code chunk, however, only exposes a compatibility CLI for report rendering and delegates to report_lib.generator. Based on this chunk, the observable behavior is converting already-produced JSON results into HTML/Word reports. That is a materially narrower and different purpose than the declared upload/analyze/generate/review/check service. While this code may be a supporting component of a larger system, the chunk itself does not implement or evidence the core advertised capabilities, so the description does not accurately represent what this code actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个面向终端用户的完整标书AI处理服务,包括文件上传、云端分析、投标书生成、审查和查重。给定代码却只是下游结果展示组件:它从 JSON 读取现成结果,选择对应 renderer,将内容输出为 HTML/DOCX 报告。虽然 service 枚举名称与“解读/合规/查重”场景相关,说明它可能服务于该系统的一部分,但本代码本身并不执行声明中的核心能力。其主要用途与声明的整体技能相比明显更窄且不同,因此属于描述与实际行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description promises a full-featured bidding/tender document service with file handling, AI analysis, generation, review, and duplicate checking. The provided code does not demonstrate any of those behaviors; it is only an empty module with a brief docstring about shared CLI helpers. This is a material description-behavior mismatch because the actual supplied code chunk lacks the primary advertised capabilities entirely.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

声明描述的是一个完整的招投标文档AI处理技能,核心功能应包括文件接收、分析、生成、审查或查重等业务逻辑。但提供的代码片段只是 progress.py,作用是把任务进度信息格式化为中文状态行,并格式化时间与文件大小。虽然其中出现“标书正在生成中”“交付成品链接”等文案,说明它可能服务于相关产品场景,但该片段本身并不实现所宣称的核心能力,仅是配套的显示辅助代码。按照评估标准,这与声明的主要用途存在显著不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied code does not implement tender/bid document upload, parsing, analysis, generation, review, or similarity checking. Its primary purpose is operational infrastructure for checking whether the skill itself has a newer version available. While such functionality could be a supporting detail of a larger skill, this chunk performs a distinct undeclared capability: contacting a platform endpoint for version metadata and updating local credential state to throttle checks. That behavior is materially different from the declared end-user document-processing purpose, so this code chunk does not accurately match the description.

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, yet the instructions state that installation 'automatically collects device fingerprints' to create a trial account. This is dangerous because it defeats informed consent and can lead to covert tracking or unexpected transmission of endpoint-identifying data to the remote service.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill instructs users to paste API keys directly into chat so the assistant can save them. This is dangerous because chat channels are commonly logged, retained, or exposed to multiple processing layers, creating a high risk of credential leakage and subsequent unauthorized use of the user's account or paid quota.

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-build-files/` 也必须保留。

Ssd 3

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill directs the assistant to collect phone numbers and SMS verification codes, which are highly sensitive authentication factors. Collecting them through the assistant creates an avoidable phishing-style pattern and risks account takeover if those values are logged, mishandled, or intercepted.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
86% 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. Undeclared environment access can bypass user expectations and platform controls, and in this skill it is used to ingest credentials and persist them locally, which increases the trust gap.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The file performs outbound network access via urllib.request.urlopen in download_to_local(), but the finding indicates this capability is not declared in the skill's permissions. Undeclared network access is dangerous because it can fetch attacker-controlled content, trigger unexpected external requests, and bypass user/platform expectations about what the skill is allowed to do.

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.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The description says the skill should be used when the user 'provides or mentions' bidding documents or asks broad phrases like '帮我写投标书' and '检查标书有没有问题', followed by '或想…时使用'. This mixes many scenarios into a single broad activation condition without clear exclusion boundaries or negative examples, increasing the chance of unintended invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

These instructions require installation and capability explanations to include specific Chinese wording verbatim, including example phrases that 'must appear as-is'. This is a natural-language policy concern because it forces a specific language and phrasing without user opt-in or an alternative locale path.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The file is entirely written in Chinese and includes mandatory user-facing wording guidance such as '展示给用户时统一说“可用字数”' and '必须把...转述给用户', but it does not offer any user opt-in or alternative language handling. Under the policy, language or locale constraints should either be optional for the user or explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The workflow explicitly instructs users to upload tender/bid documents to a cloud service and later retrieve generated bid files, but it provides no warning about privacy, confidentiality, retention, or third-party data handling. In this skill context, the files are likely to contain sensitive commercial, pricing, qualification, and potentially personal information, so omission of data-handling disclosures can lead to unintended exposure or non-compliant processing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The API documentation instructs users to upload bid files or provide file URLs for compliance review, which likely contain confidential commercial, legal, and identifying information, but it does not clearly disclose that this data will be transmitted to and processed by a cloud service. In this skill’s context, the documents are especially sensitive because bid/tender materials may include pricing, strategy, credentials, and proprietary content, so omission of a privacy/data-handling warning can cause users to expose sensitive information without informed consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation labels sibling_unit_names as sensitive unit names but fails to warn that these identifiers themselves will be submitted to the API and processed remotely. Because this field may reveal affiliate relationships, internal watchlists, or entities of investigative interest, the lack of disclosure increases the risk of unintended exposure of sensitive organizational metadata.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file’s natural-language instructions and headings are fully in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited to Chinese-speaking users. Under the policy, forcing a specific language without 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
93% confidence
Finding

The entire document is written as operational guidance in Chinese and does not offer any language or locale choice. Under the stated policy, forcing a specific language without user opt-in can constitute a natural-language policy violation unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file declares Chinese output conventions as mandatory unless the user explicitly says otherwise, which imposes a default language choice on users rather than offering a neutral language/locale selection. This is a natural-language policy issue because it sets a fixed locale behavior without prior opt-in or a documented region-specific justification.

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-build/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,自动保存)——见本节末尾「绑定手机号 / 可用字数不足」流程,别让用户自己敲命令。

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The knowledge-base queries for company profile, qualifications, performances, and financial reports materially broaden the skill from document analysis/generation into organizational data retrieval. In a bidding context, these records may contain sensitive business information, and exposing undeclared retrieval capabilities increases the risk of over-collection, unauthorized access, or use beyond user expectations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill includes 'experience' and 'feedback' commands that persist user preferences/corrections and transmit issue reports, which expands behavior beyond the declared bidding-document processing purpose. This creates a data-minimization and privacy risk because users may provide sensitive procurement, company, or personal information that is retained or exfiltrated without a purpose clearly aligned to the advertised function.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This Python file contains numerous hard-coded Chinese-only labels and messages used for rendered output, such as risk labels, status text, and summary lines. Because the file provides user-facing text but does not offer any locale selection or opt-in mechanism, it appears to enforce a specific language in a way that can violate language/locale policy.

Content

No source excerpt is available for this finding.