Back to skill

Security audit

镖行AI投标文件生成助手

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its bidding-document purpose, but its trial and registration flows collect device and phone data despite the permission block saying they are not collected.

Review this skill before installing if you are uncomfortable sending tender/bid files, account identifiers, phone/SMS registration data, or device fingerprint details to the vendor cloud. Prefer using an explicit API key from the website instead of the automatic trial flow if you want to avoid device fingerprint registration.

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

Undeclared Collection and Transmission of Host Identity Data

Content
View full analysis

Vulnerability Details

File Location: scripts/zcm_lib/cli.py:198-232
Vulnerability Type: Undeclared host fingerprint collection and external transmission
Risk Level: Medium

The implementation contradicts the permission declaration at SKILL.md:10-16, which states that device information is not collected. The trial workflow collects the local hostname, operating-system type, architecture, username, home-directory path, and a persistent hash derived from the network-interface identifier, then sends these values to the configured API.

Relevant permission declaration (SKILL.md:10-16):

yaml
metadata:
  permissions:
    network:
    - biaoshu.zhiliaobiaoxun.com(招采猫 API,唯一外联目标)
    filesystem:
      read: 仅用户明确提供的招标/投标文件与本 skill 自身脚本
      write: biaoshu-bailian-files/(产物);~/.zcm/config.json(凭证,权限 600,logout 可删)
    environment:
    - ZCM_APP_KEY(可选:App Key,替代凭证文件)
    - ZCM_BASE / ZCM_CONFIG / ZCM_HOME / ZCM_OUTPUT_DIR(可选:地址与路径覆盖)
    billing: 标书生成消耗 App Key 所属账户积分(提交前预检余额)
    not-collected: 设备信息 / 手机号 / 验证码 / 除上述 ZCM_* 外的任何环境变量

Host-data collection and transmission (scripts/zcm_lib/cli.py:198-232):

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("~")),
 
...[truncated 2603 chars]
Remediation
View remediation

Remediation Suggestions

  1. Correct the structured permission metadata so it accurately lists every collected host attribute, its purpose, destination, and retention behavior.
  2. Require explicit opt-in before collecting or transmitting a device fingerprint. Display the exact fields before consent.
  3. Remove hostname, username, and home_path unless each is demonstrably necessary for trial-abuse prevention.
  4. Replace host-derived identifiers with a random installation identifier generated locally and stored with restrictive permissions.
  5. If a stable identifier is essential, use a narrowly scoped, service-specific value and document whether it can be correlated across accounts or installations.
  6. Minimize server-side retention and prohibit secondary use of fingerprinting data.
  7. Add tests that compare declared permissions with the fields included in the trial-registration request, preventing future disclosure regressions.
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 (46)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill includes extra behaviors such as remote version checks, reading local credential files, accessing environment-provided App Keys, and recording version-check timestamps. These may be legitimate operational features, but when not clearly disclosed as ancillary behaviors they expand the trust boundary and create privacy/secrets-handling risk if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The skill includes extra behaviors such as remote version checks, reading local credential files, accessing environment-provided App Keys, and recording version-check timestamps. These may be legitimate operational features, but when not clearly disclosed as ancillary behaviors they expand the trust boundary and create privacy/secrets-handling risk if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill includes extra behaviors such as remote version checks, reading local credential files, accessing environment-provided App Keys, and recording version-check timestamps. These may be legitimate operational features, but when not clearly disclosed as ancillary behaviors they expand the trust boundary and create privacy/secrets-handling risk if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill includes extra behaviors such as remote version checks, reading local credential files, accessing environment-provided App Keys, and recording version-check timestamps. These may be legitimate operational features, but when not clearly disclosed as ancillary behaviors they expand the trust boundary and create privacy/secrets-handling risk if users do not expect them.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill includes extra behaviors such as remote version checks, reading local credential files, accessing environment-provided App Keys, and recording version-check timestamps. These may be legitimate operational features, but when not clearly disclosed as ancillary behaviors they expand the trust boundary and create privacy/secrets-handling risk if users do not expect them.

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

Lp1

High
Category
MCP Least Privilege
Confidence
81% confidence
Finding

