Back to skill

Security audit

投标文件智能编写

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its bid-document cloud-processing purpose, but it under-discloses device fingerprinting and handles credentials in a risky way.

Install only if you are comfortable sending bid/tender documents to the vendor cloud and using a saved API key. Avoid the automatic trial flow unless you consent to device fingerprinting, and prefer a dedicated/revocable API key rather than pasting a primary secret into chat.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

other

Warning
Location
scripts/zcm_lib/cli.py:197
Finding

Misrepresented and excessive device fingerprint collection

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:12-16,31; scripts/zcm_lib/cli.py:197-225,229-234
Vulnerability Type: Undisclosed device fingerprinting and privacy data collection
Risk Level: Medium

Evidence

The Skill metadata claims that device information is not collected:

yaml
metadata:
  permissions:
    environment:
    - ZCM_APP_KEY
    - ZCM_BASE / ZCM_CONFIG / ZCM_HOME / ZCM_OUTPUT_DIR
    not-collected: device information / phone number / verification code / any environment variables other than the ZCM_* variables above

However, trial registration collects several host identifiers:

python
def _collect_device():
    """Collect 6 device attributes; use an empty string if collection fails."""
    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),
    }

The collected data is then sent to the remote trial-account endpoint:

python
def _trial_flow():
    """Free trial: register using a device fingerprint and save the returned API key."""
    body = {"device": _collect_device()}
    if CHANNEL:
        body["channel"] = CHANNEL
    resp = _anon_json("POST", "/trial-accounts", json_body=body)

Technical Analysis

When trial onboarding is invoked, _trial_flow() unconditionally calls _collect_device(). This gathers the system hostname, operating-system name, architecture, local use ...[truncated 2468 chars]

Remediation
View remediation

