Back to skill

Security audit

tender-generator

Security checks for vulnerabilities and agentic risk

Overview

This Chinese tender-document generator is mostly purpose-aligned, but it needs review because it handles banking/contact data and has unsafe file-writing and realistic sample-data issues.

Review before installing. Use this only for the intended tender workflow, keep input JSON and generated ZIP/DOCX files out of version control and shared workspaces, replace the realistic sample data with placeholders, and avoid running the generator on untrusted JSON until the ZIP filename is sanitized.

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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/generate_bid.py:1027
Finding

Insufficient Filename Validation Allows ZIP Output Path Traversal

Content
View full analysis
/标书文档包_x/../../destination.zip ``` If the intermediate prefixed directory exists, filesystem path resolution can escape the intended archive directory. The code also does not resolve the resulting path and verify that it remains under an approved destination. Opening the resulting path with `zipfile.ZipFile(..., 'w')` creates the file or truncates an existing file. No symbolic-link or destination-file protections are applied. ### Attack Path 1. An attacker supplies or modifies the JSON information file consumed through `--info`. 2. The attacker places path separat ...[truncated 1025 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:108
Finding

Apparent Personal, Banking, and Organizational Data Embedded in Documentation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (22)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的核心能力是交互式信息收集与文档生成,而代码并不生成文档、也不进行对话或模板填充。它只是对既有 .docx 文档进行批量格式修复,属于文档后处理工具而非文档生成器。虽然这可能是文档生成流程中的辅助脚本,但就该代码块本身而言,其主要目的与声明的主要用途存在明显差异,因此应判定为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

声明描述的是一个“智能项目文档生成器”,强调通过对话收集信息并自动填充模板生成全套项目文档。但代码实现是一个离线命令行脚本:通过 argparse 接收参数,从 JSON 文件加载信息,生成固定类别的标书文档(封面、承诺书、营业执照信息、报价单、偏离表、资格证明、技术文件、授权委托书、开票信息),并最终打包成 ZIP。代码中虽有模板/占位符替换相关函数,但在该代码片段的主流程里并未实际使用模板目录来生成文档,生成内容主要是程序内置的固定文案。其主要用途更准确地说是“标书自动生成与打包工具”,而不是“通过对话收集信息的通用项目文档生成器”。因此存在明显描述与行为不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

声明描述的是一个范围较广的智能项目文档生成器,核心特征包括:通过对话收集信息、自动填充模板、生成全套项目文档。而提供的代码块只实现了一个非常具体的功能:从固定 JSON 文件读取字段,生成一份名为《承诺书》的 .docx 标书文档。代码没有任何对话交互、信息采集流程、模板选择或多文档批量生成逻辑。虽然“文档生成”这一大方向部分一致,但实际主功能显著更窄,且缺少声明中的关键能力,因此属于描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

该描述与代码行为存在明显不一致。代码并不是一个对话式文档生成器,而是一个离线命令行脚本,输入来源是本地 JSON 文件,可选再读取本地 TMA.docx,随后固定生成一组标书/投标材料文档,并压缩打包。其核心场景是“标书自动生成”,而非宽泛的“项目文档生成”。此外,描述提到的模板填充和对话收集信息都不是代码中的实际核心实现。因此应判定为用途和能力描述不准确的 mismatch。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The invocation phrase “帮我生成一套项目文档” is broad natural language that can plausibly appear in ordinary conversation, increasing the chance the skill is triggered unintentionally. In an agent environment, accidental activation can cause the system to start collecting sensitive company, pricing, identity, and procurement data without a clearly scoped user intent boundary.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The natural-language instructions, workflow, and usage guidance are all presented in Chinese, effectively imposing a specific language on users. The policy allows locale constraints only when the skill offers a language choice or clearly documents a justified region-specific limitation, which is not present here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

SKILL.md 在工作流程中明确写明“只有在收到用户明确的‘确认’指令后,才能进入下一步”,将对话确认描述为强制约束。但后文的自动化脚本说明展示了直接通过 python3 scripts/generate_bid.py --info info.json ... 生成整套文档的非对话式路径,与前述‘必须严格按照 6 个步骤顺序执行’和‘所有信息收集和指令确认都必须在对话框内完成’形成直接矛盾。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The example JSON includes realistic-looking personal and financial data fields such as legal representative identity, phone number, bank account number, and interbank routing number. In a document-generation skill that users may copy verbatim, this creates a privacy and data-handling risk by normalizing the inclusion of sensitive information in docs and repositories without warning, and may lead users to expose real PII or banking data in logs, version control, or shared workspaces.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The JSON schema uses only Chinese field names throughout, which imposes a specific language/locale on users. Under the policy, locale constraints should either offer user choice or be clearly documented as justified for a region-specific use case; this file provides neither.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring is written only in Chinese, and all user-facing console messages are also Chinese-only. This creates a language/locale policy issue because the skill implicitly requires Chinese comprehension without any opt-in, fallback, or documented regional justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python skill is a code file, so SQP-3 applies to its natural-language strings and comments. The module description, CLI help text, and all generated document templates are hard-coded in Chinese, with Chinese fonts such as 宋体 and 黑体, and the script does not offer any language/locale selection or explain that it is intentionally limited to a Chinese-only regulatory context.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest describes an intelligent project document generator that collects information and fills templates to produce project documents. In addition to bid package documents, the code explicitly creates a standalone invoicing-information document containing tax identity, bank account, and contact details, which is a broader business/financial disclosure artifact not clearly implied by the stated purpose of project document generation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest mentions collecting information and auto-filling templates to generate documents, but does not mention bundling and exporting a consolidated archive. The zip packaging step materially increases the skill’s data-handling capability by aggregating all generated documents, including identity and bank-account content, into a redistributable package.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script's natural-language content, including title text, body text, and console messages, is entirely hardcoded in Chinese and generates a Chinese-language document by default. There is no indication that the skill is region-specific or that the user can opt into another language, which can violate language/locale choice policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script description, generated document text, and font configuration are all fixed to Chinese content and Chinese fonts such as 宋体 and 黑体. There is no option for users to select another language or locale, so the skill effectively forces a specific language without opt-in.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The manifest describes an intelligent project document generator that collects information and fills templates to produce project documents. Here the code creates a dedicated '开票信息' document containing bank account number, bank branch code, and contact details, which is handling sensitive financial/payment data rather than ordinary project narrative materials. This capability is not clearly justified by the stated purpose alone.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code generates several .docx files and a ZIP archive populated from fields such as company name, legal representative, phone number, tax ID, bank account, and bank routing details. Although the script prints progress messages, it does not give a user-facing warning that sensitive data will be written to disk and packaged into an archive, which is a safety-relevant disclosure for code that handles business and personal data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The user-facing instructions, examples, and interaction text are all written in Chinese, and the sample invocation assumes Chinese-language use. There is no statement that the skill supports multiple languages, asks the user for language preference, or justifies a Chinese-only locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language instructions, headings, parameter explanations, and warnings are all presented only in Chinese. Under the policy rule for language/locale, forcing a single language without opt-in or an explicit justified regional constraint can be a policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The script performs a file write by saving a generated document to a fixed output path, which affects user data on disk. Although it prints a success message after saving, there is no prior warning, confirmation, or explanatory comment near execution that informs the user that the script will create or overwrite a file at that location.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The inline text added to the cover document explicitly states '(此页 intentionally 空白)', meaning the page is intentionally blank. However, the code has already added a project title and detailed information table to the same document page, so the user-facing content directly contradicts the actual document contents.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.