The CLI reads sensitive configuration from environment variables such as ZCM_APP_KEY, ZCM_BASE, and ZCM_OUTPUT_DIR, but the finding indicates this capability is not declared in permissions. Undeclared access to environment data weakens transparency and sandbox policy enforcement, and in agent contexts can expose secrets or allow behavior changes through attacker-controlled environment settings.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
94% 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 expands the skill's effective trust boundary, can be used to fetch attacker-controlled content, and may enable SSRF-style access to internal or sensitive endpoints if user-supplied URLs are accepted elsewhere in the skill.

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
94% confidence
Finding

The document requires that installation-success or capability descriptions 'must' include two blocks and that they should be copied from the original text, which is entirely Chinese. This imposes a specific language on user-facing responses without any opt-in or alternative locale path, matching the language/locale policy violation category.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document title and all user-facing instructions are exclusively in Chinese, with no indication that users may choose another language or locale. This can violate language/locale policy when the skill is used in broader contexts where language choice should be offered or explicitly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The API documentation explicitly supports uploading tender documents or providing a remote file URL, and the surrounding skill metadata states files are processed in a cloud service, but this workflow section does not present any user-facing privacy, confidentiality, retention, or third-party processing warning. Because tender/bid files commonly contain sensitive commercial, legal, pricing, and identity information, users may disclose regulated or confidential data without informed consent or understanding of where the data is sent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This markdown file contains only Chinese-language instructions and API documentation, which can amount to a language/locale restriction if the skill is presented generally rather than as an explicitly region- or language-specific tool. The file does not provide user opt-in, alternative language support, or a documented justification for the language constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The documentation states that uploaded files and task results are retained on the vendor's servers and tied to the API key owner's account, but it does not present this as a prominent privacy warning or require explicit user/operator acknowledgment before processing sensitive bid documents. Because this skill handles procurement and tender materials that may contain confidential business, pricing, and identity data, unclear disclosure can lead to unintended external storage of sensitive information and compliance/privacy exposure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The entire skill file is written only in Chinese and provides operational instructions exclusively in that language. This can violate language/locale policy when no user opt-in, alternative language option, or explicit justification for a Chinese-only scope is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file contains natural-language instructions written as a required operating manual, and it consistently prescribes Chinese phrasing for user-facing responses. There is no indication that users may opt into another language or locale, which can violate a language/locale choice policy.

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-service/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
92% confidence
Finding

This Python file embeds user-facing strings such as risk labels, status labels, and service labels entirely in Chinese, and later assembles output lines from them. That imposes a specific language/locale on rendered reports without any visible opt-in, fallback, or configuration path, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code hard-codes report titles and visible UI text in Chinese, and the imported label constants also indicate Chinese-only rendering. Because the file contains no natural-language option or opt-in for locale, it enforces a specific language policy in generated output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The rendered document sets <html lang='zh'>, and the surrounding generated UI text throughout the file is also fixed in Chinese. This enforces a specific language/locale in output without any user opt-in or visible justification, which matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function returns hard-coded Chinese user-facing messages such as "预计/本次需要约" and "当前可用" with no visible option for language selection. This is a natural-language locale policy concern because the file enforces a specific language rather than offering user choice or documenting a justified regional limitation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill performs additional capabilities beyond core document interpretation/generation, including account registration, SMS verification, feedback submission, experience upload, and knowledge-base access. These expand the trust boundary and data flows beyond the manifest-described workflow, increasing the chance of unexpected collection or transmission of personal or business-sensitive information.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trial flow collects a broad device fingerprint including hostname, username, home path, platform, architecture, and hashed MAC address, then transmits it to the service. Several of these attributes are unnecessary for bidding-document processing and increase privacy risk by enabling persistent device tracking and collection of potentially identifying local-system metadata.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The automatic trial registration path sends collected device fingerprint data immediately to /trial-accounts, but there is no immediate, specific warning at the point of collection describing which device attributes will be transmitted. This undermines informed consent and may surprise users with hidden telemetry during what appears to be a simple trial-enablement step.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The SMS registration flow submits a phone number to /auth/send-sms without an explicit privacy warning at the submission step. Because phone numbers are personal data and may be linked to accounts and trial keys, sending them without clear just-in-time disclosure creates privacy and consent risk.

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