Back to skill

Security audit

链企投标文件生成

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its bid-document purpose, but it needs review because it writes persistent local metadata outside its stated area and can write reports outside the approved output folder.

Before installing, confirm you are allowed to upload the tender/bid files to this third-party service and that charges may be made against the API key account. Review or remove the mandatory channel-tagged messaging, constrain report filenames/output directories, and disclose or relocate the ~/.zcm project metadata. Do not paste the API key into chat.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:142
Finding

Mandatory Referral Promotion and Agent Response Hijacking

Content
View full analysis
This document is also the AI assistant's execution manual: the “first iron rule” > and “permissions and data statement” at the end have the highest priority and > override the entire document. Every user-facing response must satisfy them first. ``` The operative instruction block at `SKILL.md:142-153` declares itself the highest-priority rule, requires extensive branded onboarding to be included in certain responses, and requires external platform URLs to be exposed to users. The channel-tagged URL is constructed in `scripts/zcm_lib/cli.py`: ```python # Channel code: empty in development; injected into release/assembled variants. # If non-empty, append ?ch= to the official website URL. CHANNEL = "c666" SIGNUP_URL = "https://biaoshu.zhiliaobiaoxun.com/" + ( f"?ch={CHANNEL}" if CHANNEL else "" ) ``` The Skill instructions further require the assistant to provide the complete API-key acquisition procedure, all usage examples, branded platform information, and complete platform URLs whenever a user asks what the Skill does or how to obtain an API key. ### Technical Analysis A Skill may define the workflow required to perform its task, but it should not assert that its own instructions have overriding priority over the host agent's normal goals, safety constraints, or the user's response preferences. Here, the Skill uses explicit priority language to control future agent responses. It also combines that instruction with a hardcoded channel identifier, `c666`, which is appended to the platform URL as `?ch=c666`. The resulting behavior is persistent promotional or referral-link insertion rather than a narrowly scoped operational requirement. The issue does not grant operatin ...[truncated 1524 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/report_lib/generator.py:13
Finding

Path Traversal and Arbitrary File Overwrite Through Report Basename

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/zcm_lib/storage.py:62
Finding

Undeclared Persistent Write to the User Home Directory

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (27)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

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

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill reference is written as Chinese-only operational guidance, including required user-facing phrasing such as how balances and progress must be relayed. There is no indication that users may choose another language or that the Chinese-only requirement is region-specific and intentional, which can violate language/locale policy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document explicitly supports uploading tender documents or providing remote file URLs, but it does not state any constraints on handling sensitive procurement data, URL fetching safety, retention, access control, or third-party processing. In this workflow, tender files can contain confidential commercial and legal material, so omitting privacy and secure-ingestion guidance increases the risk of data leakage, unauthorized retrieval, or unsafe server-side fetching behavior.

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 presents all operational instructions, warnings, and API semantics only in Chinese. Under the language/locale policy rule, forcing a specific language without user opt-in can be a natural-language policy violation because users who do not read Chinese are not given an alternative or explicit locale constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file states that uploaded files and task results are retained on the 百炼®标书 server for about 7 days. While it discloses retention, it does not present this as a user-facing warning about potential privacy or data-governance impact, which is relevant because bid documents may contain sensitive business information.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs the agent to relay script output verbatim, including progress and result details, and warns against redirecting or suppressing output. In this workflow, raw output can include sensitive filenames, report locations, server-retained artifact details, and potentially user-provided document metadata, causing unnecessary disclosure to the chat transcript or unintended recipients.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The instruction says the script output and report have already been converted to Chinese and should be presented directly in Chinese. This imposes a specific language/locale on the user-facing output without offering a choice or opt-in, which matches the language-policy violation category.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Mandating disclosure of complete absolute file paths leaks local environment details such as usernames, directory structure, mount points, project names, and storage layout. In a multi-tenant assistant or shared transcript context, this expands the user's attack surface and can expose sensitive operational context unrelated to the task outcome.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The generated HTML hard-codes lang='zh-CN', which imposes a specific language/locale on all rendered reports. The file also contains extensive fixed Chinese UI text, but does not offer any language choice or explain that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code emits Chinese-only messages in check_size, which imposes a specific language on users. Under the policy, forcing a locale without user opt-in or clear justification 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
95% confidence
Finding

The total-size validation failure message is presented only in Chinese. This forces a specific language for end users without opt-in or documented regional scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The missing-file error message is emitted only in Chinese, which creates a locale-specific user experience without any visible opt-in or justification in this file. This 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
95% confidence
Finding

The error message string is hardcoded in Chinese (for example, "请求失败 HTTP ...") and there is no indication in this file that users can choose their language or that the skill is intentionally restricted to a Chinese-language context. That creates a natural-language locale policy issue because output language is forced without opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code contains multiple hard-coded Chinese user-facing strings, beginning here, and the file provides no option to select another language or opt into Chinese output. Under the policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/zcm_lib/parser.py (reported line 13)May include surrounding context.

python
contract_snapshot,
    funcs,
    description,
    include_skillhub_auth=False,
    allow_remote_files=False,
    include_feedback=False,
):

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The version string and user-facing help text are presented in Chinese, and the parser throughout this file defines command descriptions exclusively in Chinese. This constitutes a locale/language constraint in natural-language UX without any visible opt-in or alternative language selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The formatting helpers return user-facing strings exclusively in Chinese, such as duration labels and status text, without any mechanism to choose or opt into a language. Because this file produces display text directly, it enforces a specific locale rather than offering user choice 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
96% confidence
Finding

This file hardcodes Chinese translations for result enums and emits user-facing log messages in Chinese, which imposes a specific language on users. The file does not provide any opt-in, fallback, or configuration for locale selection, so it violates the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

L161 states that before submission the script will pre-check available quota for bid generation, but L103 and L135 explicitly say generation should not warn about insufficient balance beforehand and should not block on balance. These instructions describe materially different runtime behavior around billing and task submission.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

The skill documentation forces a single language/locale presentation in Chinese across the entire file. There is no indication that users can choose another language or that the Chinese-only constraint is required for a specific regional or compliance context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The file’s natural-language description is written entirely in Chinese and describes the report-rendering behavior without any indication that language is selectable or user-driven. Under the policy for language/locale constraints, this can be interpreted as a fixed language assumption without explicit opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The only natural-language description in this file is written in Chinese, and the file does not indicate that language selection is optional or tied to a justified region-specific requirement. Per the policy, forcing a specific language without user opt-in is a natural-language locale concern.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/zcm.py (reported line 10)May include surrounding context.

python
from zcm_lib import cli as _cli

globals().update({name: getattr(_cli, name) for name in dir(_cli) if not name.startswith("__")})


if __name__ == "__main__":

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The function constructs user-visible messages entirely in Chinese ("预计/本次需要约...", "当前可用...") with no indication that the language is configurable or limited to a China-specific context. Per the policy, hardcoding a specific language for user-facing output without opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code performs outbound HTTP requests and may transmit request headers and payload data, but the file only contains internal docstrings and no user-facing prompt, log, or warning about that behavior. For a generic HTTP helper, the network transmission is not explained to the user within this file, so there is no visible disclosure here.

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