Back to skill

Security audit

标袋云投标文件生成助手

Security checks for vulnerabilities and agentic risk

Overview

This bid-document assistant mostly matches its purpose, but it has Review-worthy disclosure gaps around automatic trial device fingerprinting, credential storage, and broad remote-file handling.

Review before installing. Expect tender/bid files and generated results to be processed by the vendor cloud service, an API key to be stored locally in the skill directory, and free-trial setup to send device-identifying fields unless avoided by using an existing API key. Avoid giving internal-only URLs as file inputs, and install only if the vendor's cloud processing, account, billing, and data-retention model fit your procurement confidentiality requirements.

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

Undisclosed transmission of device fingerprint and local identity data

Content
View full analysis

Vulnerability Details

File Location: scripts/zcm_lib/cli.py:197-233
Related contradictory declaration: SKILL.md:11-14
Vulnerability Type: Undisclosed collection and transmission of host information
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 contradicts this behavior:

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

Technical Analysis

The automatic trial workflow gathers six host attributes: hostname, operating-system type, architecture, local username, home-directory path, and a SHA-256 hash derived from the machine’s MAC address. _trial_flow() places these values in the device field and transmits them to the configured remote API through an unauthenticated POST /trial-accounts request.

These fields are not necessary merely to process a tender document. Several can reveal personal or organizational identity, while mac_hash provides a stable device-linking identif ...[truncated 2040 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the contradictory not-collected declaration or replace it with an exact list of collected fields, their purpose, retention period, and remote destination.
  2. Require explicit, immediate opt-in before invoking _collect_device() and transmitting any host attributes.
  3. Replace the hardware-derived fingerprint with a random installation identifier generated locally using a cryptographically secure random source.
  4. Do not collect or transmit the hostname, local username, or home-directory path, as they are unnecessary for trial-account deduplication and can expose identity information.
  5. If deduplication is required, use a narrowly scoped random identifier that cannot be correlated with other services or reconstructed from hardware data.
  6. Provide a non-fingerprinting registration path and ensure declining collection does not silently trigger the same request.
  7. Add tests verifying that trial registration cannot collect undeclared fields and that metadata remains synchronized with implementation behavior.
  8. Document deletion and retention controls for identifiers previously transmitted to the service.
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (48)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

This documented skill behavior goes beyond the headline purpose and includes device fingerprint collection, local credential storage, feedback/experience upload, and account bootstrap flows. Hidden or under-disclosed collection and transmission of host identifiers is dangerous because users may provide sensitive tender/bid documents under the assumption of narrow-purpose processing, while the skill also gathers ancillary identifiers and may exfiltrate additional metadata to a third-party service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This documented skill behavior goes beyond the headline purpose and includes device fingerprint collection, local credential storage, feedback/experience upload, and account bootstrap flows. Hidden or under-disclosed collection and transmission of host identifiers is dangerous because users may provide sensitive tender/bid documents under the assumption of narrow-purpose processing, while the skill also gathers ancillary identifiers and may exfiltrate additional metadata to a third-party service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This documented skill behavior goes beyond the headline purpose and includes device fingerprint collection, local credential storage, feedback/experience upload, and account bootstrap flows. Hidden or under-disclosed collection and transmission of host identifiers is dangerous because users may provide sensitive tender/bid documents under the assumption of narrow-purpose processing, while the skill also gathers ancillary identifiers and may exfiltrate additional metadata to a third-party service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This documented skill behavior goes beyond the headline purpose and includes device fingerprint collection, local credential storage, feedback/experience upload, and account bootstrap flows. Hidden or under-disclosed collection and transmission of host identifiers is dangerous because users may provide sensitive tender/bid documents under the assumption of narrow-purpose processing, while the skill also gathers ancillary identifiers and may exfiltrate additional metadata to a third-party service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This documented skill behavior goes beyond the headline purpose and includes device fingerprint collection, local credential storage, feedback/experience upload, and account bootstrap flows. Hidden or under-disclosed collection and transmission of host identifiers is dangerous because users may provide sensitive tender/bid documents under the assumption of narrow-purpose processing, while the skill also gathers ancillary identifiers and may exfiltrate additional metadata to a third-party service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

This documented skill behavior goes beyond the headline purpose and includes device fingerprint collection, local credential storage, feedback/experience upload, and account bootstrap flows. Hidden or under-disclosed collection and transmission of host identifiers is dangerous because users may provide sensitive tender/bid documents under the assumption of narrow-purpose processing, while the skill also gathers ancillary identifiers and may exfiltrate additional metadata to a third-party service.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This documented skill behavior goes beyond the headline purpose and includes device fingerprint collection, local credential storage, feedback/experience upload, and account bootstrap flows. Hidden or under-disclosed collection and transmission of host identifiers is dangerous because users may provide sensitive tender/bid documents under the assumption of narrow-purpose processing, while the skill also gathers ancillary identifiers and may exfiltrate additional metadata to a third-party service.

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, while the documentation explicitly states that device fingerprints are automatically collected to create a trial account. This inconsistency is dangerous because it defeats informed consent and can cause users to expose sensitive host-identifying data during processing of potentially confidential procurement documents.

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

Lp1

High
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill uses 'env' 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.

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 declared static finding indicates this capability is not covered by permissions. In a skill that handles user-supplied URLs and procurement documents, undeclared network access increases SSRF/data-exfiltration risk and can violate platform trust boundaries because the code can fetch arbitrary remote content without an explicit permission gate.

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

The manifest declares one credential write location, while later instructions direct the assistant to store API keys in a different local path. Conflicting credential-storage rules are dangerous because they can lead to secrets being written to less-protected or unexpected locations, undermining user expectations, incident response, and least-privilege filesystem controls.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

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

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document title and all operational instructions are written entirely in Chinese, and line L59 explicitly requires relaying progress fields to the user in this context, implying a Chinese-only user interaction pattern. There is no indication that users may choose another language or locale, which can violate a language/locale choice policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file’s natural-language instructions, API workflow descriptions, and user-facing guidance are all presented in Chinese, and there is no indication that users may choose another language or that the skill is intentionally limited 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.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

The entire skill file is written as mandatory Chinese-language operational guidance, including prescribed wording at L69, with no indication that users may choose another language or locale. Under the policy, a language constraint should either be optional/opt-in or clearly documented as a justified region-specific requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The entire skill file is written only in Chinese and gives operational instructions exclusively in that language. This can violate language/locale policy when no user opt-in, multilingual option, or explicit region-specific justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file is entirely framed as a required operating manual in Chinese, and the instructions are presented as mandatory defaults. There is no indication that users may choose another language or locale, which can violate a language/locale policy when no opt-in or justification is provided.

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-city/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
91% confidence
Finding

The skill documents a trial flow that automatically collects device fingerprints to create or recover a trial account, which is not necessary for the core bid-document interpretation/generation workflow. Silent or poorly disclosed device fingerprinting creates privacy and compliance risk because it collects persistent identifiers unrelated to the immediate document-processing task and may surprise users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code maps internal states and report labels directly to Chinese strings such as "高风险", "待复核", and "智能解读", and similar Chinese-only output appears throughout the file. That creates a natural-language locale policy concern because the skill forces one language for user-facing report content without any visible user opt-in or locale selection mechanism.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code generates report titles and labels in Chinese, and the same pattern continues throughout the file. Because the file forces a specific language in user-facing output without any visible opt-in or locale selection mechanism, it creates a natural-language policy concern under the language/locale rule.

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 uses fixed Chinese branding and interface text throughout the rendered report. This enforces a specific language/locale on all outputs without offering user opt-in or documenting that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The CLI includes additional telemetry and platform-management features such as experience submission, feedback reporting, knowledge-base querying, and version checking that are not clearly reflected in the skill description focused on bid analysis and document generation. Hidden or under-disclosed outbound features increase data-governance and trust risk because users may not expect the skill to send operational metadata or user-authored content to remote services.

Content

No source excerpt is available for this finding.