Remediation Suggestions

  1. Correct SKILL.md metadata so it explicitly lists every collected and transmitted field and removes the false not-collected claim.
  2. Require explicit, informed consent immediately before device collection. Enforce this in code with a dedicated confirmation parameter or interactive consent gate rather than relying only on documentation.
  3. Remove collection of the hostname, local username, and home-directory path unless each field has a documented and necessary security purpose.
  4. Replace the MAC-derived hash with a random installation identifier stored locally, or use a narrowly scoped, server-salted identifier that cannot be correlated outside this service.
  5. Show the destination, purpose, retention policy, and exact categories of data before trial registration.
  6. Restrict production API destinations to authenticated HTTPS origins. If custom ZCM_BASE support is necessary, require an explicit development mode and warn before sending credentials or device attributes to a non-default origin.
  7. Provide a trial-registration mode that does not transmit persistent host identifiers.
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
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (52)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill advertises document-processing functions but also describes collecting device fingerprint data, handling phone/SMS registration, storing credentials locally, and optionally uploading experience/feedback to the platform. Those extra data-collection and account-binding behaviors materially expand the privacy and security surface beyond what a user would reasonably expect, increasing the chance of undisclosed telemetry or sensitive data exfiltration.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The skill advertises document-processing functions but also describes collecting device fingerprint data, handling phone/SMS registration, storing credentials locally, and optionally uploading experience/feedback to the platform. Those extra data-collection and account-binding behaviors materially expand the privacy and security surface beyond what a user would reasonably expect, increasing the chance of undisclosed telemetry or sensitive data exfiltration.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill advertises document-processing functions but also describes collecting device fingerprint data, handling phone/SMS registration, storing credentials locally, and optionally uploading experience/feedback to the platform. Those extra data-collection and account-binding behaviors materially expand the privacy and security surface beyond what a user would reasonably expect, increasing the chance of undisclosed telemetry or sensitive data exfiltration.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill advertises document-processing functions but also describes collecting device fingerprint data, handling phone/SMS registration, storing credentials locally, and optionally uploading experience/feedback to the platform. Those extra data-collection and account-binding behaviors materially expand the privacy and security surface beyond what a user would reasonably expect, increasing the chance of undisclosed telemetry or sensitive data exfiltration.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest says device information is not collected, while the documentation states that device fingerprinting is automatically collected for trial account creation. This contradiction can mislead users and downstream systems about sensitive data collection, undermining informed consent and potentially exposing host-identifying information without accurate disclosure.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill explicitly instructs users to paste their API key into chat so the assistant can save it. Asking users to place long-lived secrets into conversational content is dangerous because chat transcripts may be logged, retained, inspected by operators, exposed to other tools in the session, or inadvertently echoed back, creating a straightforward secret-handling vulnerability.

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-transit-files/` 也必须保

Lp1

High
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The file reads sensitive environment variables such as ZCM_APP_KEY, ZCM_BASE, and ZCM_OUTPUT_DIR, giving the skill access to host environment data that is not reflected in the declared permissions. Undeclared environment access is dangerous because it expands the skill’s effective privileges and can expose secrets or alter network destinations without transparent user consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill text explicitly tells users to paste their API key into the conversation for the assistant to save. Encouraging secrets to be shared in chat is dangerous because chat transcripts may be logged, retained, reviewed, or exposed through unrelated tooling, turning the conversation channel into a credential collection surface.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The device collection routine gathers hostname, platform, architecture, username, home path, and a hashed MAC-derived identifier for trial provisioning. For a document-processing skill, this is broader than necessary and creates a persistent fingerprint that can track users and devices across sessions.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
96% 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 access is dangerous because the skill handles user-supplied URLs and tender/bid documents, so it can retrieve remote content unexpectedly, expanding the attack surface to SSRF-like access, unreviewed data exfiltration paths, and privacy/compliance issues around cloud-hosted procurement files.

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.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation gives conflicting instructions about credential storage locations, including both a local skill directory and a global path under ~/.zcm. Ambiguity around where secrets are written increases the risk of accidental exposure, improper permissions, stale credentials persisting after uninstall, or other tools reading the wrong credential file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill requires that certain installation and capability explanations be output using the exact quoted Chinese wording and copied '原文照抄', which imposes a specific language on user-facing responses. This is a natural-language policy concern because the file does not provide any opt-in or alternative locale choice for users who may prefer another language.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This file forces a single language for all instructions and user-facing guidance, which can violate language/locale policy when no user opt-in or justification is provided. The content contains operational requirements such as how to present information to users, but nowhere indicates that Chinese is optional or that the skill is restricted to a Chinese-speaking context.

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 exclusively in Chinese and does not indicate that language selection is optional or limited to a China-specific/regional deployment. Under the stated policy, forcing a specific language or locale 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
87% confidence
Finding

This file contains user-facing operational instructions only in Chinese, which can constitute a language/locale policy issue when no opt-in or alternative language path is provided. The policy allows locale constraints only when they are explicitly justified, which is not stated here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This API handles highly sensitive bid/tender documents and explicitly uploads them to a cloud service, but the documentation does not provide a clear user-facing privacy or data-handling warning in the workflow. That omission can cause users to submit confidential commercial data without informed consent or awareness of storage, processing, retention, or third-party exposure risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation explicitly states that uploaded files and task results are retained on the vendor's servers and may persist for about 7 days, but it does not pair that behavior with a prominent privacy warning, consent requirement, or data-handling guidance for potentially sensitive bid materials. Because this skill processes procurement and tender documents, the retained content may include confidential commercial information, pricing, qualifications, and personal data, increasing the privacy and confidentiality risk if users are not clearly warned before upload.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Line L005 introduces mandatory output conventions, and the entire file prescribes user-facing wording exclusively in Chinese without offering a language choice. This creates a locale/language policy issue because the skill effectively forces a specific language by default rather than asking or honoring user preference.

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-transit/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
93% confidence
Finding

The skill includes backend 'experience' and 'feedback' submission features that collect and transmit user-derived content outside the core stated purpose of bidding-document interpretation, generation, review, and duplicate checking. This creates an unnecessary data exfiltration path for potentially sensitive tender, bid, company, or user workflow information, especially because users may not reasonably expect their content to be sent to a separate experience/telemetry channel.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This Python file hardcodes user-facing labels and state text in Chinese, such as risk labels and semantic status messages, and does not provide any mechanism for selecting or opting into another language. That creates a natural-language locale policy issue because the skill behavior appears to enforce a specific language by default.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code hard-codes Chinese report titles and labels such as "招标文件智能解读报告" and "项目句柄", and similar Chinese-only strings continue throughout the file. That creates a natural-language locale policy issue because the skill appears to enforce a specific language without any user opt-in or explicit region-specific justification in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The generated HTML hard-codes lang='zh', which enforces a specific language/locale in the rendered report. Under the policy, locale constraints should either be user-selectable or clearly documented as region-specific; neither is present in this file.

Content

No source excerpt is available for this finding.